2020-04-21 10:40:25 +00:00
|
|
|
#!/bin/sh
|
2018-03-05 10:29:25 +00:00
|
|
|
|
|
|
|
PROG="$1"
|
2019-01-01 20:04:06 +00:00
|
|
|
TESTINTERNAL=$(dirname $PROG)/testinternals
|
|
|
|
|
2020-09-18 19:37:59 +00:00
|
|
|
if [ ! -x $PROG ]
|
|
|
|
then
|
|
|
|
echo No such executable \"$PROG\"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-01-01 20:04:06 +00:00
|
|
|
$TESTINTERNAL
|
|
|
|
if [ "$?" = "0" ]; then
|
2019-11-03 21:00:18 +00:00
|
|
|
echo OK: test internals
|
2019-01-01 20:04:06 +00:00
|
|
|
fi
|
2019-11-03 21:00:18 +00:00
|
|
|
RC="0"
|
2018-03-05 10:29:25 +00:00
|
|
|
|
2019-02-23 17:30:16 +00:00
|
|
|
tests/test_c1_meters.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-02-23 17:30:16 +00:00
|
|
|
tests/test_t1_meters.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-01-26 16:17:29 +00:00
|
|
|
tests/test_s1_meters.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2022-01-13 09:39:44 +00:00
|
|
|
tests/test_mbus.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2022-01-13 09:59:50 +00:00
|
|
|
tests/test_anyid.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2022-01-27 10:36:26 +00:00
|
|
|
./tests/test_list_envs.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2022-01-06 17:28:22 +00:00
|
|
|
#tests/test_unknown.sh $PROG
|
|
|
|
#if [ "$?" != "0" ]; then RC="1"; fi
|
2020-09-04 09:31:49 +00:00
|
|
|
|
2020-02-18 06:41:31 +00:00
|
|
|
tests/test_apas.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-02-07 07:27:01 +00:00
|
|
|
tests/test_izars.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2020-01-23 11:59:22 +00:00
|
|
|
tests/test_aes.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-01-06 11:46:37 +00:00
|
|
|
tests/test_key_warnings.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-02-23 17:30:16 +00:00
|
|
|
tests/test_shell.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-05-21 12:19:54 +00:00
|
|
|
tests/test_shell2.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-02-23 17:30:16 +00:00
|
|
|
tests/test_meterfiles.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-02-23 20:21:17 +00:00
|
|
|
tests/test_config1.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-02-24 14:20:55 +00:00
|
|
|
tests/test_logfile.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-04-04 06:36:22 +00:00
|
|
|
tests/test_elements.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-02-28 15:53:09 +00:00
|
|
|
tests/test_listen_to_all.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2020-11-11 16:29:20 +00:00
|
|
|
tests/test_driver_detection.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-03-05 20:19:05 +00:00
|
|
|
tests/test_multiple_ids.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-05-04 14:27:37 +00:00
|
|
|
tests/test_conversions.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2020-05-09 21:43:30 +00:00
|
|
|
tests/test_fields.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2020-09-08 20:11:32 +00:00
|
|
|
tests/test_oneshot.sh $PROG broken test
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
2019-11-03 21:00:18 +00:00
|
|
|
|
2019-05-04 20:01:38 +00:00
|
|
|
tests/test_wrongkeys.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-05-04 20:39:45 +00:00
|
|
|
tests/test_config4.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-06-06 15:28:20 +00:00
|
|
|
tests/test_linkmodes.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-10-20 17:19:17 +00:00
|
|
|
tests/test_additional_json.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2020-10-07 19:40:33 +00:00
|
|
|
tests/test_rtlwmbus.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
2019-11-03 21:00:18 +00:00
|
|
|
|
2019-11-03 15:31:30 +00:00
|
|
|
tests/test_stdin_and_file.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2019-11-03 15:31:30 +00:00
|
|
|
tests/test_serial_bads.sh $PROG
|
2019-11-03 21:00:18 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2020-10-25 19:57:25 +00:00
|
|
|
tests/test_ignore_duplicates.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-01-30 16:58:00 +00:00
|
|
|
./tests/test_match_dll_and_tpl_id.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-08-01 16:24:19 +00:00
|
|
|
./tests/test_unix_timestamp.sh $PROG
|
2022-01-08 14:55:53 +00:00
|
|
|
if [ "$?" != "0" ]; then
|
|
|
|
# This can spuriously fail if it crosses a second change...
|
|
|
|
# Lets try again.
|
|
|
|
./tests/test_unix_timestamp.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then
|
|
|
|
RC="1";
|
|
|
|
fi
|
|
|
|
fi
|
2021-08-01 16:24:19 +00:00
|
|
|
|
2021-03-13 08:08:17 +00:00
|
|
|
./tests/test_log_timestamps.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-08-27 06:45:37 +00:00
|
|
|
./tests/test_meter_extras.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-09-12 08:40:40 +00:00
|
|
|
./tests/test_hex_cmdline.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-11-08 19:12:21 +00:00
|
|
|
./tests/test_removing_dll_crcs.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-11-06 19:30:09 +00:00
|
|
|
./tests/test_broken.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-12-29 17:53:54 +00:00
|
|
|
./tests/test_rtlwmbus_crc_errors.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2022-01-06 17:28:22 +00:00
|
|
|
./tests/test_drivers.sh $PROG
|
2021-12-07 22:56:29 +00:00
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2022-01-06 17:28:22 +00:00
|
|
|
#./tests/test_analyze.sh $PROG
|
|
|
|
#if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2021-01-30 21:35:59 +00:00
|
|
|
if [ -x ../additional_tests.sh ]
|
|
|
|
then
|
2021-08-08 14:50:25 +00:00
|
|
|
(cd ..; ./additional_tests.sh $PROG)
|
2021-01-30 21:35:59 +00:00
|
|
|
fi
|
|
|
|
|
2021-01-30 16:58:00 +00:00
|
|
|
echo Slower tests...
|
|
|
|
|
2020-11-11 18:29:00 +00:00
|
|
|
tests/test_pipe.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
|
2020-09-18 18:05:59 +00:00
|
|
|
if [ "$(uname)" = "Linux" ]
|
|
|
|
then
|
|
|
|
tests/test_alarm.sh $PROG
|
|
|
|
if [ "$?" != "0" ]; then RC="1"; fi
|
|
|
|
fi
|
2020-08-01 19:56:46 +00:00
|
|
|
|
2020-11-11 20:44:50 +00:00
|
|
|
if [ "$RC" = "0" ]
|
|
|
|
then
|
|
|
|
echo "All tests ok!"
|
|
|
|
else
|
|
|
|
echo "Some tests failed!"
|
|
|
|
fi
|
|
|
|
|
2019-11-03 21:00:18 +00:00
|
|
|
exit $RC
|