Skip to content

scripts/regression.sh: allow for execution of tests from the release … #969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/lib/robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ execute_robot() {
# scope and additional arguments to robot which need to be separated
# when calling robot
for ((i=0;i<_args_len;i++)); do
if [[ ${_args[$i]} == *"--"* ]]; then
if [[ ${_args[$i]} == "--" ]]; then
_separator_idx=$i
break
fi
Expand All @@ -67,6 +67,9 @@ execute_robot() {
if [[ $_separator_idx -gt 0 ]]; then
_separator_idx=$_separator_idx+1
for ((i=_separator_idx;i<_args_len;i++)); do
if [[ ${_args[$i]} == "--" ]]; then
continue
fi
# Some arguments may contain spaces. Bash removes quotation marks
# from command arguments. Because we need to pass them again to
# another command the quotation marks need to be restored or the arguments
Expand Down
16 changes: 13 additions & 3 deletions scripts/regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ if [ -z "$NO_SETUP" ]; then
execute_robot "util/basic-platform-setup.robot" "${@}"
fi

execute_robot "dasharo-compatibility" "${@}"
execute_robot "dasharo-security" "${@}"
execute_robot "dasharo-performance" "${@}"
TESTS=""

if [ -n "$REL_ID" ] && [ -n "$DB_URL" ]; then
TESTS+=" --"
JSON=`curl -s -k "$DB_URL/releases/$REL_ID"`
for t in `echo "$JSON" | jq '.test_cases | map_values(select(endswith("automated"))) | keys | map(.+"*") | .[]'`; do
TESTS+=" -t $t"
done
fi

execute_robot "dasharo-compatibility" "${@}" $TESTS
execute_robot "dasharo-security" "${@}" $TESTS
execute_robot "dasharo-performance" "${@}" $TESTS