From ee6c5571ade8241b48e45024e7e3c355af170042 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 22 Mar 2021 14:36:17 +0100 Subject: [PATCH] use commit as name if the folder doesn't exist --- lib/tests_coordination.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/tests_coordination.sh b/lib/tests_coordination.sh index d8a6fe6..90b87db 100644 --- a/lib/tests_coordination.sh +++ b/lib/tests_coordination.sh @@ -108,10 +108,14 @@ parse_check_process() { # Upgrades with a specific commit if [[ "$test_type" == "TEST_UPGRADE" ]] && [[ -n "$test_arg" ]] then - local specific_upgrade_install_args="$(grep "^manifest_arg=" "$TEST_CONTEXT/upgrades/$test_arg" | cut -d'=' -f2-)" - [[ -n "$specific_upgrade_install_args" ]] && _install_args="$specific_upgrade_install_args" + if [ -f "$TEST_CONTEXT/upgrades/$test_arg" ]; then + local specific_upgrade_install_args="$(grep "^manifest_arg=" "$TEST_CONTEXT/upgrades/$test_arg" | cut -d'=' -f2-)" + [[ -n "$specific_upgrade_install_args" ]] && _install_args="$specific_upgrade_install_args" - local upgrade_name="$(grep "^name=" "$TEST_CONTEXT/upgrades/$test_arg" | cut -d'=' -f2)" + local upgrade_name="$(grep "^name=" "$TEST_CONTEXT/upgrades/$test_arg" | cut -d'=' -f2)" + else + local upgrade_name="$test_arg" + fi extra="$(jq -n --arg upgrade_name "$upgrade_name" '{ $upgrade_name }')" elif [[ "$test_type" == "ACTIONS_CONFIG_PANEL" ]] && [[ "$test_arg" == "actions" ]] then