-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmk_test
More file actions
executable file
·70 lines (58 loc) · 1.34 KB
/
mk_test
File metadata and controls
executable file
·70 lines (58 loc) · 1.34 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
# MK_TEST
# Make a test compilation program for GRAFFER and run it.
#
# Usage:
# mk_test [-i] [-c cmd]
#
# By default GDL is used, if the '-i' option is given, then use IDL
# instead.
function usage {
echo "$(basename $0): Generates and runs a script to test that"
echo 'all of the routines in Graffer compile correctly.'
echo
echo 'Usage:'
echo "$(basename $0) [-idh] [-c cmd]"
echo ' -i Uses IDL rather than GDL for the compilations.'
echo ' -d Deletes the test_compile.pro script after running.'
echo ' -c cmd Use cmd as the IDL/GDL command.'
echo ' -h Prints this help info.'
}
ccmd='gdl'
del=''
options=":idhc:"
while getopts ${options} thisopt
do
case ${thisopt} in
i) ccmd='idl' ;;
d) del='yes' ;;
c) ccmd=${OPTARG} ;;
h)
usage
exit ;;
?)
echo "Invalid option: -${OPTARG}"
echo
usage
exit 1 ;;
esac
done
# Must delete any existing script as it will be appended
if [ -f test_compile.pro ]
then
rm test_compile.pro
fi
for dir in definitions lib plotlib tools widgets utils gui ;
do
for file in ${dir}/*.pro ;
do
echo "print, '$file'" >> test_compile.pro
echo ".r ${file%.pro}" >> test_compile.pro
done
done
echo "exit" >> test_compile.pro
${ccmd} ./test_compile.pro
if [ "${del}" == "yes" ]
then
rm ./test_compile.pro
fi