blob: dc5194c0a48fedd27029db150bb7f7d97d1f7ec6 [file] [log] [blame]
Alexander Huemer7b6673f2016-09-09 00:43:15 +02001SUBDIRS = \
Harald Welte2483f1b2016-06-19 18:06:02 +02002 sms_queue \
Neels Hofmeyr6a29d322017-01-25 15:04:16 +01003 msc_vlr \
Alexander Huemer7b6673f2016-09-09 00:43:15 +02004 $(NULL)
Philipp22611be2016-08-10 12:08:03 +02005
Holger Hans Peter Freythera7328a52013-07-13 17:09:56 +02006if BUILD_SMPP
Alexander Huemer7b6673f2016-09-09 00:43:15 +02007SUBDIRS += \
8 smpp \
9 $(NULL)
Holger Hans Peter Freythera7328a52013-07-13 17:09:56 +020010endif
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +010011
12# The `:;' works around a Bash 3.2 bug when the output is not writeable.
Holger Hans Peter Freyther93ef33e2012-01-09 22:53:04 +010013$(srcdir)/package.m4: $(top_srcdir)/configure.ac
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +010014 :;{ \
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 Freyther03ff1c82012-01-09 21:49:47 +010028 } >'$(srcdir)/package.m4'
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +010029
Alexander Huemer7b6673f2016-09-09 00:43:15 +020030EXTRA_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 Hofmeyr18333fa2018-12-05 02:24:30 +010037 test_nodes.vty \
Alexander Huemer7b6673f2016-09-09 00:43:15 +020038 $(NULL)
39
Holger Hans Peter Freyther03ff1c82012-01-09 21:49:47 +010040TESTSUITE = $(srcdir)/testsuite
Alexander Huemer7b6673f2016-09-09 00:43:15 +020041
42DISTCLEANFILES = \
43 atconfig \
44 $(NULL)
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +010045
Holger Hans Peter Freytherdd588ae2014-08-22 00:29:04 +020046if ENABLE_EXT_TESTS
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010047# don't run multiple tests concurrently so that the ports don't conflict
Katerina Barone-Adesie0aee7a2013-04-05 17:36:09 +020048python-tests: $(BUILT_SOURCES)
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010049 $(MAKE) vty-test
50 $(MAKE) ctrl-test
Holger Hans Peter Freythered0d4f62014-03-06 23:43:13 +010051if BUILD_SMPP
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010052 $(MAKE) smpp-test
Holger Hans Peter Freythered0d4f62014-03-06 23:43:13 +010053endif
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010054
Katerina Barone-Adesie0aee7a2013-04-05 17:36:09 +020055else
56python-tests: $(BUILT_SOURCES)
57 echo "Not running python-based tests (determined at configure-time)"
58endif
59
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010060vty-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
69vty-transcript-test:
Neels Hofmeyr18333fa2018-12-05 02:24:30 +010070 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" \
73 $(U) $(srcdir)/*.vty
74 rm -f $(builddir)/sms.db
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010075
76# don't run multiple tests concurrently so that the ports don't conflict
77vty-test:
78 $(MAKE) vty-python-test
79 $(MAKE) vty-transcript-test
80
81ctrl-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
88ctrl-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
92ctrl-test:
93 $(MAKE) ctrl-python-test
94 $(MAKE) ctrl-transcript-test
95
96smpp-test:
97 $(srcdir)/smpp_test_runner.py -w $(abs_top_builddir) -v
98 rm -f $(top_builddir)/sms.db
99
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +0100100check-local: atconfig $(TESTSUITE)
101 $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
Katerina Barone-Adesie0aee7a2013-04-05 17:36:09 +0200102 $(MAKE) $(AM_MAKEFLAGS) python-tests
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +0100103
104installcheck-local: atconfig $(TESTSUITE)
105 $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \
106 $(TESTSUITEFLAGS)
107
108clean-local:
109 test ! -f '$(TESTSUITE)' || \
110 $(SHELL) '$(TESTSUITE)' --clean
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +0100111
112AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te
113AUTOTEST = $(AUTOM4TE) --language=autotest
Holger Hans Peter Freyther03ff1c82012-01-09 21:49:47 +0100114$(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +0100115 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
116 mv $@.tmp $@