File: run-one-test

package info (click to toggle)
triplane 1.0.8-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 16,056 kB
  • sloc: cpp: 14,583; makefile: 93; sh: 29
file content (16 lines) | stat: -rw-r--r-- 410 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
set -e
triplane="$1"
testdir="$2"
tmptestdir="`mktemp -d --tmpdir triplane-testsuite.XXXXXXXXXX`"
(cd "$testdir"; cp -R . "$tmptestdir")

TRIPLANE_HOME="$tmptestdir" "$triplane" `cat "$tmptestdir/args"` > "$tmptestdir/output" || true

if ! cmp --quiet "$testdir/output.reference" "$tmptestdir/output"; then
    echo "Test failed. Please investigate $tmptestdir"
    exit 1
fi

rm -r "$tmptestdir"