diff options
author | Erin van der Veen | 2017-11-27 13:20:41 +0100 |
---|---|---|
committer | Erin van der Veen | 2017-11-27 13:20:41 +0100 |
commit | 7e8b348d26cc1cf6366d7efabe8141a833f1dad5 (patch) | |
tree | 4ec4a0b3856b9d985efde81e6c974ec18b54941e /test/Makefile | |
parent | Fix merge problem (diff) | |
parent | Cleanup (diff) |
Merge branch '9-test-on-legal-games' into 'master'
Add Markov chain test case generator
Closes #9
See merge request eveen/Testing-Techniques!11
Diffstat (limited to 'test/Makefile')
-rw-r--r-- | test/Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..ba62dab --- /dev/null +++ b/test/Makefile @@ -0,0 +1,31 @@ +EXE:=Test +DEP:=ArbitraryMove +AUX:=$(addsuffix .o, $(EXE) $(DEP))\ + $(addsuffix .hi, $(EXE) $(DEP))\ + $(addsuffix .dyn_o, $(EXE) $(DEP))\ + $(addsuffix .dyn_hi,$(EXE) $(DEP)) +SRC:=$(addsuffix .hs,$(DEP)) +GHC:=ghc +GHCFLAGS:=-O -main-is Test.main +DATA:=dataset.pgn + +.PHONY=all run clean + +all: $(EXE) + +$(DATA): + for i in $$(seq 1000 1020); do wget -q http://www.theweekinchess.com/zips/twic$${i}g.zip; unzip -q twic$${i}g.zip; rm twic$${i}g.zip; done + cat twic*.pgn > $@ + $(RM) twic*.pgn + +run: $(EXE) $(DATA) + ./$(EXE) < $(DATA) + +$(EXE): %: %.hs $(SRC) + $(GHC) $(GHCFLAGS) $< -o $@ + +clean: + $(RM) $(EXE) $(AUX) + +distclean: clean + $(RM) $(DATA) |