%.opt:
$(H)$(MAKE) MATITAC='$(MATITACOPT)' MATITACLEAN='$(MATITACLEANOPT)' MATITADEP='$(MATITADEPOPT)' $(@:%.opt=%)
-clean:
+clean_:
+ rm -r __*not_for_matita
+
+clean: clean_
$(H)$(MATITACLEAN) $(SRC)
-cleanall:
+cleanall: clean_
$(H)rm -f $(SRC:%.ma=%.moo)
$(MATITACLEAN) all
%.opt:
$(H)$(MAKE) MATITAC='$(MATITACOPT)' MATITACLEAN='$(MATITACLEANOPT)' MATITADEP='$(MATITADEPOPT)' $(@:%.opt=%)
-clean:
+clean_:
+ rm -r __*not_for_matita
+
+clean: clean_
$(H)$(MATITACLEAN) $(SRC)
-cleanall:
+cleanall: clean_
$(H)rm -f $(SRC:%.ma=%.moo)
$(MATITACLEAN) all
%.opt:
$(H)$(MAKE) MATITAC='$(MATITACOPT)' MATITACLEAN='$(MATITACLEANOPT)' MATITADEP='$(MATITADEPOPT)' $(@:%.opt=%)
-clean:
+clean_:
+ rm -f __*not_for_matita
+
+clean: clean_
$(H)$(MATITACLEAN) $(SRC)
cleanall:
shift
TWICE=1
fi
+if [ "$1" = "-keep-logs" ]; then
+ shift
+ KEEP=1
+fi
COMPILER=$1
shift
if [ -z "$COMPILER" -o -z "$CLEANER" -o -z "$LOGFILE" -o -z "$EXPECTED" -o -z "$TODO" ]; then
echo
echo "usage: "
- echo " do_tests.sh [-no-color] [-twice] ./compiler ./cleaner logfile expected_result test.ma ..."
+ echo " do_tests.sh [-no-color] [-twice] [-keep-logs] ./compiler ./cleaner logfile expected_result test.ma ..."
echo
echo "options: "
echo " -no-color Do not use vt100 colors"
echo " -twice Run each test twice but show only the second run times"
+ echo " -keep-logs Do not dele __* files"
echo
echo "If expected_result is OK the result will be OK if the test compiles."
echo "Otherwise if expected_result is FAIL the result will be OK if the test"
printf "$FAIL\t$TIMES\t$DO_TESTS_EXTRA\n";
cat $DIFF
fi
- #rm -f $LOG
- #rm -f $DIFF
+ if [ "$KEEP" != "1" ]; then
+ rm -f $LOG
+ rm -f $DIFF
+ fi
exit $RC
done
LOGTOOPT=/dev/null
LOGTOBYTE=/dev/null
export DO_TESTS_EXTRA="$MARK\t$@"
- make tests DO_TESTS_OPTS="-no-color -twice"
- make tests.opt DO_TESTS_OPTS="-no-color -twice"
+ make tests DO_TESTS_OPTS="-no-color -twice -keep-logs"
+ make tests.opt DO_TESTS_OPTS="-no-color -twice -keep-logs"
}
function compile {
%.opt:
$(H)$(MAKE) MATITAC='$(MATITACOPT)' MATITACLEAN='$(MATITACLEANOPT)' MATITADEP='$(MATITADEPOPT)' $(@:%.opt=%)
-clean:
+clean_:
+ rm -r __*not_for_matita
+
+clean: clean_
$(H)$(MATITACLEAN) $(SRC)
-cleanall:
+cleanall: clean_
$(H)rm -f $(SRC:%.ma=%.moo)
$(MATITACLEAN) all
%.opt:
$(H)$(MAKE) MATITAC='$(MATITACOPT)' MATITACLEAN='$(MATITACLEANOPT)' MATITADEP='$(MATITADEPOPT)' $(@:%.opt=%)
-clean:
+clean_:
+ rm -r __*not_for_matita
+
+clean: clean_
$(H)$(MATITACLEAN) $(SRC)
-cleanall:
+cleanall: clean_
$(H)rm -f $(SRC:%.ma=%.moo)
$(MATITACLEAN) all