1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
# A-A-P recipe for testing the Recipe Executive.
#
# This runs all tests.
# When an error is encountered, the testing stops and the next time it restarts
# with the same test (to be able to quickly check if it was fixed).
# When all tests pass successfully, the next time they are all run again.
# Thus after fixing an error and checking that it was fixed, you need to run
# the tests again to check for side effects on earlier tests.
UNITTEST = `sort_list(glob("unittest/*.py"))`
RECTEST = `sort_list(glob("rectest/*.py"))`
DONE = $*(UNITTEST).ut_done $*(RECTEST).rt_done
# Sometimes Python is called "python2" instead of "python". Use whatever we
# were started with.
@import sys
@PYTHON = sys.executable
# Run those tests that were not run since the last time. When they
# all succeed delete the ".done" files to start all over next time.
# Need to specify a sign directory, otherwise they go into "rectest/aap/sign"
# and overwrite what happens there for the tests!
testall {virtual}: $DONE {check = time} {signdirectory = .}
:print TESTS COMPLETED SUCCESSFULLY.
:del {quiet} $DONE
clean:
:del {force}{quiet} $DONE
# Every rectest is run in a new Python program. This avoids that one test has
# side effects on a following one.
:rule %.py.rt_done : %.py
:sys $PYTHON $source "$PYTHON"
:touch {force} $target
:rule %.py.ut_done : %.py
:sys {interactive} $PYTHON $source
:touch {force} $target
|