Skip to content

Commit 17650c2

Browse files
authored
Arm backend: Make sure we tests correctly with and without Corstone FVP (#12108)
### Summary If the elf for running pytest with Corstone FVP exists pytests will pick it up and run with it. This change make sure to remove the elf for the FVP tests if it exists in the none FVP tests before running the tests. As it is (already) build in the FVP versions of the tests, this fix a problem that if you run the test after each other the non FVP tests could find the elf and run on the FVP even if it was not supposed to. ### Test plan GitHub and local verification. cc @digantdesai @freddan80 @per @oscarandersson8218 Signed-off-by: Zingo Andersen <[email protected]>
1 parent 75e4044 commit 17650c2

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

backends/arm/test/test_arm_baremetal.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ all() { # Run all tests
7373
test_pytest_ops() { # Test ops and other things
7474
echo "${TEST_SUITE_NAME}: Run pytest"
7575

76+
# Make sure to not run this tests on FVP by removing the elf builds,
77+
# as they are detected by the unit tests and used if they exists
78+
rm -Rf arm_test/arm_semihosting_executor_runner_corstone-300
79+
rm -Rf arm_test/arm_semihosting_executor_runner_corstone-320
80+
7681
# Prepare for pytest
7782
backends/arm/scripts/build_executorch.sh
7883

@@ -84,6 +89,11 @@ test_pytest_ops() { # Test ops and other things
8489
test_pytest_models() { # Test ops and other things
8590
echo "${TEST_SUITE_NAME}: Run pytest"
8691

92+
# Make sure to not run this tests on FVP by removing the elf builds,
93+
# as they are detected by the unit tests and used if they exists
94+
rm -Rf arm_test/arm_semihosting_executor_runner_corstone-300
95+
rm -Rf arm_test/arm_semihosting_executor_runner_corstone-320
96+
8797
# Prepare for pytest
8898
backends/arm/scripts/build_executorch.sh
8999

@@ -105,7 +115,9 @@ test_pytest_ops_ethosu_fvp() { # Same as test_pytest but also sometime verify us
105115
# Prepare Corstone-3x0 FVP for pytest
106116
backends/arm/scripts/build_executorch.sh
107117
backends/arm/scripts/build_portable_kernels.sh
108-
# Build semihosting version of the runner used by pytest testing when
118+
# Build semihosting version of the runner used by pytest testing. This builds:
119+
# arm_test/arm_semihosting_executor_runner_corstone-300
120+
# arm_test/arm_semihosting_executor_runner_corstone-320
109121
backends/arm/test/setup_testing.sh
110122

111123
# Run arm baremetal pytest tests with FVP
@@ -119,7 +131,9 @@ test_pytest_models_ethosu_fvp() { # Same as test_pytest but also sometime verify
119131
# Prepare Corstone-3x0 FVP for pytest
120132
backends/arm/scripts/build_executorch.sh
121133
backends/arm/scripts/build_portable_kernels.sh
122-
# Build semihosting version of the runner used by pytest testing
134+
# Build semihosting version of the runner used by pytest testing. This builds:
135+
# arm_test/arm_semihosting_executor_runner_corstone-300
136+
# arm_test/arm_semihosting_executor_runner_corstone-320
123137
backends/arm/test/setup_testing.sh
124138

125139
# Run arm baremetal pytest tests with FVP

0 commit comments

Comments
 (0)