-add tests
[oweals/gnunet.git] / src / integration-tests / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 if MINGW
5  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
6 endif
7
8 if USE_COVERAGE
9   AM_CFLAGS = --coverage -O0
10   XLIB = -lgcov
11 endif
12
13 noinst_SCRIPTS = \
14  gnunet_testing.py \
15  gnunet_pyexpect.py
16
17 if HAVE_PYTHON
18 check_SCRIPTS = \
19   test_integration_bootstrap_and_connect.py \
20   test_integration_disconnect.py \
21   test_integration_disconnect_nat.py \
22   test_integration_reconnect.py \
23   test_integration_reconnect_nat.py \
24   test_integration_clique.py
25 endif
26
27
28 if HAVE_MHD
29 if ENABLE_TEST_RUN
30 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
31 if HAVE_LIBGNURL
32 TESTS = \
33  $(check_SCRIPTS)
34 else
35 if HAVE_LIBCURL
36 TESTS = \
37  $(check_SCRIPTS)
38 endif
39 endif
40 endif
41 endif
42
43 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
44
45 %.py: %.py.in Makefile
46         $(do_subst) < $(srcdir)/$< > $@
47         chmod +x $@
48
49 gnunet_testing.py: gnunet_testing.py.in Makefile
50         $(do_subst) < $(srcdir)/gnunet_testing.py.in > gnunet_testing.py
51         chmod +x gnunet_testing.py
52
53 gnunet_pyexpect.py: gnunet_pyexpect.py.in Makefile
54         $(do_subst) < $(srcdir)/gnunet_pyexpect.py.in > gnunet_pyexpect.py
55         chmod +x gnunet_pyexpect.py
56
57 test_integration_bootstrap_and_connect.py: test_integration_bootstrap_and_connect.py.in Makefile
58         $(do_subst) < $(srcdir)/test_integration_bootstrap_and_connect.py.in > test_integration_bootstrap_and_connect.py
59         chmod +x test_integration_bootstrap_and_connect.py
60
61 test_integration_disconnect.py: test_integration_disconnect.py.in Makefile
62         $(do_subst) < $(srcdir)/test_integration_disconnect.py.in > test_integration_disconnect.py
63         chmod +x test_integration_disconnect.py
64
65 test_integration_disconnect_nat.py: test_integration_disconnect_nat.py.in Makefile
66         $(do_subst) < $(srcdir)/test_integration_disconnect_nat.py.in > test_integration_disconnect_nat.py
67         chmod +x test_integration_disconnect_nat.py
68
69 test_integration_reconnect.py: test_integration_reconnect.py.in Makefile
70         $(do_subst) < $(srcdir)/test_integration_reconnect.py.in > test_integration_reconnect.py
71         chmod +x test_integration_reconnect.py
72
73 test_integration_reconnect_nat.py: test_integration_reconnect_nat.py.in Makefile
74         $(do_subst) < $(srcdir)/test_integration_reconnect_nat.py.in > test_integration_reconnect_nat.py
75         chmod +x test_integration_reconnect_nat.py
76
77 test_integration_clique.py: test_integration_clique.py.in Makefile
78         $(do_subst) < $(srcdir)/test_integration_clique.py.in > test_integration_clique.py
79         chmod +x test_integration_clique.py
80
81
82 EXTRA_DIST = \
83    gnunet_testing.py.in \
84    gnunet_pyexpect.py.in \
85    test_integration_bootstrap_and_connect.py.in \
86    test_integration_disconnect.py.in \
87    test_integration_disconnect_nat.py.in \
88    test_integration_reconnect.py.in \
89    test_integration_reconnect_nat.py.in \
90    test_integration_clique.py.in \
91    confs/test_defaults.conf \
92    confs/c_bootstrap_server.conf \
93    confs/c_nat_client.conf \
94    confs/c_no_nat_client_2.conf \
95    confs/c_no_nat_client.conf \
96    hostkeys/c_bootstrap_server \
97    hostkeys/c_no_nat_client \
98    hostkeys/c_no_nat_client_2 \
99    hostkeys/c_nat_client
100
101 CLEANFILES = \
102         $(check_SCRIPTS) \
103         gnunet_pyexpect.py \
104         gnunet_testing.py