Alexander Huemer | 7b6673f | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 1 | SUBDIRS = \ |
Harald Welte | 2483f1b | 2016-06-19 18:06:02 +0200 | [diff] [blame] | 2 | sms_queue \ |
Neels Hofmeyr | 6a29d32 | 2017-01-25 15:04:16 +0100 | [diff] [blame] | 3 | msc_vlr \ |
Vadim Yanitskiy | e1e7247 | 2019-04-09 16:55:44 +0700 | [diff] [blame] | 4 | db_sms \ |
Neels Hofmeyr | eef4578 | 2019-10-21 03:24:04 +0200 | [diff] [blame] | 5 | sdp_msg \ |
Neels Hofmeyr | b455205 | 2019-10-21 03:00:26 +0200 | [diff] [blame] | 6 | mncc \ |
Oliver Smith | f543548 | 2023-07-06 12:55:36 +0200 | [diff] [blame] | 7 | csd \ |
Alexander Huemer | 7b6673f | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 8 | $(NULL) |
Philipp | 22611be | 2016-08-10 12:08:03 +0200 | [diff] [blame] | 9 | |
Holger Hans Peter Freyther | a7328a5 | 2013-07-13 17:09:56 +0200 | [diff] [blame] | 10 | if BUILD_SMPP |
Alexander Huemer | 7b6673f | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 11 | SUBDIRS += \ |
| 12 | smpp \ |
| 13 | $(NULL) |
Holger Hans Peter Freyther | a7328a5 | 2013-07-13 17:09:56 +0200 | [diff] [blame] | 14 | endif |
Holger Hans Peter Freyther | 6c88217 | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 15 | |
| 16 | # The `:;' works around a Bash 3.2 bug when the output is not writeable. |
Holger Hans Peter Freyther | 93ef33e | 2012-01-09 22:53:04 +0100 | [diff] [blame] | 17 | $(srcdir)/package.m4: $(top_srcdir)/configure.ac |
Holger Hans Peter Freyther | 6c88217 | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 18 | :;{ \ |
| 19 | echo '# Signature of the current package.' && \ |
| 20 | echo 'm4_define([AT_PACKAGE_NAME],' && \ |
| 21 | echo ' [$(PACKAGE_NAME)])' && \ |
| 22 | echo 'm4_define([AT_PACKAGE_TARNAME],' && \ |
| 23 | echo ' [$(PACKAGE_TARNAME)])' && \ |
| 24 | echo 'm4_define([AT_PACKAGE_VERSION],' && \ |
| 25 | echo ' [$(PACKAGE_VERSION)])' && \ |
| 26 | echo 'm4_define([AT_PACKAGE_STRING],' && \ |
| 27 | echo ' [$(PACKAGE_STRING)])' && \ |
| 28 | echo 'm4_define([AT_PACKAGE_BUGREPORT],' && \ |
| 29 | echo ' [$(PACKAGE_BUGREPORT)])'; \ |
| 30 | echo 'm4_define([AT_PACKAGE_URL],' && \ |
| 31 | echo ' [$(PACKAGE_URL)])'; \ |
Holger Hans Peter Freyther | 03ff1c8 | 2012-01-09 21:49:47 +0100 | [diff] [blame] | 32 | } >'$(srcdir)/package.m4' |
Holger Hans Peter Freyther | 6c88217 | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 33 | |
Alexander Huemer | 7b6673f | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 34 | EXTRA_DIST = \ |
| 35 | testsuite.at \ |
| 36 | $(srcdir)/package.m4 \ |
| 37 | $(TESTSUITE) \ |
| 38 | vty_test_runner.py \ |
| 39 | ctrl_test_runner.py \ |
| 40 | smpp_test_runner.py \ |
Neels Hofmeyr | 0ebc911 | 2024-02-04 03:21:49 +0100 | [diff] [blame] | 41 | $(srcdir)/*.vty \ |
Alexander Huemer | 7b6673f | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 42 | $(NULL) |
| 43 | |
Holger Hans Peter Freyther | 03ff1c8 | 2012-01-09 21:49:47 +0100 | [diff] [blame] | 44 | TESTSUITE = $(srcdir)/testsuite |
Alexander Huemer | 7b6673f | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 45 | |
| 46 | DISTCLEANFILES = \ |
| 47 | atconfig \ |
| 48 | $(NULL) |
Holger Hans Peter Freyther | 6c88217 | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 49 | |
Holger Hans Peter Freyther | dd588ae | 2014-08-22 00:29:04 +0200 | [diff] [blame] | 50 | if ENABLE_EXT_TESTS |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 51 | # don't run multiple tests concurrently so that the ports don't conflict |
Vadim Yanitskiy | 5d0bc33 | 2023-03-29 19:43:35 +0700 | [diff] [blame] | 52 | python-tests: |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 53 | $(MAKE) vty-test |
| 54 | $(MAKE) ctrl-test |
Holger Hans Peter Freyther | ed0d4f6 | 2014-03-06 23:43:13 +0100 | [diff] [blame] | 55 | if BUILD_SMPP |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 56 | $(MAKE) smpp-test |
Holger Hans Peter Freyther | ed0d4f6 | 2014-03-06 23:43:13 +0100 | [diff] [blame] | 57 | endif |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 58 | |
Katerina Barone-Adesi | e0aee7a | 2013-04-05 17:36:09 +0200 | [diff] [blame] | 59 | else |
Vadim Yanitskiy | 5d0bc33 | 2023-03-29 19:43:35 +0700 | [diff] [blame] | 60 | python-tests: |
Katerina Barone-Adesi | e0aee7a | 2013-04-05 17:36:09 +0200 | [diff] [blame] | 61 | echo "Not running python-based tests (determined at configure-time)" |
| 62 | endif |
| 63 | |
Vadim Yanitskiy | 5d0bc33 | 2023-03-29 19:43:35 +0700 | [diff] [blame] | 64 | vty-python-test: $(top_builddir)/src/osmo-msc/osmo-msc |
Oliver Smith | a7ec369 | 2019-10-29 15:37:19 +0100 | [diff] [blame] | 65 | if BUILD_IU |
| 66 | IU=1 osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v |
| 67 | IU=1 osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v |
| 68 | else |
| 69 | IU=0 osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v |
| 70 | IU=0 osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v |
| 71 | endif |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 72 | $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v |
Harald Welte | d677f51 | 2022-05-16 14:34:56 +0200 | [diff] [blame] | 73 | rm -f $(top_builddir)/sms.db* |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 74 | |
Neels Hofmeyr | 1139ca3 | 2020-06-15 03:09:54 +0200 | [diff] [blame] | 75 | # Run a specific transcript test with: 'make vty-transcript-test VTY_TEST=osmo-msc.vty' |
| 76 | VTY_TEST ?= *.vty |
| 77 | |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 78 | # To update the VTY script from current application behavior, |
| 79 | # pass -u to vty_script_runner.py by doing: |
| 80 | # make vty-transcript-test U=-u |
Vadim Yanitskiy | 5d0bc33 | 2023-03-29 19:43:35 +0700 | [diff] [blame] | 81 | vty-transcript-test: $(top_builddir)/src/osmo-msc/osmo-msc |
Neels Hofmeyr | 18333fa | 2018-12-05 02:24:30 +0100 | [diff] [blame] | 82 | osmo_verify_transcript_vty.py -v \ |
| 83 | -n OsmoMSC -p 4254 \ |
| 84 | -r "$(top_builddir)/src/osmo-msc/osmo-msc -c $(top_srcdir)/doc/examples/osmo-msc/osmo-msc.cfg" \ |
Neels Hofmeyr | 1139ca3 | 2020-06-15 03:09:54 +0200 | [diff] [blame] | 85 | $(U) $(srcdir)/$(VTY_TEST) |
Harald Welte | d677f51 | 2022-05-16 14:34:56 +0200 | [diff] [blame] | 86 | rm -f $(builddir)/sms.db* |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 87 | |
| 88 | # don't run multiple tests concurrently so that the ports don't conflict |
| 89 | vty-test: |
| 90 | $(MAKE) vty-python-test |
| 91 | $(MAKE) vty-transcript-test |
| 92 | |
Vadim Yanitskiy | 5d0bc33 | 2023-03-29 19:43:35 +0700 | [diff] [blame] | 93 | ctrl-python-test: $(top_builddir)/src/osmo-msc/osmo-msc |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 94 | $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v |
Harald Welte | d677f51 | 2022-05-16 14:34:56 +0200 | [diff] [blame] | 95 | rm -f $(top_builddir)/sms.db* |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 96 | |
| 97 | # To update the CTRL script from current application behavior, |
| 98 | # pass -u to ctrl_script_runner.py by doing: |
| 99 | # make ctrl-transcript-test U=-u |
| 100 | ctrl-transcript-test: |
| 101 | echo "No ctrl-transcript-test exists yet" |
| 102 | |
| 103 | # don't run multiple tests concurrently so that the ports don't conflict |
| 104 | ctrl-test: |
| 105 | $(MAKE) ctrl-python-test |
| 106 | $(MAKE) ctrl-transcript-test |
| 107 | |
Vadim Yanitskiy | 5d0bc33 | 2023-03-29 19:43:35 +0700 | [diff] [blame] | 108 | smpp-test:$(top_builddir)/src/osmo-msc/osmo-msc |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 109 | $(srcdir)/smpp_test_runner.py -w $(abs_top_builddir) -v |
Harald Welte | d677f51 | 2022-05-16 14:34:56 +0200 | [diff] [blame] | 110 | rm -f $(top_builddir)/sms.db* |
Neels Hofmeyr | 1231fdb | 2018-12-05 02:24:16 +0100 | [diff] [blame] | 111 | |
Holger Hans Peter Freyther | 6c88217 | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 112 | check-local: atconfig $(TESTSUITE) |
| 113 | $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) |
Katerina Barone-Adesi | e0aee7a | 2013-04-05 17:36:09 +0200 | [diff] [blame] | 114 | $(MAKE) $(AM_MAKEFLAGS) python-tests |
Holger Hans Peter Freyther | 6c88217 | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 115 | |
| 116 | installcheck-local: atconfig $(TESTSUITE) |
| 117 | $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \ |
| 118 | $(TESTSUITEFLAGS) |
| 119 | |
| 120 | clean-local: |
| 121 | test ! -f '$(TESTSUITE)' || \ |
| 122 | $(SHELL) '$(TESTSUITE)' --clean |
Holger Hans Peter Freyther | 6c88217 | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 123 | |
| 124 | AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te |
| 125 | AUTOTEST = $(AUTOM4TE) --language=autotest |
Holger Hans Peter Freyther | 03ff1c8 | 2012-01-09 21:49:47 +0100 | [diff] [blame] | 126 | $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 |
Holger Hans Peter Freyther | 6c88217 | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 127 | $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at |
| 128 | mv $@.tmp $@ |