aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Malsbary <todd.malsbary@intel.com>2020-12-02 13:00:45 -0800
committerTodd Malsbary <todd.malsbary@intel.com>2020-12-09 16:28:41 -0800
commitd6fb4c61f0813fbcd6881ceac172699921ca98b5 (patch)
treef112022993ded4300fef454e2c80159c225d071e
parent23a396aea58809ddf95777b2ae0a21967d7ffe43 (diff)
Run all addon tests even when one fails
Previously the installer would exit immediately after a failure by one of the addon tests. Now, record the failure and run subsequent tests, then exit if any fail. Issue-ID: MULTICLOUD-1258 Signed-off-by: Todd Malsbary <todd.malsbary@intel.com> Change-Id: I4fcad9b51b58277344de4fed0e40e87493dc3663
-rwxr-xr-xkud/hosting_providers/containerized/installer.sh11
-rwxr-xr-xkud/hosting_providers/vagrant/installer.sh7
2 files changed, 14 insertions, 4 deletions
diff --git a/kud/hosting_providers/containerized/installer.sh b/kud/hosting_providers/containerized/installer.sh
index db6b224c..a4454381 100755
--- a/kud/hosting_providers/containerized/installer.sh
+++ b/kud/hosting_providers/containerized/installer.sh
@@ -131,25 +131,30 @@ function install_addons {
echo "Run the test cases if testing_enabled is set to true."
if [[ "${testing_enabled}" == "true" ]]; then
+ failed_kud_tests=""
for addon in ${KUD_ADDONS:-virtlet ovn4nfv nfd sriov qat cmk $plugins_name}; do
pushd $kud_tests
- bash ${addon}.sh
+ bash ${addon}.sh || failed_kud_tests="${failed_kud_tests} ${addon}"
case $addon in
"onap4k8s" )
echo "Test the onap4k8s plugin installation"
for functional_test in plugin_edgex plugin_fw plugin_eaa; do
- bash ${functional_test}.sh --external
+ bash ${functional_test}.sh --external || failed_kud_tests="${failed_kud_tests} ${functional_test}"
done
;;
"emco" )
echo "Test the emco plugin installation"
for functional_test in plugin_fw_v2; do
- bash ${functional_test}.sh --external
+ bash ${functional_test}.sh --external || failed_kud_tests="${failed_kud_tests} ${functional_test}"
done
;;
esac
popd
done
+ if [[ ! -z "$failed_kud_tests" ]]; then
+ echo "Test cases failed:${failed_kud_tests}"
+ return 1
+ fi
fi
echo "Add-ons deployment complete..."
}
diff --git a/kud/hosting_providers/vagrant/installer.sh b/kud/hosting_providers/vagrant/installer.sh
index 53164989..43638b4f 100755
--- a/kud/hosting_providers/vagrant/installer.sh
+++ b/kud/hosting_providers/vagrant/installer.sh
@@ -165,11 +165,16 @@ function install_addons {
done
echo "Run the test cases if testing_enabled is set to true."
if [[ "${testing_enabled}" == "true" ]]; then
+ failed_kud_tests=""
for addon in ${KUD_ADDONS:-multus topology-manager virtlet ovn4nfv nfd sriov qat optane cmk}; do
pushd $kud_tests
- bash ${addon}.sh
+ bash ${addon}.sh || failed_kud_tests="${failed_kud_tests} ${addon}"
popd
done
+ if [[ ! -z "$failed_kud_tests" ]]; then
+ echo "Test cases failed:${failed_kud_tests}"
+ return 1
+ fi
fi
echo "Add-ons deployment complete..."
}