aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-08-16 09:43:05 +0200
committerMauro Sardara <msardara@cisco.com>2022-08-17 17:58:36 +0200
commit309fafddc51697deb9c6f8bf723c10539224cb4d (patch)
tree5f50208043312c0ec0a7680d8ff2fc70f497085c /Makefile
parent7f18fb8e83a9cd4d32b6bf0eb39503cf2f551b4a (diff)
ci(functional-tests): add functional tests scripts
- Add scripts/functional-tests.sh script - Add `download_artifacts` functions, allowing to retrieve artifacts of a gerrit patch - Robot: redirect output of topology build to files, thus preventing robot from hanging - Share folders between host and containers with the :z flag - Use sudo to install executable in docker-compose scripts, as the user of the docker is not root anymore - Makefile: decouple installation and build Ref: HICN-732 Change-Id: Ib945cf7bd0ee331e33270cf1005dfebd085862eb Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 25 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 1fb963292..91d9eb888 100644
--- a/Makefile
+++ b/Makefile
@@ -106,10 +106,16 @@ debug-tools:
define build_folder
$(eval LOWER_BUILDTYPE=$(shell echo $(2) | tr A-Z a-z))
- $(eval BUILD_FOLDER=$(or $(BUILD_PATH), build-$(LOWER_BUILDTYPE)-$(OS_ID)))
+ $(eval BUILD_FOLDER=$(or $(BUILD_PATH), $(WS_ROOT)/build-$(LOWER_BUILDTYPE)-$(OS_ID)))
$(1) := $$(BUILD_FOLDER)
endef
+define install_folder
+ $(eval LOWER_BUILDTYPE=$(shell echo $(2) | tr A-Z a-z))
+ $(eval INSTALL_FOLDER=$(or $(INSTALL_PREFIX), $(WS_ROOT)/install-$(LOWER_BUILDTYPE)))
+ $(1) := $$(INSTALL_FOLDER)
+endef
+
define configure
$(eval $(call build_folder,BUILD_FOLDER,$(1)))
$(eval PREFIX=$(or $(INSTALL_PREFIX), $(WS_ROOT)/install-$(LOWER_BUILDTYPE)))
@@ -137,11 +143,16 @@ define configure
-DBUILD_TESTS=ON
endef
-define build
+define install
$(eval $(call build_folder,BUILD_FOLDER,$(1)))
cmake --build $(BUILD_FOLDER) -- -j 4 install
endef
+define build
+ $(eval $(call build_folder,BUILD_FOLDER,$(1)))
+ cmake --build $(BUILD_FOLDER) -- -j 4
+endef
+
define build_coverage
$(eval $(call build_folder,BUILD_FOLDER,$(1)))
$(eval SONAR_OUT_DIR=$(or $(SONAR_OUT_DIR), $(WS_ROOT)/sonarqube-output))
@@ -186,10 +197,19 @@ package: build
package-release: build-release
$(call package,Release,)
+.PHONY = install
+install: build
+ $(call install,Debug,)
+
+.PHONY = install-release
+install-release: build-release
+ $(call install,Release,)
+
define wipe
- $(eval LOWER_BUILDTYPE=$(shell echo $(1) | tr A-Z a-z))
- $(RM) -rf build-$(LOWER_BUILDTYPE)-$(OS_ID)
- $(RM) -rf install-$(LOWER_BUILDTYPE)
+ $(eval $(call build_folder,BUILD_FOLDER,$(1)))
+ $(eval $(call install_folder,INSTALL_FOLDER,$(1)))
+ $(RM) -rf $(BUILD_FOLDER)
+ $(RM) -rf $(INSTALL_FOLDER)
endef
.PHONY = wipe