]> git.ipfire.org Git - people/jschlag/network.git/commitdiff
nitsi: Add a test that calls "make check" in the virtual environment
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 4 Jun 2018 15:38:29 +0000 (16:38 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 15 Jun 2018 11:26:16 +0000 (12:26 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Makefile.am
test/nitsi/test/make-check/.gitignore [new file with mode: 0644]
test/nitsi/test/make-check/recipe.in [new file with mode: 0644]
test/nitsi/test/make-check/settings.in [new file with mode: 0644]

index 73c79f501f99b63234ef2c5aa8788adbd8c10d3d..a0d57689d97ed7d770df2bc75781e5d91605e542 100644 (file)
@@ -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)
diff --git a/test/nitsi/test/make-check/.gitignore b/test/nitsi/test/make-check/.gitignore
new file mode 100644 (file)
index 0000000..5fd84c8
--- /dev/null
@@ -0,0 +1,2 @@
+/recipe
+/settings
diff --git a/test/nitsi/test/make-check/recipe.in b/test/nitsi/test/make-check/recipe.in
new file mode 100644 (file)
index 0000000..13d664b
--- /dev/null
@@ -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
diff --git a/test/nitsi/test/make-check/settings.in b/test/nitsi/test/make-check/settings.in
new file mode 100644 (file)
index 0000000..cac865d
--- /dev/null
@@ -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