| 1 |
#!/bin/sh |
| 2 |
set -e |
| 3 |
# XX hardcoding the location of fake_pty here is non-ideal |
| 4 |
CRAWL_PTY="util/fake_pty ${CRAWL:-timeout --foreground 655 ./crawl -seed 1 -no-save -name test -wizard -no-throttle -extra-opt-first 'tile_skip_title=true'}" |
| 5 |
CRAWL=${CRAWL:-timeout --foreground 655 ./crawl -seed 1 -headless -no-save -name test -wizard -no-throttle} |
| 6 |
|
| 7 |
run_one() |
| 8 |
{ |
| 9 |
case "$*" in |
| 10 |
1|woken_rest) |
| 11 |
echo "rc: test/stress/woken_rest.rc" 1>&2 |
| 12 |
$CRAWL_PTY -rc test/stress/woken_rest.rc -sprint -sprint-map dungeon_sprint_1 |
| 13 |
;; |
| 14 |
2|unwoken_rest) |
| 15 |
echo "rc: test/stress/unwoken_rest.rc" 1>&2 |
| 16 |
$CRAWL_PTY -rc test/stress/unwoken_rest.rc -sprint -sprint-map dungeon_sprint_1 |
| 17 |
;; |
| 18 |
3|fireworks) |
| 19 |
echo "rc: test/stress/fireworks.rc" 1>&2 |
| 20 |
$CRAWL_PTY -rc test/stress/fireworks.rc |
| 21 |
;; |
| 22 |
4|cerebov) |
| 23 |
echo "arena: cerebov v test spawner delay:0" 1>&2 |
| 24 |
$CRAWL_PTY -arena 'cerebov v test spawner delay:0' |
| 25 |
;; |
| 26 |
5|pan_lords) |
| 27 |
echo "arena: cerebov, lom lobon, mnoleg, gloorx vloq v ereshkigal, asmodeus, antaeus, dispater delay:0 t:6" 1>&2 |
| 28 |
$CRAWL_PTY -arena 'cerebov, lom lobon, mnoleg, gloorx vloq v ereshkigal, asmodeus, antaeus, dispater delay:0 t:6' |
| 29 |
;; |
| 30 |
6|miscasts) |
| 31 |
echo "arena: miscasts 5 pandemonium lord v 20 20-headed hydra delay:0 t:10" 1>&2 |
| 32 |
$CRAWL_PTY -arena 'miscasts 5 pandemonium lord v 20 20-headed hydra delay:0 t:10' |
| 33 |
;; |
| 34 |
7|kraken) |
| 35 |
echo "arena: kraken v spectral kraken arena:small_deep_pool delay:0 t:20" 1>&2 |
| 36 |
$CRAWL_PTY -arena 'kraken v spectral kraken arena:small_deep_pool delay:0 t:20' |
| 37 |
;; |
| 38 |
8|spectral) |
| 39 |
echo "arena: ghost crab v ghost crab arena:small_deep_pool delay:0 t:20" 1>&2 |
| 40 |
$CRAWL_PTY -arena 'ghost crab v ghost crab arena:small_deep_pool delay:0 t:20' |
| 41 |
;; |
| 42 |
9|abyss_rest) |
| 43 |
echo "rc: test/stress/abyss_short_wait.rc" 1>&2 |
| 44 |
$CRAWL_PTY -rc test/stress/abyss_short_wait.rc |
| 45 |
;; |
| 46 |
10|abyss_walk) |
| 47 |
echo "rc: test/stress/abyss_short_run.rc" 1>&2 |
| 48 |
$CRAWL_PTY -rc test/stress/abyss_short_run.rc |
| 49 |
;; |
| 50 |
11|qw) |
| 51 |
echo "rc: test/stress/qw.rc" 1>&2 |
| 52 |
$CRAWL_PTY -rc test/stress/qw.rc |
| 53 |
;; |
| 54 |
12|orcs) |
| 55 |
echo "arena: 99 orc v Royal Jelly delay:0" 1>&2 |
| 56 |
$CRAWL -arena '99 orc v Royal Jelly delay:0' |
| 57 |
;; |
| 58 |
test) # Not in "all". |
| 59 |
echo "crawl -test" 1>&2 |
| 60 |
$CRAWL -test |
| 61 |
;; |
| 62 |
*) |
| 63 |
echo "No such test." 1>&2 |
| 64 |
exit 1 |
| 65 |
esac |
| 66 |
} |
| 67 |
|
| 68 |
if [ "$*" = "all" ] |
| 69 |
then |
| 70 |
for x in 1 2 3 4 5 6 7 8 9 10 12; do run_one "$x";done |
| 71 |
exit $? |
| 72 |
elif [ "$*" = "nonwiz" ] |
| 73 |
then |
| 74 |
# only run the tests that don't require wizmode |
| 75 |
for x in 4 5 6 7 8 12; do run_one "$x";done |
| 76 |
exit $? |
| 77 |
fi |
| 78 |
|
| 79 |
for x in "$@"; do run_one "$x";done |