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