From d2330eac16314c897cf76785a5173552477eac28 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Fri, 5 Jul 2013 23:50:16 +0200 Subject: 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. --- crawl-ref/source/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/Makefile') 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 -- cgit v1.2.3-54-g00ecf