[4/7] nitsi: Add a test that calls "make check" in the virtual environment
Commit Message
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
Makefile.am | 16 ++++++++++++----
test/nitsi/test/make-check/.gitignore | 2 ++
test/nitsi/test/make-check/recipe.in | 3 +++
test/nitsi/test/make-check/settings.in | 12 ++++++++++++
4 files changed, 29 insertions(+), 4 deletions(-)
create mode 100644 test/nitsi/test/make-check/.gitignore
create mode 100644 test/nitsi/test/make-check/recipe.in
create mode 100644 test/nitsi/test/make-check/settings.in
@@ -490,6 +490,7 @@ substitutions = \
'|PACKAGE_NAME=$(PACKAGE_NAME)|' \
'|PACKAGE_URL=$(PACKAGE_URL)|' \
'|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
+ '|builddir=$(abs_builddir)|' \
'|prefix=$(prefix)|' \
'|exec_prefix=$(exec_prefix)|' \
'|sbindir=$(sbindir)|' \
@@ -542,17 +543,24 @@ TESTS = \
# - NITSI tests ----------------------------------------------------------------
NITSI_TESTS = \
- test/nitsi/test/hello-world
+ test/nitsi/test/hello-world \
+ test/nitsi/test/make-check
EXTRA_DIST += \
test/nitsi/test/hello-world/recipe \
- test/nitsi/test/hello-world/settings
+ test/nitsi/test/hello-world/settings \
+ test/nitsi/test/make-check/recipe.in \
+ test/nitsi/test/make-check/settings.in
+
+CLEANFILES += \
+ test/nitsi/test/make-check/recipe \
+ test/nitsi/test/make-check/settings
NITSI_ENVIRONMENT =
.PHONY: $(NITSI_TESTS)
-$(NITSI_TESTS): dist
+$(NITSI_TESTS): % : %/recipe %/settings
$(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error -d $@
.PHONY: nitsi
-nitsi: $(NITSI_TESTS)
+nitsi: dist $(NITSI_TESTS)
new file mode 100644
@@ -0,0 +1,2 @@
+/recipe
+/settings
new file mode 100644
@@ -0,0 +1,3 @@
+alice: tar xvfa @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz && cd @PACKAGE_NAME@-@PACKAGE_VERSION@
+alice: ./configure --prefix=/usr && make -j2
+alice: make check
new file mode 100644
@@ -0,0 +1,12 @@
+[DEFAULT]
+Name = make check
+Description = This test runs make install in the virtual environment
+ to determine if the source tarball is complete and module test
+ can be executed in the virtual environment
+
+Copy_from = ../../../../@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
+Copy_to = /root/
+
+[VIRTUAL_ENVIRONMENT]
+Name = basic
+path = ../../virtual-environment/basic