diff --git a/Makefile b/Makefile index b35e103..e7f4f4e 100644 --- a/Makefile +++ b/Makefile @@ -71,10 +71,12 @@ $(PROJECT)-debug: LDFLAGS += $(DEBUG_LDFLAGS) $(PROJECT)-debug: $(OBJ) $(CXX) $^ $(CXXFLAGS) -o $@ $(LDFLAGS) -clean: +clean-rebuild: rm -rf obj + +clean: clean-rebuild rm -f $(PROJECT)-{release,debug} test-all: - @./test.sh ./$(PROJECT)-debug ./$(PROJECT)-release + @./test.sh ./$(PROJECT)-* diff --git a/test.sh b/test.sh index 39b5a73..25ea229 100755 --- a/test.sh +++ b/test.sh @@ -41,14 +41,11 @@ echo ">>> Initialising" dd if=/dev/urandom of=$TFILE bs=$FSIZE count=$FCNT >> /dev/null 2>&1 || exit -1 cp $TFILE $TFILE2 || exit -1 -if [[ -f "$1" ]]; then - echo ">>> Testing $1" - stest "$1" || exit 1 -fi - -if [[ -f "$2" ]]; then - echo ">>> Testing $2" - stest "$2" || exit 2 -fi +for ex in "$@"; do + if [[ -f "$ex" ]]; then + echo ">>> Testing $ex" + stest "$ex" || exit 1 + fi +done echo "Passed."