diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index f6e2f1c06ad..fe16a496550 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -1133,6 +1133,7 @@ jobs: submodules: 'recursive' ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: 90 + upload-test-run-reports: ${{ matrix.test_arm_backend == 'test_pytest_ops_tosa' }} script: | # The generic Linux job chooses to use base env, not the one setup by the image CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]") diff --git a/backends/arm/test/test_arm_backend.sh b/backends/arm/test/test_arm_backend.sh index 9eb226946f3..8fc0da04ca0 100755 --- a/backends/arm/test/test_arm_backend.sh +++ b/backends/arm/test/test_arm_backend.sh @@ -157,6 +157,16 @@ TEST_SUITE_NAME="$(basename "$0") ${TEST_SUITE}" EXCLUDE_TARGET_EXPR="(not u55) and (not u65) and (not u85) and (not tosa) and (not _vgf_)" PYTEST_RETRY_ARGS=(--reruns 2 --reruns-delay 1) +arm_pytest() { + # Keep Arm's config and seed hooks; only the reporting IDs need the repo root. + if [[ -n "${RUNNER_TEST_RUN_REPORTS_DIR:-}" && -f tools/pytest_torchci.py ]]; then + TORCHCI_REPORT_NAME="${TEST_SUITE}" python -m pytest -p tools.pytest_torchci \ + -c backends/arm/test/pytest.ini --rootdir=. "$@" + else + pytest "$@" + fi +} + all() { # Run all tests # This will list all lines in this file that is starting with test_ remove () { and add this script name in # front of it and execute it in a sub shell @@ -210,7 +220,7 @@ test_pytest_models_no_target() { test_pytest_ops_tosa() { echo "${TEST_SUITE_NAME}: Run pytest ops for TOSA" - pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k tosa + arm_pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k tosa echo "${TEST_SUITE_NAME}: PASS" } @@ -220,7 +230,7 @@ test_pytest_models_tosa() { # Install model dependencies for pytest source backends/arm/scripts/install_models_for_test.sh - pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k tosa -m "not xlarge" + arm_pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k tosa -m "not xlarge" echo "${TEST_SUITE_NAME}: PASS" } @@ -254,7 +264,7 @@ test_pytest_ops_ethos_u55() { backends/arm/test/setup_testing.sh - pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k "u55 or u65" + arm_pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k "u55 or u65" echo "${TEST_SUITE_NAME}: PASS" } @@ -266,7 +276,7 @@ test_pytest_models_ethos_u55() { # Install model dependencies for pytest source backends/arm/scripts/install_models_for_test.sh - pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k u55 -m "not xlarge" + arm_pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k u55 -m "not xlarge" echo "${TEST_SUITE_NAME}: PASS" } @@ -430,7 +440,7 @@ test_pytest_ops_ethos_u85() { backends/arm/test/setup_testing.sh # Run arm baremetal pytest tests with FVP - pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k u85 + arm_pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k u85 echo "${TEST_SUITE_NAME}: PASS" } @@ -442,7 +452,7 @@ test_pytest_models_ethos_u85() { # Install model dependencies for pytest source backends/arm/scripts/install_models_for_test.sh - pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k u85 -m "not xlarge" + arm_pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k u85 -m "not xlarge" echo "${TEST_SUITE_NAME}: PASS" } @@ -496,7 +506,7 @@ test_pytest_ops_vkml() { source backends/arm/test/setup_testing_vkml.sh - pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ \ + arm_pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ \ --ignore=backends/arm/test/models -k _vgf_ echo "${TEST_SUITE_NAME}: PASS" } @@ -509,7 +519,7 @@ test_pytest_models_vkml() { # Install model dependencies for pytest source backends/arm/scripts/install_models_for_test.sh - pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k _vgf_ -m "not xlarge" + arm_pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k _vgf_ -m "not xlarge" echo "${TEST_SUITE_NAME}: PASS" }