Skip to content
Closed
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
355 changes: 0 additions & 355 deletions tests/python3_test_files.txt

This file was deleted.

20 changes: 3 additions & 17 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,23 +300,9 @@ function run_individual_tests()
TEST_LOGGING_OPTIONS="--log-file ${LOG_PATH}/${test_dir}/${test_name}.log --junitxml=${LOG_PATH}/${test_dir}/${test_name}.xml"
fi

echo Running: pytest ${test_script} ${PYTEST_COMMON_OPTS} ${TEST_LOGGING_OPTIONS} ${TEST_TOPOLOGY_OPTIONS} ${EXTRA_PARAMETERS}
USE_PY3=0
for i in `cat python3_test_files.txt`
do
USE_PY3=`expr match ${test_script} ${i}`
[[ ${USE_PY3} != 0 ]] && break
done
if [ ${USE_PY3} != 0 ]; then
echo Activate Python3 venv
source /var/AzDevOps/env-python3/bin/activate
fi
pytest ${test_script} ${PYTEST_COMMON_OPTS} ${TEST_LOGGING_OPTIONS} ${TEST_TOPOLOGY_OPTIONS} ${EXTRA_PARAMETERS} ${CACHE_CLEAR}
ret_code=$?
if [ ${USE_PY3} != 0 ]; then
echo Deactivate Python3 venv
deactivate
fi
echo Running: python3 -m pytest ${test_script} ${PYTEST_COMMON_OPTS} ${TEST_LOGGING_OPTIONS} ${TEST_TOPOLOGY_OPTIONS} ${EXTRA_PARAMETERS}
python3 -m pytest ${test_script} ${PYTEST_COMMON_OPTS} ${TEST_LOGGING_OPTIONS} ${TEST_TOPOLOGY_OPTIONS} ${EXTRA_PARAMETERS} ${CACHE_CLEAR}
ret_code=$?

# Clear pytest cache for the first run
if [[ -n ${CACHE_CLEAR} ]]; then
Expand Down