File: run_tests

package info (click to toggle)
adolc 2.7.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,496 kB
  • sloc: cpp: 40,481; ansic: 19,390; sh: 4,277; makefile: 551; python: 486
file content (59 lines) | stat: -rwxr-xr-x 1,447 bytes parent folder | download | duplicates (5)
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
##############################################################################
## run_unitTest
## Revision: $Id$
##
## Copyright (C) Andrea Walther
##
## This file is part of ADOL-C. This software is provided as open source.
## Any use, reproduction, or distribution of the software constitutes 
## recipient's acceptance of the terms of the accompanying license file.
## 
##############################################################################

srcdir="."

retval=0

echo " "
echo Running tests...
echo " "

echo Testing  powexam...
./powexam >tmpfile 2>&1
grep "TEST PASSED" tmpfile 1>/dev/null 2>&1
if test $? = 0; then
  echo " "
  echo "    Test passed!"
  echo " "
else
  retval=-1
  echo " "
  echo " ---- 8< ---- Start of test program output ---- 8< ----"
  cat tmpfile
  echo " ---- 8< ----  End of test program output  ---- 8< ----"
  echo " "
  echo "    ******** Test FAILED! ********"
  echo "Output of the test program is above."
fi
rm -rf tmpfile

echo Testing speelpenning...
./speelpenning >tmpfile 2>&1
grep "TEST PASSED" tmpfile 1>/dev/null 2>&1
if test $? = 0; then
  echo " "
  echo "    Test passed!"
  echo " "
else
  retval=-1
  echo " "
  echo " ---- 8< ---- Start of test program output ---- 8< ----"
  cat tmpfile
  echo " ---- 8< ----  End of test program output  ---- 8< ----"
  echo " "
  echo "    ******** Test FAILED! ********"
  echo "Output of the test program is above."
fi
rm -rf tmpfile 

exit $retval