forked from wmbusmeters/wmbusmeters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·128 lines (90 loc) · 2.5 KB
/
test.sh
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/bin/sh
PROG="$1"
TESTINTERNAL=$(dirname $PROG)/testinternals
if [ ! -x $PROG ]
then
echo No such executable \"$PROG\"
exit 1
fi
$TESTINTERNAL
if [ "$?" = "0" ]; then
echo OK: test internals
fi
RC="0"
tests/test_c1_meters.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_t1_meters.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_s1_meters.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_unknown.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_apas.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_izars.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_aes.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_key_warnings.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_shell.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_shell2.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_meterfiles.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_config1.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_logfile.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_elements.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_listen_to_all.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_driver_detection.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_multiple_ids.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_conversions.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_fields.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_oneshot.sh $PROG broken test
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_wrongkeys.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_config4.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_linkmodes.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_additional_json.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_rtlwmbus.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_stdin_and_file.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_serial_bads.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
tests/test_ignore_duplicates.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
./tests/test_match_dll_and_tpl_id.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
if [ -x ../additional_tests.sh ]
then
(cd ..; ./additional_tests.sh)
fi
echo Slower tests...
tests/test_pipe.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
if [ "$(uname)" = "Linux" ]
then
tests/test_alarm.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
fi
if [ "$RC" = "0" ]
then
echo "All tests ok!"
else
echo "Some tests failed!"
fi
exit $RC