blob: a6a40117b1c4c8b29dddf31e97f3ccb8ea8d348f [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 \
37 $(NULL)
38
Holger Hans Peter Freyther03ff1c82012-01-09 21:49:47 +010039TESTSUITE = $(srcdir)/testsuite
Alexander Huemer7b6673f2016-09-09 00:43:15 +020040
41DISTCLEANFILES = \
42 atconfig \
43 $(NULL)
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +010044
Holger Hans Peter Freytherdd588ae2014-08-22 00:29:04 +020045if ENABLE_EXT_TESTS
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010046# don't run multiple tests concurrently so that the ports don't conflict
Katerina Barone-Adesie0aee7a2013-04-05 17:36:09 +020047python-tests: $(BUILT_SOURCES)
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010048 $(MAKE) vty-test
49 $(MAKE) ctrl-test
Holger Hans Peter Freythered0d4f62014-03-06 23:43:13 +010050if BUILD_SMPP
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010051 $(MAKE) smpp-test
Holger Hans Peter Freythered0d4f62014-03-06 23:43:13 +010052endif
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010053
Katerina Barone-Adesie0aee7a2013-04-05 17:36:09 +020054else
55python-tests: $(BUILT_SOURCES)
56 echo "Not running python-based tests (determined at configure-time)"
57endif
58
Neels Hofmeyr1231fdb2018-12-05 02:24:16 +010059vty-python-test: $(BUILT_SOURCES)
60 osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
61 osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
62 $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v
63 rm -f $(top_builddir)/sms.db
64
65# To update the VTY script from current application behavior,
66# pass -u to vty_script_runner.py by doing:
67# make vty-transcript-test U=-u
68vty-transcript-test:
69 echo "No vty-transcript-test exists yet"
70
71# don't run multiple tests concurrently so that the ports don't conflict
72vty-test:
73 $(MAKE) vty-python-test
74 $(MAKE) vty-transcript-test
75
76ctrl-python-test: $(BUILT_SOURCES)
77 $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v
78 rm -f $(top_builddir)/sms.db
79
80# To update the CTRL script from current application behavior,
81# pass -u to ctrl_script_runner.py by doing:
82# make ctrl-transcript-test U=-u
83ctrl-transcript-test:
84 echo "No ctrl-transcript-test exists yet"
85
86# don't run multiple tests concurrently so that the ports don't conflict
87ctrl-test:
88 $(MAKE) ctrl-python-test
89 $(MAKE) ctrl-transcript-test
90
91smpp-test:
92 $(srcdir)/smpp_test_runner.py -w $(abs_top_builddir) -v
93 rm -f $(top_builddir)/sms.db
94
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +010095check-local: atconfig $(TESTSUITE)
96 $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
Katerina Barone-Adesie0aee7a2013-04-05 17:36:09 +020097 $(MAKE) $(AM_MAKEFLAGS) python-tests
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +010098
99installcheck-local: atconfig $(TESTSUITE)
100 $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \
101 $(TESTSUITEFLAGS)
102
103clean-local:
104 test ! -f '$(TESTSUITE)' || \
105 $(SHELL) '$(TESTSUITE)' --clean
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +0100106
107AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te
108AUTOTEST = $(AUTOM4TE) --language=autotest
Holger Hans Peter Freyther03ff1c82012-01-09 21:49:47 +0100109$(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4
Holger Hans Peter Freyther6c882172012-01-06 15:16:12 +0100110 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
111 mv $@.tmp $@