diff --git a/Makefile b/Makefile index c9c5586..3c0a9c6 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ CLEAN_DIRS += clean-$(UNITTEST_DIR) .PHONY: $(SUBDIRS) $(BUILD_DIRS) $(INSTALL_DIRS) $(CLEAN_DIRS) .PHONY: integration integration-slow integration-quick .PHONY: vagrant-integration-slow vagrant-integration-quick vagrant-integration +.PHONY: vagrant-install all: $(BUILD_DIRS) @@ -43,6 +44,15 @@ integration-slow: $(INTEGRATION_DIR)/Makefile build-kpatch-build build-kpatch bu integration-quick: $(INTEGRATION_DIR)/Makefile build-kpatch-build build-kpatch build-kmod $(MAKE) -C $(INTEGRATION_DIR) quick +vagrant-install: $(INTEGRATION_DIR)/lib.sh +ifneq ($(shell id -u), 0) + @echo "WARNING: This target is intended for use on freshly-installed machines/vms only." && \ + echo "Do not proceed unless you read $(INTEGRATION_DIR)/lib.sh and realise what this target does." && \ + echo "Press ctrl-c to abort, return to proceed." && \ + read +endif + source $(INTEGRATION_DIR)/lib.sh && kpatch_check_install_vagrant + vagrant-integration: vagrant-integration-quick vagrant-integration-slow: diff --git a/test/integration/lib.sh b/test/integration/lib.sh index ebdb002..d9c9d43 100644 --- a/test/integration/lib.sh +++ b/test/integration/lib.sh @@ -203,6 +203,7 @@ kpatch_check_install_vagrant() { local image_path=${1} [ "$(which vagrant)" == "" ] && kpatch_install_vagrant "${image_path}" + return 0 } kpatch_write_vagrantfile_template()