summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-01 01:06:09 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-01 01:06:41 -0400
commita2f9b42f27cda7b00084d8c7cfbcb7d7bcbc0c9f (patch)
tree20bc2d60ae6f32a4bf567924f6388d3187e11103 /Makefile.am
parent8ec9434a1a5e345077d6980e784d47f36483a224 (diff)
Several improvements to how tests are run.
First, if the user hasn't downloaded the monster test database, we just run a simple test of 400 historical games. Second, you can specify the variables START and COUNT on the command line, for running just a part of the huge database.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 5d0ce08..711161b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,12 +67,12 @@ chess-eco.fen: chess-eco.pos chess-eco.el
chess-eco.pos chess-eco.fen
TESTS = chess-test
-DATABASE = test/largedb
-START =
-FINISH =
+DATABASE = $(shell test -r test/largedb.sg3 && echo test/largedb || echo test/historic.pgn)
+START = $(shell test -r test/largedb.sg3 && perl -e 'print int(rand(4000000)), "\n";' || echo 1)
+COUNT = 100000
-chess-test: Makefile
- echo "$(EMACS) -batch -L $(srcdir) -l chess-test.el -f chess-test '$(DATABASE)' $(START) $(FINISH)" > $@
+chess-test:
+ echo "$(EMACS) -batch -L $(srcdir) -l chess-test.el -f chess-test '$(DATABASE)' $(START) $(COUNT); rm -f $(top_builddir)/chess-test" > $@
chmod u+x $@
TAGS: $(dist_lisp_LISP)