]> git.pond.sub.org Git - empserver/blobdiff - tests/smoke-test
Switch PRNG from BSD random() to Mersenne Twister
[empserver] / tests / smoke-test
index 670eebadacc1092d5c75de449eca4b4f4613017e..3eb036b0b6cd70d531febc22aff3cef10ba2fafc 100755 (executable)
@@ -10,21 +10,16 @@ srcdir="$1"
 . "$srcdir"/tests/test-common.sh
 
 #
-# Currently expected to work only with thread package LWP and a
-# random() that behaves exactly like the one on my development system,
-# because:
+# Currently expected to work only with thread package LWP, because:
 # 
 # - Thread scheduling is reliably deterministic only with LWP
-# - The PRN sequence produced by random() isn't portable
 # - Shell builtin kill appears not to do the job in MinGW
 # - The Windows server tries to run as service when -d isn't
 #   specified
 #
 # TODO address these shortcomings.
 #
-if [ "`uname -s`" != "Linux" ] # lame approx. of "random() behaves like mine"
-then echo "Warning: smoke test not expected to work on this system!" >&2
-elif [ `sed -n 's/empthread *:= *\(.*\)/\1/p' <GNUmakefile` != LWP ]
+if [ `sed -n 's/empthread *:= *\(.*\)/\1/p' <GNUmakefile` != LWP ]
 then echo "Warning: smoke test not expected to work with this thread package!" >&2
 fi
 
@@ -34,9 +29,9 @@ exec 3>sandbox/smoke.out
 
 # Create world and start server
 src/util/files -e sandbox/etc/empire/econfig -f >&3
-src/util/fairland -e sandbox/etc/empire/econfig -q -s sandbox/newcap_script -R 1 10 30
+src/util/empdump -e sandbox/etc/empire/econfig -i "$srcdir"/tests/smoke/fairland.xdump
 start_server
-src/client/empire POGO peter <sandbox/newcap_script >/dev/null
+src/client/empire POGO peter <"$srcdir"/tests/smoke/newcap_script >/dev/null
 
 # Feed player input
 need_update=