From 1f4aaec61b7c804820a45003c79e0e60d2b56dd1 Mon Sep 17 00:00:00 2001 From: leej3 Date: Wed, 29 May 2024 09:46:21 +0100 Subject: [PATCH] fix scheduled tests add better error message when pytest is not on the PATH --- .github/workflows/pytorch-version-tests.yml | 2 +- tests/common-test-functionality.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytorch-version-tests.yml b/.github/workflows/pytorch-version-tests.yml index 2e0ad5e0c98..1ab8cf668b7 100644 --- a/.github/workflows/pytorch-version-tests.yml +++ b/.github/workflows/pytorch-version-tests.yml @@ -96,7 +96,7 @@ jobs: with: max_attempts: 5 timeout_minutes: 15 - shell: bash + shell: bash -l {0} command: bash tests/run_cpu_tests.sh "not test_time_profilers" new_command_on_retry: USE_LAST_FAILED=1 bash tests/run_cpu_tests.sh "not test_time_profilers" diff --git a/tests/common-test-functionality.sh b/tests/common-test-functionality.sh index daf9d284f6b..6e60947f927 100644 --- a/tests/common-test-functionality.sh +++ b/tests/common-test-functionality.sh @@ -70,6 +70,14 @@ run_tests() { esac done + if ! command -v pytest &> /dev/null + then + echo "pytest could not be found" + echo "The path is: ${PATH}" + exit 1 + fi + + if [ "${skip_distrib_tests}" -eq "1" ]; then # can be overwritten by core_args skip_distrib_opt="-m 'not distributed and not tpu and not multinode_distributed'"