-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsm_test.tester
executable file
·60 lines (48 loc) · 1.24 KB
/
sm_test.tester
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
#! /bin/csh -f
# sm_test: SM component test script
#
# DBHOME: This is the directory where dbcreate, redbase, and dbdestroy are
#
set DBHOME = .
#
# TESTSDIR: This is the directory where the files of test queries
# are.
#
set TESTSDIR = .
#
# This is the name of the data base we will be using for the tests.
#
set TESTDB = testdb
#
# This is the name of the output file we will use for the tests.
#
set OUTPUT = test.out
#
# Run the requested tests
#
#
# if no args given, then run all tests
#
if ( $#argv == 0 ) then
echo "SM layer test sequence" >! $OUTPUT
foreach queryfile ( `ls $TESTSDIR/sm_test.*` )
echo running test '#' $queryfile:e '****************' >> $OUTPUT
$DBHOME/dbcreate $TESTDB
$DBHOME/redbase $TESTDB < $queryfile >>& $OUTPUT
$DBHOME/dbdestroy $TESTDB
end
#
# otherwise, run just the specified tests
#
else
foreach testnum ( $* )
if ( -r $TESTSDIR/sm_test.$testnum ) then
echo running test '#' $testnum '****************' >> $OUTPUT
$DBHOME/dbcreate $TESTDB
$DBHOME/redbase $TESTDB < $TESTSDIR/sm_test.$testnum >>& $OUTPUT
$DBHOME/dbdestroy $TESTDB
else
echo I can not find a test number $testnum. >> $OUTPUT
endif
end
endif