summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/Makefile
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-07-05 23:50:16 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-07-06 00:58:20 +0200
commitd2330eac16314c897cf76785a5173552477eac28 (patch)
tree2305efca2175f33637eaaa3a88ec64b32f7742cf /crawl-ref/source/Makefile
parent428ed1d0dc58e855d2b597d82271bac335015a95 (diff)
downloadcrawl-ref-d2330eac16314c897cf76785a5173552477eac28.tar.gz
crawl-ref-d2330eac16314c897cf76785a5173552477eac28.zip
Make "make test" work around a severe race condition wrt --builddb.
It can happen on actual servers, too -- if two players start their games at the same time, being the first after an upgrade. The time window is fortunately small enough so it didn't happen yet; make -j triggers the failure apparently every time, though.
Diffstat (limited to 'crawl-ref/source/Makefile')
-rw-r--r--crawl-ref/source/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile
index 9c9e022904..4428e0e975 100644
--- a/crawl-ref/source/Makefile
+++ b/crawl-ref/source/Makefile
@@ -1655,9 +1655,14 @@ android:
TESTS=test woken_rest unwoken_rest fireworks cerebov pan_lords miscasts kraken
test: $(foreach i, $(TESTS), test-$(i))
-test-%: $(GAME) util/fake_pty
+test-%: $(GAME) util/fake_pty builddb
util/fake_pty test/stress/run $*
@echo "Finished: $*"
util/fake_pty: util/fake_pty.c
$(if $(HOSTCC),$(HOSTCC),$(CC)) -Wall $< -o $@ -lutil
+
+# Should be not needed, but the race condition in bug #6509 is hard to fix.
+builddb: $(GAME)
+ ./$(GAME) --builddb
+.PHONY: builddb