From 120f6de605b9a431e3b084bfc34d7cf33b6c9905 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 11 Apr 2013 12:51:06 +0000 Subject: 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] --- Recipe | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Recipe') diff --git a/Recipe b/Recipe index 5d63ae5..1c2568b 100644 --- a/Recipe +++ b/Recipe @@ -205,3 +205,19 @@ PuzzleApplet.class: PuzzleApplet.java org echo '' >$*.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 -- cgit v1.1