File: runTests

package info (click to toggle)
frobby 0.9.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,616 kB
  • sloc: cpp: 30,134; sh: 1,184; makefile: 306; ansic: 102; lisp: 10
file content (64 lines) | stat: -rwxr-xr-x 1,121 bytes parent folder | download | duplicates (6)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash

if [ "$1" = "_few" ]; then
  testLevel="few";
  shift;
else
  testLevel="normal"
fi

TIMEFORMAT=$' (%2lR real)'

normalTests="euler alexdual hilbert_deform hilbert_bigatti hilbert_slice \
             dimension primdecom intersect assoprimes minimize \
             irrdecom radical frob maxstandard optimize"

specialTests="internal idealFormats polyFormats latticeFormats messages"
params="$*"

runNormalTests () {
  action="$1"; shift;
  path="$1"; shift;
  cd test/$path;
  ../testScripts/runtests $action $params
  if [ $? != 0 ]; then exit 1; fi
  cd ../..;
}

for t in $normalTests; do
  echo -n "$t "

  runNormalTests $t specialIdeals
  if [ "$testLevel" = "few" ]; then
    if [ "$t" != "frob" ]; then
      echo;
	  continue;
    fi
  fi

  runNormalTests $t commonIdeals

  runNormalTests $t frob

  if [ "$t" == "euler" ]; then
    runNormalTests $t bigIdeals
  fi

  if [ -e "$t" ]; then
    runNormalTests $t $t
  fi

  echo
done

for t in $specialTests;
do
  echo -n "$t "
  cd test/$t
  ./runtests $*
  if [ $? != 0 ]; then exit 1; fi
  echo
  cd ../..
done

echo "All normal tests passed."