aboutsummaryrefslogtreecommitdiffstats
path: root/test/ccured_olden/health/testit
blob: 6b943eaceb5d76fa4a1d78099dd50e4c1e0a5640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# test a health binary

if [ "$1" = "" ]; then
  echo "usage: $0 ./health.exe"
  exit
fi

# all of health's output is to stderr
echo "running: $1 5 500 1 1 2>output"
if ! $1 5 500 1 1 2>output; then
  echo "$1 failed directly"
  exit 2
fi

if ! diff out.orig output >out.diff 2>&1 ; then
  if ! diff out.orig.msvc output >/dev/null ; then 
    echo "$1 got the wrong answer. See out.diff"
    exit 4
  fi
fi

echo "$1 seems to work"
rm -f out.diff