Skip to content

Commit 06efcf6

Browse files
committed
Limit ARM pytest retries to operator tests
1 parent cdcc915 commit 06efcf6

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

.ci/scripts/test_backend.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ if [[ "$FLOW" == *vulkan* ]]; then
5858
fi
5959

6060
if [[ "$FLOW" == *arm* ]]; then
61-
PYTEST_RETRY_ARGS=(--reruns 2 --reruns-delay 1)
62-
6361
# Setup ARM deps.
6462
if [[ "$FLOW" == *vgf* ]]; then
6563
.ci/scripts/setup-arm-baremetal-tools.sh --enable-mlsdk-deps --install-mlsdk-deps-with-pip
@@ -96,6 +94,10 @@ CMAKE_ARGS="$EXTRA_BUILD_ARGS" ${CONDA_RUN_CMD} $SETUP_SCRIPT --build-tool cmake
9694
GOLDEN_DIR="${ARTIFACT_DIR}/golden-artifacts"
9795
export GOLDEN_ARTIFACTS_DIR="${GOLDEN_DIR}"
9896

97+
if [[ "$FLOW" == *arm* && "$SUITE" == "operators" ]]; then
98+
PYTEST_RETRY_ARGS=(--reruns 1 --reruns-delay 1)
99+
fi
100+
99101
EXIT_CODE=0
100102
PYTEST_ARGS=(-c /dev/null -n auto)
101103
if [[ ${#PYTEST_RETRY_ARGS[@]} -gt 0 ]]; then

backends/arm/test/test_arm_baremetal.sh

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fi
4848
TEST_SUITE_NAME="$(basename "$0") ${TEST_SUITE}"
4949

5050
EXCLUDE_TARGET_EXPR="(not u55) and (not u85) and (not tosa) and (not _vgf_)"
51-
PYTEST_RETRY_ARGS=(--reruns 2 --reruns-delay 1)
51+
PYTEST_OP_RETRY_ARGS=(--reruns 1 --reruns-delay 1)
5252

5353
all() { # Run all tests
5454
# This will list all lines in this file that is starting with test_ remove () { and add this script name in
@@ -81,7 +81,7 @@ test_pytest_ops_no_target() {
8181
echo "${TEST_SUITE_NAME}: Run pytest ops for target-less tests"
8282

8383
# Run arm baremetal pytest tests without target
84-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k "${EXCLUDE_TARGET_EXPR}"
84+
pytest "${PYTEST_OP_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k "${EXCLUDE_TARGET_EXPR}"
8585
echo "${TEST_SUITE_NAME}: PASS"
8686
}
8787

@@ -92,7 +92,7 @@ test_pytest_models_no_target() {
9292
source backends/arm/scripts/install_models_for_test.sh
9393

9494
# Run arm baremetal pytest tests without FVP
95-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k "${EXCLUDE_TARGET_EXPR}"
95+
pytest --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k "${EXCLUDE_TARGET_EXPR}"
9696
echo "${TEST_SUITE_NAME}: PASS"
9797
}
9898

@@ -102,7 +102,7 @@ test_pytest_models_no_target() {
102102
test_pytest_ops_tosa() {
103103
echo "${TEST_SUITE_NAME}: Run pytest ops for TOSA"
104104

105-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k tosa
105+
pytest "${PYTEST_OP_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k tosa
106106
echo "${TEST_SUITE_NAME}: PASS"
107107
}
108108

@@ -112,7 +112,7 @@ test_pytest_models_tosa() {
112112
# Install model dependencies for pytest
113113
source backends/arm/scripts/install_models_for_test.sh
114114

115-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k tosa
115+
pytest --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k tosa
116116
echo "${TEST_SUITE_NAME}: PASS"
117117
}
118118

@@ -135,7 +135,7 @@ test_pytest_ops_ethos_u55() {
135135
backends/arm/scripts/build_executorch.sh
136136
backends/arm/test/setup_testing.sh
137137

138-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k u55
138+
pytest "${PYTEST_OP_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k u55
139139
echo "${TEST_SUITE_NAME}: PASS"
140140
}
141141

@@ -148,7 +148,7 @@ test_pytest_models_ethos_u55() {
148148
# Install model dependencies for pytest
149149
source backends/arm/scripts/install_models_for_test.sh
150150

151-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k u55
151+
pytest --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k u55
152152
echo "${TEST_SUITE_NAME}: PASS"
153153
}
154154

@@ -189,7 +189,7 @@ test_pytest_ops_ethos_u85() {
189189
backends/arm/test/setup_testing.sh
190190

191191
# Run arm baremetal pytest tests with FVP
192-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k u85
192+
pytest "${PYTEST_OP_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k u85
193193
echo "${TEST_SUITE_NAME}: PASS"
194194
}
195195

@@ -202,7 +202,7 @@ test_pytest_models_ethos_u85() {
202202
# Install model dependencies for pytest
203203
source backends/arm/scripts/install_models_for_test.sh
204204

205-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k u85
205+
pytest --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k u85
206206
echo "${TEST_SUITE_NAME}: PASS"
207207
}
208208

@@ -236,7 +236,7 @@ test_pytest_ops_vkml() {
236236

237237
source backends/arm/test/setup_testing_vkml.sh
238238

239-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ \
239+
pytest "${PYTEST_OP_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ \
240240
--ignore=backends/arm/test/models -k _vgf_
241241
echo "${TEST_SUITE_NAME}: PASS"
242242
}
@@ -249,7 +249,7 @@ test_pytest_models_vkml() {
249249
# Install model dependencies for pytest
250250
source backends/arm/scripts/install_models_for_test.sh
251251

252-
pytest "${PYTEST_RETRY_ARGS[@]}" --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k _vgf_
252+
pytest --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k _vgf_
253253
echo "${TEST_SUITE_NAME}: PASS"
254254
}
255255

@@ -296,7 +296,6 @@ test_smaller_stories_llama() {
296296
# Get path to source directory
297297
pytest \
298298
-c /dev/null \
299-
"${PYTEST_RETRY_ARGS[@]}" \
300299
--verbose \
301300
--color=yes \
302301
--numprocesses=auto \

0 commit comments

Comments
 (0)