File: mltest

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 (103 lines) | stat: -rwxr-xr-x 2,124 bytes parent folder | download | duplicates (2)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/csh -f
#
# MLTEST - test PML
#

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/pml.h) then

   touch test.error

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

   echo ""
   echo "PML TEST..."

   echo ""
   echo  -n "                    PML Matrix Test ....."

   pact matrix >& test.error
   if ($status != 0) then
      echo ""
      cat test.error
      echo "                         Can't build PML Matrix Test Program"
      set FAIL = "YES"
   else
      $BinDir/mlmtrt >& mlmtrt.res
      if ($status != 0) then
        echo ""
        echo "                         Error in Matrix Test program"
        set FAIL = "YES"
      endif
      rm mlmtrt.res
   endif

   if ($FAIL == "YES") then
      echo "                    PML Matrix Test ..... FAILED"
      set ERROR = "TRUE"
   else
      echo " PASSED"
   endif

   echo ""
   echo -n "                    PML Solver Test ....."

   set FAIL = "NO"
   pact icsolv >& test.error
   if ($status != 0) then
      echo ""
      cat test.error
      echo "                         Can't build PML Solver Test Program"
      set FAIL = "YES"
   else
      $BinDir/mlicts >& mlicts.res
      if ($status != 0) then
         echo ""
         echo "                         Error in Solver Test Program"
         set FAIL = "YES"
      endif
      rm mlicts.res
   endif

   if ($FAIL == "YES") then
      echo "                    PML Solver Test ..... FAILED"
      set ERROR = "TRUE"
   else
      echo " PASSED"
   endif

   rm test.error

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

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

endif

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

exit($xstatus)