Skip to content
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
Expand Down
26 changes: 18 additions & 8 deletions backends/arm/test/test_arm_backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
}

Expand All @@ -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"
}

Expand Down Expand Up @@ -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"
}

Expand All @@ -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"
}

Expand Down Expand Up @@ -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"
}

Expand All @@ -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"
}

Expand Down Expand Up @@ -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"
}
Expand All @@ -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"
}

Expand Down
Loading