Skip to content
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

Fix selection of standalone tests #10857

Merged
merged 4 commits into from
Dec 1, 2021
Merged
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
12 changes: 2 additions & 10 deletions tests/standalone_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ files=$(echo "$grep_output" | cut -f1 -d: | sort | uniq)
# get the list of parametrizations. we need to call them separately. the last two lines are removed.
# note: if there's a syntax error, this will fail with some garbled output
if [[ "$OSTYPE" == "darwin"* ]]; then
parametrizations=$(pytest $files --collect-only --quiet | tail -r | sed -e '1,3d' | tail -r)
parametrizations=$(pytest $files --collect-only --quiet "$@" | tail -r | sed -e '1,3d' | tail -r)
else
parametrizations=$(pytest $files --collect-only --quiet | head -n -2)
parametrizations=$(pytest $files --collect-only --quiet "$@" | head -n -2)
carmocca marked this conversation as resolved.
Show resolved Hide resolved
fi
parametrizations_arr=($parametrizations)

Expand All @@ -47,14 +47,6 @@ for i in "${!parametrizations_arr[@]}"; do
continue
fi

# STANDALONE_PATTERN allows filtering the tests to run when debugging.
# use as `STANDALONE_PATTERN="foo_bar" ./standalone_tests.sh` to run only those
# test with `foo_bar` in their name
if [[ $parametrization != *STANDALONE_PATTERN* ]]; then
report+="Skipped\t$parametrization\n"
continue
fi

# run the test
echo "Running ${parametrization}"
python ${defaults} "${parametrization}"
Expand Down