From a35f416ca45fabfd711b29f635a5a2c451000fc2 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 4 Jun 2018 16:38:29 +0100 Subject: [PATCH] nitsi: Add a test that calls "make check" in the virtual environment Signed-off-by: Michael Tremer Reviewed-by: Jonatan Schlag --- 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 diff --git a/Makefile.am b/Makefile.am index 73c79f50..a0d57689 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 index 00000000..5fd84c8f --- /dev/null +++ b/test/nitsi/test/make-check/.gitignore @@ -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 index 00000000..13d664b8 --- /dev/null +++ b/test/nitsi/test/make-check/recipe.in @@ -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 index 00000000..cac865de --- /dev/null +++ b/test/nitsi/test/make-check/settings.in @@ -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 -- 2.39.2