From 04720c7215dfe92ce96ede63da5a6377338a7c9a Mon Sep 17 00:00:00 2001 From: tierno Date: Thu, 23 Nov 2017 18:19:34 +0100 Subject: [PATCH] adding make test using the test option of upgrade_descriptor_version Change-Id: Iab0de8e80c52383d438948df1f73b86529b08d7f Signed-off-by: tierno --- descriptor-packages/mk/dirs.mk | 6 ++++++ descriptor-packages/mk/pkg.mk | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/descriptor-packages/mk/dirs.mk b/descriptor-packages/mk/dirs.mk index 85a05e52..8e9ceda6 100644 --- a/descriptor-packages/mk/dirs.mk +++ b/descriptor-packages/mk/dirs.mk @@ -15,6 +15,7 @@ # SUBDIRS_CLEAN = $(addsuffix .clean, $(SUBDIRS)) +SUBDIRS_TEST = $(addsuffix .test, $(SUBDIRS)) .PHONY: $(SUBDIRS) $(SUBDIRS_CLEAN) clean @@ -22,8 +23,13 @@ all: $(SUBDIRS) clean: $(SUBDIRS_CLEAN) +test: $(SUBDIRS_TEST) + $(SUBDIRS_CLEAN): %.clean: @$(MAKE) --no-print-directory -C $* clean +$(SUBDIRS_TEST): %.test: + @$(MAKE) --no-print-directory -C $* test + $(SUBDIRS): @$(MAKE) --no-print-directory -C $@ diff --git a/descriptor-packages/mk/pkg.mk b/descriptor-packages/mk/pkg.mk index 9c623c4c..eb9711f7 100644 --- a/descriptor-packages/mk/pkg.mk +++ b/descriptor-packages/mk/pkg.mk @@ -31,6 +31,7 @@ Q=@ GEN_VNFD_PKG := $(TOOLS_DIR)/gen_vnfd_pkg.sh GEN_NSD_PKG := $(TOOLS_DIR)/gen_nsd_pkg.sh GEN_PKG := $(TOOLS_DIR)/generate_descriptor_pkg.sh +TEST_PKG := $(TOOLS_DIR)/upgrade_descriptor_version.py BUILD_VNFD := $(shell readlink -f .|sed -e 's/\/.*descriptor-packages//' | grep vnfd) DEP_FILES = $(wildcard src/*) @@ -73,4 +74,9 @@ clean: $(Q)rm -rf $(BUILD_DIR) $(Q)rm -rf $(CHARM_BUILD_DIR) +test: + $(Q)echo -n testing $(shell readlink -f src/*.yaml) " " + $(Q)$(TEST_PKG) --test src/*.yaml + $(Q)echo OK + .DEFAULT_GOAL := all -- 2.25.1