From 2cea6a01a57a8f1ad71ba9cf838186d62987d30a Mon Sep 17 00:00:00 2001 From: Mike Marchetti Date: Fri, 13 Oct 2017 13:58:54 -0400 Subject: [PATCH] bug 381 fix - fixup ping_pong Makefile Signed-off-by: Mike Marchetti --- descriptor-packages/mk/pkg.mk | 2 +- juju-charms/Makefile | 7 +++++++ systest/Makefile | 9 ++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/descriptor-packages/mk/pkg.mk b/descriptor-packages/mk/pkg.mk index 02646026..6a2b5533 100644 --- a/descriptor-packages/mk/pkg.mk +++ b/descriptor-packages/mk/pkg.mk @@ -24,7 +24,7 @@ CHARM_DIR := $(TOPDIR)/juju-charms CHARM_SRC_DIR := $(CHARM_DIR)/layers CHARM_DOCKER_TAG := charm-tools CHARM_BUILD_DIR := $(CHARM_DIR)/builds -DOCKER_BUILD ?= $(shell which docker) +DOCKER_BUILD ?= Q=@ diff --git a/juju-charms/Makefile b/juju-charms/Makefile index 76d21ac5..d6aa754d 100644 --- a/juju-charms/Makefile +++ b/juju-charms/Makefile @@ -24,12 +24,19 @@ CHARM_BUILD_DIR := $(BUILD_DIR)/builds CHARM_SRC_DIRS := $(addprefix $(CHARM_SRC_DIR)/, $(CHARMS)) CHARM_BUILD_DIRS := $(addprefix $(CHARM_BUILD_DIR)/, $(CHARMS)) CHARM_DOCKER_TAG := charm-tools +DOCKER_BUILD ?= all: $(CHARM_BUILD_DIRS) clean: -@ $(RM) -rf $(CHARM_BUILD_DIR) + +ifdef DOCKER_BUILD $(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/% docker build -t $(CHARM_DOCKER_TAG) . docker run -u $$(id -u):$$(id -g) -v$$(pwd):$$(pwd) -w$$(pwd) $(CHARM_DOCKER_TAG) charm-build -o $(BUILD_DIR) $< +else +$(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/% + charm-build -o $(BUILD_DIR) $< +endif diff --git a/systest/Makefile b/systest/Makefile index ce5c68a6..90c56d50 100644 --- a/systest/Makefile +++ b/systest/Makefile @@ -140,12 +140,15 @@ $(DESCRIPTOR_DIR)/vnfd/ping_vnf/build/%.tar.gz: $(DESCRIPTOR_DIR)/vnfd/pong_vnf/build/%.tar.gz: $(MAKE) -C $(DESCRIPTOR_DIR)/vnfd/pong_vnf -$(DESCRIPTOR_DIR)/vnfd/ping_pong_ns/build/%.tar.gz: +$(DESCRIPTOR_DIR)/nsd/ping_pong_ns/build/%.tar.gz: $(MAKE) -C $(DESCRIPTOR_DIR)/nsd/ping_pong_ns -ping_pong: check_OSM_HOSTNAME check_openstack_env +ping_pong: check_OSM_HOSTNAME check_openstack_env \ + $(DESCRIPTOR_DIR)/vnfd/ping_vnf/build/ping_vnf.tar.gz \ + $(DESCRIPTOR_DIR)/vnfd/pong_vnf/build/pong_vnf.tar.gz \ + $(DESCRIPTOR_DIR)/nsd/ping_pong_ns/build/ping_pong_ns.tar.gz $(Q)$(MAKE) \ - TEST_VNFD_DESCRIPTORS="$(DESCRIPTOR_DIR)/vnfd/ping_vnf/build/ping_vnf.tar.gz $(DESCRIPTOR_DIR)/vnfd/pong_vnf/build/pong_vnf.tar.gz" \ + TEST_VNFD_DESCRIPTORS="$(DESCRIPTOR_DIR)/vnfd/ping_vnf/build/ping_vnf.tar.gz,$(DESCRIPTOR_DIR)/vnfd/pong_vnf/build/pong_vnf.tar.gz" \ TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_DIR)/nsd/ping_pong_ns/build/ping_pong_ns.tar.gz \ JUNITXML=pytest-$@.xml \ PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m vnf" _run_test -- 2.25.1