RELEASE/1.0RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | |
|---|
| 3 | testdir=`echo $0 | sed 's!/[^/]*$!!' || echo '.'` |
|---|
| 4 | |
|---|
| 5 | # allow us to run tests standalone more easily |
|---|
| 6 | : ${srcdir="$testdir"} |
|---|
| 7 | |
|---|
| 8 | # force VERBOSE if we're run on a subset of tests |
|---|
| 9 | #test -n "$*" && VERBOSE=1 |
|---|
| 10 | |
|---|
| 11 | test -x "$testdir"/../src/cavern || testdir=. |
|---|
| 12 | |
|---|
| 13 | : ${CAVERN="$testdir"/../src/cavern} |
|---|
| 14 | : ${CAVERN_ORIG=cavern} |
|---|
| 15 | : ${DIFFPOS="$testdir"/../src/diffpos} |
|---|
| 16 | |
|---|
| 17 | : ${TESTS=${*-""}} |
|---|
| 18 | |
|---|
| 19 | for file in $TESTS ; do |
|---|
| 20 | |
|---|
| 21 | if test -n "$file" ; then |
|---|
| 22 | echo "$file" |
|---|
| 23 | rm -f tmp.* tmp_orig.* |
|---|
| 24 | if test -n "$VERBOSE" ; then |
|---|
| 25 | $CAVERN_ORIG $file --output=tmp_orig | tee tmp_orig.out || exit 1 |
|---|
| 26 | $CAVERN $file --output=tmp | tee tmp.out || exit 1 |
|---|
| 27 | else |
|---|
| 28 | $CAVERN_ORIG $file --output=tmp_orig > tmp_orig.out || exit 1 |
|---|
| 29 | $CAVERN $file --output=tmp > tmp.out || exit 1 |
|---|
| 30 | fi |
|---|
| 31 | warn_orig=`sed '$!d;$s/^Done.*/0/;s/[^0-9]*\([0-9]*\).*/\1/' tmp_orig.out` |
|---|
| 32 | warn=`sed '$!d;$s/^Done.*/0/;s/[^0-9]*\([0-9]*\).*/\1/' tmp.out` |
|---|
| 33 | if test x"$warn_orig" != x"$warn" ; then |
|---|
| 34 | echo "$CAVERN_ORIG gave $warn_orig warning(s)" |
|---|
| 35 | echo "$CAVERN gave $warn warning(s)" |
|---|
| 36 | exit 1 |
|---|
| 37 | fi |
|---|
| 38 | if test -n "$VERBOSE" ; then |
|---|
| 39 | $DIFFPOS tmp.3d tmp_orig.3d || exit 1 |
|---|
| 40 | else |
|---|
| 41 | $DIFFPOS tmp.3d tmp_orig.3d > /dev/null || exit 1 |
|---|
| 42 | fi |
|---|
| 43 | fi |
|---|
| 44 | done |
|---|
| 45 | test -n "$VERBOSE" && echo "Test passed" |
|---|
| 46 | exit 0 |
|---|
Note: See
TracBrowser
for help on using the repository browser.