Introduce some extra testing and benchmarking command-line options to

the GTK front end, plus a 'make test' target in the GTK makefile which
uses them to automatically generate 100 puzzles for each game at each
preset configuration, test-run them back through the solver without
their aux_info to ensure that can cope, and produce an HTML box plot
of game generation times for each preset.

As part of this work I've removed the TESTSOLVE mechanism from r9549,
since the new --test-solve option does the same thing better (in that
when something goes wrong it prints the random seed that caused the
problem).

[originally from svn r9825]
[r9549 == 5a095b8a08fa9f087b93c86aea0fa027138b028d]
This commit is contained in:
Simon Tatham
2013-04-11 12:51:06 +00:00
parent ed82ef5c0e
commit 120f6de605
4 changed files with 260 additions and 53 deletions

16
Recipe
View File

@ -205,3 +205,19 @@ PuzzleApplet.class: PuzzleApplet.java org
echo '<applet archive="'$@'" code="PuzzleApplet" width="700" height="500"></applet>' >$*.html
mv PuzzleEngine.class $<
!end
# A benchmarking and testing target for the GTK puzzles.
!begin gtk
test: benchmark.html benchmark.txt
benchmark.html: benchmark.txt benchmark.pl
./benchmark.pl benchmark.txt > $@
benchmark.txt: $(GAMES)
for i in $(GAMES); do \
for params in $$(env -i ./$(BINPREFIX)$$i --list-presets | cut -f1 -d' '); do \
env -i ./$(BINPREFIX)$$i --test-solve --time-generation --generate 100 $$params \
|| exit 1; \
done; \
done > $@
!end