Allow pre-setting the KUBEVIRT_E2E_FOCUS env var in tests
In order to ease lane filtering, the `automation/test.sh` scrip will not compute the `KUBEVIRT_E2E_FOCUS` and the `KUBEVIRT_E2E_SKIP` environment variables according to the TARGET variable, if the `KUBEVIRT_E2E_FOCUS` variable is already set.
That allow setting this variable from the test configuration.
@@ -281,6 +281,11 @@ spec:
path: /
storageClassName: windows
EOF
+fi
+
+# Set KUBEVIRT_E2E_FOCUS and KUBEVIRT_E2E_SKIP only if both of them are not already set
+if [[ -z ${KUBEVIRT_E2E_FOCUS} && -z ${KUBEVIRT_E2E_SKIP} ]]; then
+ if [[ $TARGET =~ windows.* ]]; then
# Run only Windows tests
export KUBEVIRT_E2E_FOCUS=Windows
elif [[ $TARGET =~ (cnao|multus) ]]; then
@@ -300,6 +305,7 @@ fi
if [[ "$KUBEVIRT_STORAGE" == "rook-ceph" ]]; then
export KUBEVIRT_E2E_FOCUS=rook-ceph
fi
+fi
# If KUBEVIRT_QUARANTINE is not set, do not run quarantined tests. When it is
# set the whole suite (quarantined and stable) will be run.
