-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCHECKTEST
More file actions
executable file
·55 lines (48 loc) · 1.25 KB
/
CHECKTEST
File metadata and controls
executable file
·55 lines (48 loc) · 1.25 KB
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
# Paton Group Test Suite May 15 2019
test_dir='/projects/rpaton@colostate.edu/bin/EXAMPLE_JOBS'
if [ $# -eq 0 ]
then
echo "x No arguments supplied"
echo " Specify test no. (01, 02 etc) or 'all'"
test='none'
fi
if [ $# -ne 0 ]
then
test=$1
echo "o Runnning test jobs for" $test
fi
# for the tests below if the output files already exist then the job will be skipped
# if output exists then the job will be checked against example outputs to ensure it finished properly
echo -e ' CHECKING TEST JOBS\n'
checkfunction()
{
if [ -d $1 ]; then
cd $1
echo -e ' CHECKING' $1':'
if [ -f $2 ]; then
if grep -q $3 $2; then
echo -e 'o '$2' PASS! terminated normally'
else
echo 'x '$2' FAIL! terminated abnormally'
fi
else
echo 'x '$2' FAIL! File not found'
fi
cd ..
else echo 'x '$1' FAIL! Directory not found'
fi
}
# Gaussian 16 job
if [ "$test" == "01" ] || [ "$test" == "all" ]; then
eg_dir='example_01'
eg_file='gauss_example.log'
termination='Normal termination'
checkfunction $eg_dir $eg_file $termination
fi
# Orca job
if [ "$test" == "02" ] || [ "$test" == "all" ]; then
eg_dir='example_02'
eg_file='orca_example.out'
termination='ORCA TERMINATED NORMALLY'
checkfunction $eg_dir $eg_file $termination
fi