forked from CodersSquad/ap-labs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Obed N Munoz <[email protected]>
- Loading branch information
Showing
3 changed files
with
59 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
|
||
include ../../common.mk | ||
-include lab.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# word-reverser build & test automation | ||
|
||
APP_NAME=base64 | ||
LIB_NAME=logger | ||
|
||
build: | ||
gcc -c ${APP_NAME}.c -o ${APP_NAME}.o | ||
gcc -c ${LIB_NAME}.c -o ${LIB_NAME}.o | ||
gcc ${LIB_NAME}.o ${APP_NAME}.o -o ${APP_NAME} | ||
|
||
files: | ||
curl -Ok http://textfiles.com/stories/vgilante.txt | ||
curl -Ok http://textfiles.com/stories/sick-kid.txt | ||
curl -Ok http://textfiles.com/stories/aesop11.txt | ||
head -c 2147483648 </dev/urandom > megafile.txt | ||
|
||
test: build files | ||
@echo Test 1 | ||
./${APP_NAME} --encode vigilante.txt | ||
./${APP_NAME} --decode vigilante-encoded.txt | ||
@echo Test 2 | ||
./${APP_NAME} --encode sick-kid.txt | ||
./${APP_NAME} --decode sick-kid-encoded.txt | ||
@echo Test 3 | ||
./${APP_NAME} --encode aesop11.txt | ||
./${APP_NAME} --decode aesop11-encoded.txt | ||
@echo Test 4 - megafile - 2 Gb | ||
./${APP_NAME} --encode megafile.txt | ||
./${APP_NAME} --decode megafile-encoded.txt | ||
@echo Test 5 - failed test | ||
./${APP_NAME} --decode non-existing-file.txt | ||
|
||
clean: | ||
rm -rf *.o ${APP_NAME} *-encoded.txt vgilante.txt sick-kid.txt aesop11.txt megafile.txt |