mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 16:32:13 -07:00
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:
16
Recipe
16
Recipe
@ -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
|
||||
|
Reference in New Issue
Block a user