Alexander Huemer | 7477d71 | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 1 | SUBDIRS = \ |
Alexander Huemer | 7477d71 | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 2 | $(NULL) |
Holger Hans Peter Freyther | fee826b | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 3 | |
| 4 | # The `:;' works around a Bash 3.2 bug when the output is not writeable. |
Holger Hans Peter Freyther | 34abf21 | 2012-01-09 22:53:04 +0100 | [diff] [blame] | 5 | $(srcdir)/package.m4: $(top_srcdir)/configure.ac |
Holger Hans Peter Freyther | fee826b | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 6 | :;{ \ |
| 7 | echo '# Signature of the current package.' && \ |
| 8 | echo 'm4_define([AT_PACKAGE_NAME],' && \ |
| 9 | echo ' [$(PACKAGE_NAME)])' && \ |
| 10 | echo 'm4_define([AT_PACKAGE_TARNAME],' && \ |
| 11 | echo ' [$(PACKAGE_TARNAME)])' && \ |
| 12 | echo 'm4_define([AT_PACKAGE_VERSION],' && \ |
| 13 | echo ' [$(PACKAGE_VERSION)])' && \ |
| 14 | echo 'm4_define([AT_PACKAGE_STRING],' && \ |
| 15 | echo ' [$(PACKAGE_STRING)])' && \ |
| 16 | echo 'm4_define([AT_PACKAGE_BUGREPORT],' && \ |
| 17 | echo ' [$(PACKAGE_BUGREPORT)])'; \ |
| 18 | echo 'm4_define([AT_PACKAGE_URL],' && \ |
| 19 | echo ' [$(PACKAGE_URL)])'; \ |
Holger Hans Peter Freyther | 3073cb0 | 2012-01-09 21:49:47 +0100 | [diff] [blame] | 20 | } >'$(srcdir)/package.m4' |
Holger Hans Peter Freyther | fee826b | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 21 | |
Alexander Huemer | 7477d71 | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 22 | EXTRA_DIST = \ |
| 23 | testsuite.at \ |
| 24 | $(srcdir)/package.m4 \ |
| 25 | $(TESTSUITE) \ |
| 26 | vty_test_runner.py \ |
| 27 | ctrl_test_runner.py \ |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 28 | osmo-gbproxy_test-nodes.vty \ |
| 29 | osmo-gbproxy-pool_test-nodes.vty \ |
Alexander Huemer | 7477d71 | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 30 | $(NULL) |
| 31 | |
Holger Hans Peter Freyther | 3073cb0 | 2012-01-09 21:49:47 +0100 | [diff] [blame] | 32 | TESTSUITE = $(srcdir)/testsuite |
Alexander Huemer | 7477d71 | 2016-09-09 00:43:15 +0200 | [diff] [blame] | 33 | |
| 34 | DISTCLEANFILES = \ |
| 35 | atconfig \ |
| 36 | $(NULL) |
Holger Hans Peter Freyther | fee826b | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 37 | |
Holger Hans Peter Freyther | 8fa08b0 | 2014-08-22 00:29:04 +0200 | [diff] [blame] | 38 | if ENABLE_EXT_TESTS |
Katerina Barone-Adesi | ad5fb00 | 2013-04-05 17:36:09 +0200 | [diff] [blame] | 39 | python-tests: $(BUILT_SOURCES) |
Pau Espin Pedrol | 4330ea9 | 2019-08-14 20:22:59 +0200 | [diff] [blame] | 40 | $(MAKE) vty-test |
| 41 | $(MAKE) ctrl-python-test |
Katerina Barone-Adesi | ad5fb00 | 2013-04-05 17:36:09 +0200 | [diff] [blame] | 42 | else |
| 43 | python-tests: $(BUILT_SOURCES) |
| 44 | echo "Not running python-based tests (determined at configure-time)" |
| 45 | endif |
| 46 | |
Pau Espin Pedrol | 4330ea9 | 2019-08-14 20:22:59 +0200 | [diff] [blame] | 47 | vty-python-test: $(BUILT_SOURCES) |
| 48 | osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v |
| 49 | osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v |
| 50 | $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v |
| 51 | rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count |
| 52 | |
| 53 | # To update the VTY script from current application behavior, |
| 54 | # pass -u to vty_script_runner.py by doing: |
| 55 | # make vty-transcript-test U=-u |
| 56 | vty-transcript-test: |
| 57 | osmo_verify_transcript_vty.py -v \ |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 58 | -n OsmoGbProxy -p 4246 \ |
Harald Welte | 936dfd7 | 2021-01-31 19:36:06 +0100 | [diff] [blame] | 59 | -r "$(top_builddir)/src/osmo-gbproxy -c $(top_srcdir)/doc/examples/osmo-gbproxy/osmo-gbproxy.cfg" \ |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 60 | $(U) $${T:-$(srcdir)/osmo-gbproxy_test-nodes.vty} |
| 61 | osmo_verify_transcript_vty.py -v \ |
| 62 | -n OsmoGbProxy -p 4246 \ |
Harald Welte | 936dfd7 | 2021-01-31 19:36:06 +0100 | [diff] [blame] | 63 | -r "$(top_builddir)/src/osmo-gbproxy -c $(top_srcdir)/doc/examples/osmo-gbproxy/osmo-gbproxy-pool.cfg" \ |
Daniel Willmann | ee834af | 2020-12-14 16:22:39 +0100 | [diff] [blame] | 64 | $(U) $${T:-$(srcdir)/osmo-gbproxy-pool_test-nodes.vty} |
Pau Espin Pedrol | 4330ea9 | 2019-08-14 20:22:59 +0200 | [diff] [blame] | 65 | rm -f $(builddir)/sms.db $(builddir)/gsn_restart |
| 66 | |
| 67 | # don't run multiple tests concurrently so that the ports don't conflict |
| 68 | vty-test: |
| 69 | $(MAKE) vty-python-test |
| 70 | $(MAKE) vty-transcript-test |
| 71 | |
| 72 | ctrl-python-test: $(BUILT_SOURCES) |
| 73 | $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v |
| 74 | rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count |
| 75 | |
Holger Hans Peter Freyther | fee826b | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 76 | check-local: atconfig $(TESTSUITE) |
| 77 | $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) |
Katerina Barone-Adesi | ad5fb00 | 2013-04-05 17:36:09 +0200 | [diff] [blame] | 78 | $(MAKE) $(AM_MAKEFLAGS) python-tests |
Holger Hans Peter Freyther | fee826b | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 79 | |
| 80 | installcheck-local: atconfig $(TESTSUITE) |
| 81 | $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \ |
| 82 | $(TESTSUITEFLAGS) |
| 83 | |
| 84 | clean-local: |
| 85 | test ! -f '$(TESTSUITE)' || \ |
| 86 | $(SHELL) '$(TESTSUITE)' --clean |
Holger Hans Peter Freyther | fee826b | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 87 | |
| 88 | AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te |
| 89 | AUTOTEST = $(AUTOM4TE) --language=autotest |
Holger Hans Peter Freyther | 3073cb0 | 2012-01-09 21:49:47 +0100 | [diff] [blame] | 90 | $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 |
Holger Hans Peter Freyther | fee826b | 2012-01-06 15:16:12 +0100 | [diff] [blame] | 91 | $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at |
| 92 | mv $@.tmp $@ |