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)
$(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)-*

@ -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."

Loading…
Cancel
Save