]> git.pond.sub.org Git - empserver/blob - tests/fairland-test
Add fairland test to make check
[empserver] / tests / fairland-test
1 #!/bin/sh -e
2 # Basic fairland test
3
4 if [ $# -ne 1 ]
5 then echo "Usage: $0 SRCDIR" >&2; exit 1
6 fi
7
8 srcdir="$1"
9
10 . "$srcdir"/tests/test-common.sh
11
12 #
13 # Currently expected to work only with a random() that behaves exactly
14 # like the one on my development system.
15 #
16 if [ "`uname -s`" != "Linux" ]  # lame approx. of "random() behaves like mine"
17 then echo "Warning: fairland test not expected to work on this system!" >&2
18 fi
19
20 create_sandbox
21
22 exec 3>sandbox/fairland.out
23
24 src/util/files -e sandbox/etc/empire/econfig -f >&3
25 src/util/fairland -e sandbox/etc/empire/econfig -s sandbox/newcap_script -R 1 10 30 >&3
26
27 exec 3>&-
28
29 src/util/empdump -e sandbox/etc/empire/econfig -x >sandbox/fairland.xdump
30
31 cmp_out fairland.out fairland.xdump newcap_script