|
|
40251c |
From d059664e2de82a2e212fe14f3799450ca4ef5a51 Mon Sep 17 00:00:00 2001
|
|
|
40251c |
From: Eric Garver <eric@garver.life>
|
|
|
40251c |
Date: Wed, 27 Nov 2019 13:32:42 -0500
|
|
|
40251c |
Subject: [PATCH 08/37] test: build: add support for running in containers
|
|
|
40251c |
|
|
|
40251c |
This is just a dummy target at the moment.
|
|
|
40251c |
|
|
|
40251c |
(cherry picked from commit df13ebc5d8df69b0b0b15c6777c8bb906a67bf5b)
|
|
|
40251c |
(cherry picked from commit 11c36a3c81987f4e34bf87e99d0800401c24561f)
|
|
|
40251c |
---
|
|
|
40251c |
Makefile.am | 3 +++
|
|
|
40251c |
README | 7 +++++++
|
|
|
40251c |
configure.ac | 1 +
|
|
|
40251c |
src/tests/Makefile.am | 4 ++++
|
|
|
40251c |
4 files changed, 15 insertions(+)
|
|
|
40251c |
|
|
|
40251c |
diff --git a/Makefile.am b/Makefile.am
|
|
|
40251c |
index b3dbce1f2b11..c377d6f63792 100644
|
|
|
40251c |
--- a/Makefile.am
|
|
|
40251c |
+++ b/Makefile.am
|
|
|
40251c |
@@ -78,6 +78,9 @@ dist-check:
|
|
|
40251c |
exit 1; \
|
|
|
40251c |
fi
|
|
|
40251c |
|
|
|
40251c |
+check-container:
|
|
|
40251c |
+ $(MAKE) -C src/tests $@
|
|
|
40251c |
+
|
|
|
40251c |
update-docs:
|
|
|
40251c |
$(MAKE) -C doc/xml
|
|
|
40251c |
|
|
|
40251c |
diff --git a/README b/README
|
|
|
40251c |
index 181d50f301e9..9cb2ef4a15b7 100644
|
|
|
40251c |
--- a/README
|
|
|
40251c |
+++ b/README
|
|
|
40251c |
@@ -102,6 +102,13 @@ Or just the keywords
|
|
|
40251c |
|awk '/^[[:space:]]*[[:digit:]]+/{getline; print $0}' \
|
|
|
40251c |
|tr ' ' '\n' |sort |uniq
|
|
|
40251c |
|
|
|
40251c |
+There is also a check-container target that will run the testsuite inside
|
|
|
40251c |
+various podman/docker containers. This is useful for coverage of multiple
|
|
|
40251c |
+distributions. As a bonus, it allows us to run tests that may be destructive to
|
|
|
40251c |
+the host (container) such as NetworkManager integration tests.
|
|
|
40251c |
+
|
|
|
40251c |
+ make check-container TESTSUITEFLAGS="-j4"
|
|
|
40251c |
+
|
|
|
40251c |
RPM package
|
|
|
40251c |
-----------
|
|
|
40251c |
|
|
|
40251c |
diff --git a/configure.ac b/configure.ac
|
|
|
40251c |
index 39d6af1f89f1..0758c69d442c 100644
|
|
|
40251c |
--- a/configure.ac
|
|
|
40251c |
+++ b/configure.ac
|
|
|
40251c |
@@ -36,6 +36,7 @@ AC_PATH_PROG([RMMOD], [rmmod], [/sbin/rmmod])
|
|
|
40251c |
AC_PATH_PROG([SYSCTL], [sysctl], [/sbin/sysctl])
|
|
|
40251c |
|
|
|
40251c |
AC_CONFIG_TESTDIR([src/tests])
|
|
|
40251c |
+AC_PATH_PROGS([PODMAN], [podman docker], [/bin/false])
|
|
|
40251c |
|
|
|
40251c |
GLIB_GSETTINGS
|
|
|
40251c |
|
|
|
40251c |
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
|
|
|
40251c |
index 09bf699b81d0..84c076c847b0 100644
|
|
|
40251c |
--- a/src/tests/Makefile.am
|
|
|
40251c |
+++ b/src/tests/Makefile.am
|
|
|
40251c |
@@ -41,3 +41,7 @@ AUTOTEST = $(AUTOM4TE) --language=autotest
|
|
|
40251c |
$(TESTSUITE): $(TESTSUITE_FILES) $(srcdir)/package.m4
|
|
|
40251c |
$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
|
|
|
40251c |
mv $@.tmp $@
|
|
|
40251c |
+
|
|
|
40251c |
+check-container:
|
|
|
40251c |
+
|
|
|
40251c |
+.PHONY: check-container
|
|
|
40251c |
--
|
|
|
40251c |
2.23.0
|
|
|
40251c |
|