File: shtest

package info (click to toggle)
pact 980714-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 13,096 kB
  • ctags: 26,034
  • sloc: ansic: 109,076; lisp: 9,645; csh: 7,147; fortran: 1,050; makefile: 136; lex: 95; sh: 32
file content (79 lines) | stat: -rwxr-xr-x 1,674 bytes parent folder | download
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/csh -f
#
# SHTEST - test SCHEME
#

set System = `../manager/system-id`
set BinDir = ../dev/$System/bin
set ERROR  = "FALSE"
set FAIL   = "NO"
set status = 0

source ../manager/env-$System

if (-e ../dev/$System/include/scheme.h) then

   touch test.error

   rm -f shtest.debug
   echo `../manager/pwhich pact` >& shtest.debug
   echo `../manager/pwhich cc` >>& shtest.debug
   echo "BinDir = $BinDir" >>& shtest.debug

   echo ""
   echo "SCHEME TEST..."

   echo ""
   echo -n "                    SCHEME Memory Test ....."
   $BinDir/scheme -l mmtst.scm > test.error
   if ($status != 0) then
      echo ""
      cat test.error
      echo "                         Memory Test Error"
      echo "                    SCHEME Memory Test ..... FAILED"
      set ERROR = "TRUE"
   else
      echo " PASSED"
   endif

if (!(-e ../manager/noipc)) then
   echo ""
   echo -n "                    SCHEME Proc Test ....."
   $BinDir/scheme -l shproc.scm > shproc.res
   diff shproc.res shproc.res.ref > shproc.res.diff
   set Files = `find . -name "shproc.res.diff" -size 4c -print`
   if ($#Files != 0) then
      echo ""
      echo "                    SCHEME Proc Test .....   FAILED"
      set ERROR = "TRUE"
   else
      echo "   PASSED"
   endif
   rm -f shproc.res.diff
endif

   rm test.error

   echo ""
   if ($ERROR == "TRUE") then
      echo ""
      echo "Debug:"
      cat shtest.debug
      echo ""
      echo "SCHEME TEST...FAILED"
   else
      echo "SCHEME TEST...PASSED"
   endif

   echo ""
   echo " --------------------------------------------------------"

endif

set xstatus = 0
if ($ERROR == "TRUE") then
   set xstatus = 1
endif

exit($xstatus)