diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-09-17 16:23:10 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-09-17 18:36:06 +0200 |
commit | 63922d78637766580b8fb38e19139c627b01dc55 (patch) | |
tree | bd9a56ede92a2c5c9baab24650897ce5c9bac31c /crawl-ref/source/Makefile | |
parent | 1be7ff606b0340eef754d415d0a85c90ac0f7547 (diff) | |
download | crawl-ref-63922d78637766580b8fb38e19139c627b01dc55.tar.gz crawl-ref-63922d78637766580b8fb38e19139c627b01dc55.zip |
A tool to run multiple tests concurrently, or without a terminal.
Merely redirecting stdout to /dev/null is not enough: Crawl and ncurses
insist to be able to ioctl the terminal, check the window size, try to read
from stdin and fail if it's in eof state, etc. Eliminating all such
references would be quite a bit of work (ncurses assumes stdin/stdout are
always a terminal even if newterm() is used), and would be probably too
intrusive to be a faithful test.
Because of no autoconf, the pty code is not very portable, but should work
on Linux and BSD (hopefully including MacOS X). For a portable
implementation, one could use http://angband.pl/svn/kbtin/trunk/run.c (+
autoconfage), but then, probably running on IRIX, pre-Solaris SunOS, HP UX
or SCO isn't that important... and there are no real ptys on Windows.
Diffstat (limited to 'crawl-ref/source/Makefile')
-rw-r--r-- | crawl-ref/source/Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile index 1a101d0349..b7566e168f 100644 --- a/crawl-ref/source/Makefile +++ b/crawl-ref/source/Makefile @@ -1735,3 +1735,15 @@ mac-app-tiles: all mac-app-console: all +$(MAKE) -j1 -C mac -f Makefile.app-bundle + +############################################################################# +# Canned tests +# + +tests: $(foreach i, 1 2 3 4 5 6 7, test-$(i)) + +test-%: $(GAME) util/fake_pty + util/fake_pty test/stress/run $* + +util/fake_pty: util/fake_pty.c + $(if $(HOSTCC),$(HOSTCC),$(CC)) -Wall $< -o $@ -lutil |