improve test script and makefile

progress
Avril 4 years ago
parent 66cac674a9
commit 360dc8a069
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -71,10 +71,12 @@ $(PROJECT)-debug: LDFLAGS += $(DEBUG_LDFLAGS)
$(PROJECT)-debug: $(OBJ) $(PROJECT)-debug: $(OBJ)
$(CXX) $^ $(CXXFLAGS) -o $@ $(LDFLAGS) $(CXX) $^ $(CXXFLAGS) -o $@ $(LDFLAGS)
clean: clean-rebuild:
rm -rf obj rm -rf obj
clean: clean-rebuild
rm -f $(PROJECT)-{release,debug} rm -f $(PROJECT)-{release,debug}
test-all: test-all:
@./test.sh ./$(PROJECT)-debug ./$(PROJECT)-release @./test.sh ./$(PROJECT)-*

@ -41,14 +41,11 @@ echo ">>> Initialising"
dd if=/dev/urandom of=$TFILE bs=$FSIZE count=$FCNT >> /dev/null 2>&1 || exit -1 dd if=/dev/urandom of=$TFILE bs=$FSIZE count=$FCNT >> /dev/null 2>&1 || exit -1
cp $TFILE $TFILE2 || exit -1 cp $TFILE $TFILE2 || exit -1
if [[ -f "$1" ]]; then for ex in "$@"; do
echo ">>> Testing $1" if [[ -f "$ex" ]]; then
stest "$1" || exit 1 echo ">>> Testing $ex"
fi stest "$ex" || exit 1
fi
if [[ -f "$2" ]]; then done
echo ">>> Testing $2"
stest "$2" || exit 2
fi
echo "Passed." echo "Passed."

Loading…
Cancel
Save