From 91ee6559433573079f62a5995a18f3c427a16152 Mon Sep 17 00:00:00 2001 From: Jonatan Schlag Date: Sat, 15 Sep 2018 13:41:55 +0200 Subject: [PATCH] Add default settings file for nitsi tests This makes writing a test much faster. Signed-off-by: Jonatan Schlag --- .gitignore | 1 + Makefile.am | 15 +++++++++++---- test/nitsi/test/settings.in | 6 ++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 test/nitsi/test/settings.in diff --git a/.gitignore b/.gitignore index 47952730..a6df183b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ /src/network.pc /src/ppp/ip-updown /src/systemd/*.service +/test/nitsi/test/settings /tmp /*.tar.bz2 /*.tar.gz diff --git a/Makefile.am b/Makefile.am index fa12f4e7..54460535 100644 --- a/Makefile.am +++ b/Makefile.am @@ -606,6 +606,7 @@ NITSI_TESTS = \ test/nitsi/test/zone-port-attach-bridge EXTRA_DIST += \ + test/nitsi/test/settings.in \ test/nitsi/test/hello-world/recipe \ test/nitsi/test/hello-world/settings \ test/nitsi/test/make-check/recipe.in \ @@ -615,20 +616,26 @@ EXTRA_DIST += \ test/nitsi/test/zone-new-bridge/recipe \ test/nitsi/test/zone-new-bridge/settings.in \ test/nitsi/test/zone-port-attach-bridge/recipe \ - test/nitsi/test/zone-port-attach-bridge/settings.in + test/nitsi/test/zone-port-attach-bridge/settings.in \ + test/nitsi/test/zone-up_down/recipe \ + test/nitsi/test/zone-up_down/settings.in \ + test/nitsi/test/vpn-ipsec-ipv64-ipv4-vti/recipe CLEANFILES += \ + test/nitsi/test/settings \ test/nitsi/test/make-check/recipe \ test/nitsi/test/make-check/settings \ test/nitsi/test/raw-device-get-by-mac/settings \ test/nitsi/test/zone-new-bridge/settings \ - test/nitsi/test/zone-port-attach-bridge/settings + test/nitsi/test/zone-port-attach-bridge/settings \ + test/nitsi/test/zone-up_down/settings NITSI_ENVIRONMENT = .PHONY: $(NITSI_TESTS) -$(NITSI_TESTS): % : %/recipe %/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES) $(NITSI_INCLUDE_RECIPES) - $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@ +$(NITSI_TESTS): % : %/recipe %/settings test/nitsi/test/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES) $(NITSI_INCLUDE_RECIPES) + $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@ \ + --default-settings $(abs_builddir)/test/nitsi/test/settings .PHONY: nitsi nitsi: dist $(NITSI_TESTS) diff --git a/test/nitsi/test/settings.in b/test/nitsi/test/settings.in new file mode 100644 index 00000000..1a15d201 --- /dev/null +++ b/test/nitsi/test/settings.in @@ -0,0 +1,6 @@ +[GENERAL] +copy_from = ../../../@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz ../../../strongswan.conf +copy_to = /root/ + +[VIRTUAL_ENVIRONMENT] +path = ../virtual-environment/basic -- 2.39.2