[VOL-3844] Test for ONOS apps minor version upgrade
[VOL-3843] Test for Voltha components minor version upgrade
Change-Id: Iae981056d92c461d67419ef3a1107c86a5aa231b
diff --git a/Makefile b/Makefile
index 569f207..2e23ddf 100755
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,7 @@
ROBOT_SANITY_TT_SINGLE_PON_FILE ?= $(ROOT_DIR)/tests/data/bbsim-kind-tt.yaml
ROBOT_DMI_SINGLE_BBSIM_FILE ?= $(ROOT_DIR)/tests/data/dmi-components-bbsim.yaml
ROBOT_DMI_SINGLE_ADTRAN_FILE ?= $(ROOT_DIR)/tests/data/dmi-components-adtran.yaml
+ROBOT_ONOS_APP_UPGRADE_FILE ?= $(ROOT_DIR)/tests/data/onos-app-upgrade.yaml
# for backwards compatibility
sanity-kind: sanity-single-kind
@@ -315,6 +316,25 @@
cd tests/dmi-interface ;\
robot -V $(ROBOT_CONFIG_FILE) $(ROBOT_MISC_ARGS) $(ROBOT_FILE)
+# ONOS Apps to test for Software Upgrade need to be passed in the 'onos_apps_under_test' variable in format:
+# <app-name>,<version>,<oar-url>*<app-name>,<version>,<oar-url>
+onos-app-upgrade-test: ROBOT_MISC_ARGS += -e notready -i functional
+onos-app-upgrade-test: ROBOT_FILE := ONOS_AppsUpgrade.robot
+onos-app-upgrade-test: ROBOT_CONFIG_FILE := $(ROBOT_ONOS_APP_UPGRADE_FILE)
+onos-app-upgrade-test: software-upgrade-test
+
+# Voltha Components to test for Software Upgrade need to be passed in the 'voltha_comps_under_test' variable in format:
+# <comp-label>,<comp-container>,<comp-image>*<comp-label>,<comp-container>,<comp-image>
+voltha-comp-upgrade-test: ROBOT_MISC_ARGS += -e notready -i functional
+voltha-comp-upgrade-test: ROBOT_FILE := Voltha_ComponentsUpgrade.robot
+voltha-comp-upgrade-test: ROBOT_CONFIG_FILE := $(ROBOT_ONOS_APP_UPGRADE_FILE)
+voltha-comp-upgrade-test: software-upgrade-test
+
+software-upgrade-test: vst_venv
+ source ./$</bin/activate ; set -u ;\
+ cd tests/software-upgrades ;\
+ robot -V $(ROBOT_CONFIG_FILE) $(ROBOT_MISC_ARGS) $(ROBOT_FILE)
+
voltha-dt-test: ROBOT_MISC_ARGS += -e notready
voltha-dt-test: vst_venv