Skip to content

Commit 93960e5

Browse files
committed
Arm backend: Rework "no_target" test collection
Prior to this patch, test_arm_baremetal.sh would consider all tests containing the substring `no_target` in their names to be tests that lacks a TOSA target. This patch changes this concept such that tests that do not match against any target ("u55", "u85", "tosa" and "vgf" as of now), will be considered to have no target; therefore, targetless tests must no longer include the no_target substring in their names. This patch fixes a problem where a test could be skipped because it wasn't matching against any target substring (including no_target). Such tests will now instead be considered targetless and always run. Signed-off-by: Martin Lindström <Martin.Lindstroem@arm.com> Change-Id: I1cff769ce6bd5595db9f26c1506adcae564f4ea8
1 parent 71de34d commit 93960e5

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

backends/arm/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ This approach is useful for checking your change against this workflow on your o
186186
These scripts also install the necessary dependencies to run the tests.
187187
Below is an overview of some of the testing options this script provides:
188188

189-
| Command | Description |
189+
| Command | Description |
190190
| ---------------------------------------------------- | ------------------------------------------------------------ |
191191
| `test_arm_baremetal.sh test_pytest_ops_no_target` | Runs operator unit tests for non-target specific use-cases. |
192192
| `test_arm_baremetal.sh test_pytest_models_no_target` | Runs model unit tests for non-target specific use-cases. |
@@ -201,9 +201,9 @@ Below is an overview of some of the testing options this script provides:
201201
| `test_arm_baremetal.sh test_run_ethos_u85` | Runs end-to-end unit tests for Ethos-U85 specific use-cases. |
202202
| `test_arm_baremetal.sh test_pytest_ops_vkml` | Runs operator unit tests for VGF specific use-cases. |
203203
| `test_arm_baremetal.sh test_pytest_models_vkml` | Runs model unit tests for VGF specific use-cases. |
204-
| `test_arm_baremetal.sh test_run_vkml` | Runs end-to-end unit tests for VGF specific use-cases. |
205-
| `test_arm_baremetal.sh test_model_smollm2-135M` | Runs some models with Corstone FVP. |
206-
| `test_arm_baremetal.sh test_smaller_stories_llama` | Runs E2E model tests on Corstone FVP. |
204+
| `test_arm_baremetal.sh test_run_vkml` | Runs end-to-end unit tests for VGF specific use-cases. |
205+
| `test_arm_baremetal.sh test_model_smollm2-135M` | Runs some models with Corstone FVP. |
206+
| `test_arm_baremetal.sh test_smaller_stories_llama` | Runs E2E model tests on Corstone FVP. |
207207
| `test_arm_baremetal.sh test_memory_allocation` | Runs memory allocation tests for Ethos-U specific targets |
208208

209209
For more information, please refer to the `backends/arm/test/test_arm_baremetal.sh` script.

backends/arm/test/test_arm_baremetal.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ fi
4747

4848
TEST_SUITE_NAME="$(basename "$0") ${TEST_SUITE}"
4949

50+
EXCLUDE_TARGET_EXPR="(not u55) and (not u85) and (not tosa) and (not _vgf_)"
51+
5052
all() { # Run all tests
5153
# This will list all lines in this file that is starting with test_ remove () { and add this script name in
5254
# front of it and execute it in a sub shell
@@ -78,7 +80,7 @@ test_pytest_ops_no_target() {
7880
echo "${TEST_SUITE_NAME}: Run pytest ops for target-less tests"
7981

8082
# Run arm baremetal pytest tests without target
81-
pytest --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k no_target
83+
pytest --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ --ignore=backends/arm/test/models -k "${EXCLUDE_TARGET_EXPR}"
8284
echo "${TEST_SUITE_NAME}: PASS"
8385
}
8486

@@ -89,7 +91,7 @@ test_pytest_models_no_target() {
8991
source backends/arm/scripts/install_models_for_test.sh
9092

9193
# Run arm baremetal pytest tests without FVP
92-
pytest --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k no_target
94+
pytest --verbose --color=yes --numprocesses=auto --durations=0 backends/arm/test/models -k "${EXCLUDE_TARGET_EXPR}"
9395
echo "${TEST_SUITE_NAME}: PASS"
9496
}
9597

0 commit comments

Comments
 (0)