bug 381 fix 79/5579/1
authorMike Marchetti <mmarchetti@sandvine.com>
Fri, 13 Oct 2017 17:58:54 +0000 (13:58 -0400)
committerMike Marchetti <mmarchetti@sandvine.com>
Fri, 13 Oct 2017 17:58:54 +0000 (13:58 -0400)
- fixup ping_pong Makefile
Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
descriptor-packages/mk/pkg.mk
juju-charms/Makefile
systest/Makefile

index 0264602..6a2b553 100644 (file)
@@ -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=@
 
index 76d21ac..d6aa754 100644 (file)
@@ -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
index ce5c68a..90c56d5 100644 (file)
@@ -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