|
|
40251c |
From a49f1e42bc8ac34df7790446e3a421d376c4d216 Mon Sep 17 00:00:00 2001
|
|
|
40251c |
From: Eric Garver <eric@garver.life>
|
|
|
40251c |
Date: Mon, 16 Dec 2019 13:11:24 -0500
|
|
|
40251c |
Subject: [PATCH 14/37] test: build: support integration tests
|
|
|
40251c |
|
|
|
40251c |
These use the target "check-integration". We use a separate target
|
|
|
40251c |
because these tests may be destructive to the host. The plan is to run
|
|
|
40251c |
them from within the "check-container" target.
|
|
|
40251c |
|
|
|
40251c |
(cherry picked from commit ab6c22b8419f5eb333484376ea41d592c809eb2a)
|
|
|
40251c |
(cherry picked from commit 50c393d5618bf34110b59a3805963444e5f41e3a)
|
|
|
40251c |
---
|
|
|
40251c |
Makefile.am | 4 +++-
|
|
|
40251c |
src/tests/Makefile.am | 17 ++++++++++++++++-
|
|
|
40251c |
src/tests/integration/testsuite.at | 11 +++++++++++
|
|
|
40251c |
3 files changed, 30 insertions(+), 2 deletions(-)
|
|
|
40251c |
create mode 100644 src/tests/integration/testsuite.at
|
|
|
40251c |
|
|
|
40251c |
diff --git a/Makefile.am b/Makefile.am
|
|
|
40251c |
index c377d6f63792..85da0b5857d2 100644
|
|
|
40251c |
--- a/Makefile.am
|
|
|
40251c |
+++ b/Makefile.am
|
|
|
40251c |
@@ -78,9 +78,11 @@ dist-check:
|
|
|
40251c |
exit 1; \
|
|
|
40251c |
fi
|
|
|
40251c |
|
|
|
40251c |
-check-container:
|
|
|
40251c |
+check-container check-integration installcheck-integration:
|
|
|
40251c |
$(MAKE) -C src/tests $@
|
|
|
40251c |
|
|
|
40251c |
+.PHONY: check-container check-integration installcheck-integration
|
|
|
40251c |
+
|
|
|
40251c |
update-docs:
|
|
|
40251c |
$(MAKE) -C doc/xml
|
|
|
40251c |
|
|
|
40251c |
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
|
|
|
40251c |
index cef17b6eba4b..c00c198bf9bb 100644
|
|
|
40251c |
--- a/src/tests/Makefile.am
|
|
|
40251c |
+++ b/src/tests/Makefile.am
|
|
|
40251c |
@@ -1,12 +1,16 @@
|
|
|
40251c |
TESTSUITE = $(srcdir)/testsuite
|
|
|
40251c |
+TESTSUITE_INTEGRATION = $(srcdir)/integration/testsuite
|
|
|
40251c |
+
|
|
|
40251c |
TESTSUITE_FILES = \
|
|
|
40251c |
$(wildcard $(srcdir)/*.at) \
|
|
|
40251c |
$(wildcard $(srcdir)/dbus/*.at) \
|
|
|
40251c |
$(wildcard $(srcdir)/features/*.at) \
|
|
|
40251c |
+ $(wildcard $(srcdir)/integration/*.at) \
|
|
|
40251c |
$(wildcard $(srcdir)/regression/*.at)
|
|
|
40251c |
|
|
|
40251c |
EXTRA_DIST = \
|
|
|
40251c |
$(TESTSUITE) \
|
|
|
40251c |
+ $(TESTSUITE_INTEGRATION) \
|
|
|
40251c |
$(TESTSUITE_FILES) \
|
|
|
40251c |
$(wildcard $(srcdir)/python/*.py) \
|
|
|
40251c |
$(srcdir)/package.m4 \
|
|
|
40251c |
@@ -38,7 +42,7 @@ clean-local:
|
|
|
40251c |
|
|
|
40251c |
AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te
|
|
|
40251c |
AUTOTEST = $(AUTOM4TE) --language=autotest
|
|
|
40251c |
-$(TESTSUITE): $(TESTSUITE_FILES) $(srcdir)/package.m4
|
|
|
40251c |
+$(TESTSUITE) $(TESTSUITE_INTEGRATION): $(TESTSUITE_FILES) $(srcdir)/package.m4
|
|
|
40251c |
$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
|
|
|
40251c |
mv $@.tmp $@
|
|
|
40251c |
|
|
|
40251c |
@@ -80,3 +84,14 @@ check-container: check-container-fedora-rawhide
|
|
|
40251c |
.PHONY: check-container
|
|
|
40251c |
.PHONY: check-container-debian-sid
|
|
|
40251c |
.PHONY: check-container-fedora-rawhide
|
|
|
40251c |
+
|
|
|
40251c |
+check-integration: atconfig atlocal $(TESTSUITE_INTEGRATION)
|
|
|
40251c |
+ $(SHELL) '$(TESTSUITE_INTEGRATION)' $(TESTSUITEFLAGS) \
|
|
|
40251c |
+ AUTOTEST_PATH="src" \
|
|
|
40251c |
+ PYTHONPATH="${abs_top_srcdir}/src:${PYTHONPATH}" \
|
|
|
40251c |
+ FIREWALLD_DEFAULT_CONFIG="${abs_top_srcdir}/config"
|
|
|
40251c |
+
|
|
|
40251c |
+installcheck-integration: atconfig atlocal $(TESTSUITE_INTEGRATION)
|
|
|
40251c |
+ $(SHELL) '$(TESTSUITE_INTEGRATION)' $(TESTSUITEFLAGS)
|
|
|
40251c |
+
|
|
|
40251c |
+.PHONY: check-integration installcheck-integration
|
|
|
40251c |
diff --git a/src/tests/integration/testsuite.at b/src/tests/integration/testsuite.at
|
|
|
40251c |
new file mode 100644
|
|
|
40251c |
index 000000000000..bbaf07a191b9
|
|
|
40251c |
--- /dev/null
|
|
|
40251c |
+++ b/src/tests/integration/testsuite.at
|
|
|
40251c |
@@ -0,0 +1,11 @@
|
|
|
40251c |
+AT_INIT
|
|
|
40251c |
+AT_COLOR_TESTS
|
|
|
40251c |
+
|
|
|
40251c |
+dnl Override m4_include to avoid warning about inclusion
|
|
|
40251c |
+dnl
|
|
|
40251c |
+m4_define([m4_include], [m4_builtin([include], [$1])])
|
|
|
40251c |
+
|
|
|
40251c |
+m4_include([functions.at])
|
|
|
40251c |
+
|
|
|
40251c |
+m4_foreach([FIREWALL_BACKEND], [[nftables], [iptables]], [
|
|
|
40251c |
+])
|
|
|
40251c |
--
|
|
|
40251c |
2.23.0
|
|
|
40251c |
|