mirror of
https://github.com/chocolate-doom/quickcheck.git
synced 2024-11-21 20:11:15 +00:00
28 lines
532 B
Bash
Executable file
28 lines
532 B
Bash
Executable file
#!/usr/bin/env 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
|
|
|