Skip to content

Commit

Permalink
DR-3125 Fix for pytest flags
Browse files Browse the repository at this point in the history
  • Loading branch information
meganschanz committed Feb 29, 2024
2 parents ea00f49 + d43d549 commit b780daa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions run-pytest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# shellcheck disable=SC1091
# shellcheck disable=SC1091,SC2086

# Find directory where this script resides
CUR_DIR=$( dirname "$0" )
Expand Down Expand Up @@ -104,12 +104,12 @@ main() {
if [[ $TEST_TYPE == "functional" ]]; then
# Set instance dir
export INSTANCE_DIR=$CUR_DIR/instance
pytest -m functional --no-cov -n 4 --showlocals "$PYTEST_FLAGS"
pytest -m functional --no-cov -n 4 --showlocals $PYTEST_FLAGS
PYTEST_EXIT_CODE=$?
elif [[ $TEST_TYPE == "metadata" ]]; then
# Set instance dir
export INSTANCE_DIR=$CUR_DIR/instance
pytest -m metadata --no-cov -n 4 --showlocals "$PYTEST_FLAGS"
pytest -m metadata --no-cov -n 4 --showlocals $PYTEST_FLAGS
PYTEST_EXIT_CODE=$?
elif [[ $TEST_TYPE == "a11y" ]]; then
# Starting x virtual frame buffer, needed for headless browser
Expand All @@ -120,14 +120,14 @@ main() {
# Set instance dir
export INSTANCE_DIR=$CUR_DIR/instance
echo "Running Accessibility tests against $SERVER_NAME"
pytest -m a11y --no-cov -n 4 "$PYTEST_FLAGS"
pytest -m a11y --no-cov -n 4 $PYTEST_FLAGS
PYTEST_EXIT_CODE=$?

# Stop headless server
kill $PID
elif [[ $TEST_TYPE == "unit" ]]; then
export INSTANCE_DIR=$CUR_DIR/tests/instance
pytest "$PYTEST_FLAGS"
pytest $PYTEST_FLAGS
PYTEST_EXIT_CODE=$?
else
echo "ERROR: Unknown test type of '$TEST_TYPE'"
Expand Down

0 comments on commit b780daa

Please sign in to comment.