mirror of
https://github.com/chocolate-doom/quickcheck.git
synced 2024-11-21 20:11:15 +00:00
c8824b131a
Instead of having the test runner do the extraction, make can do it for us. This allows for better parallelization. It also lets the WADs be extracted separately (and potentially modified) before the tests are run; I'm planning to reuse this for wadptr so that I can test WADs play back as intended after being compressed.
28 lines
524 B
Bash
Executable file
28 lines
524 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
ORIGDIR=$PWD
|
|
tmp=$(mktemp -d)
|
|
cleanup() {
|
|
rm -rf "$tmp"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
export SDL_VIDEODRIVER=dummy
|
|
|
|
export DOOMWADDIR=$PWD/extract
|
|
|
|
$SOURCE_PORT -iwad miniwad.wad \
|
|
-mb 24 \
|
|
-nodraw -noblit -nosound -noautoload -nogui -nograbmouse \
|
|
-statdump $tmp/statdump.txt \
|
|
"$@" >$tmp/log.txt 2>&1 || true
|
|
|
|
if [ ! -e $tmp/statdump.txt ]; then
|
|
(echo "No statdump output produced."; cat $tmp/log.txt) >/dev/stderr
|
|
exit 1
|
|
else
|
|
cat $tmp/statdump.txt
|
|
fi
|
|
|