Skip to content

Commit 200e90e

Browse files
committed
[ATfE] Restrict variable replacement in check-picolibc script (arm#175)
The `LIT_OPTS` environment variable should be evaluated at runtime, not during configuration. The `@ONLY` option can be used to limit replacement to only the variables that need replacing during configuration. Additionally, compiling the tests has been added as a dependancy of building the library so that it can be done in parallel. (cherry picked from commit 0fc5b3b)
1 parent a3d9107 commit 200e90e

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

arm-software/embedded/arm-runtimes/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ if(C_LIBRARY STREQUAL picolibc)
442442
# Configure a script to run the picolibc tests in order
443443
# to handle the return code.
444444
ExternalProject_Get_property(picolibc BINARY_DIR)
445-
configure_file(check-picolibc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/check-picolibc.cmake)
445+
configure_file(check-picolibc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/check-picolibc.cmake @ONLY)
446446

447447
ExternalProject_Add_Step(
448448
picolibc
@@ -459,6 +459,7 @@ if(C_LIBRARY STREQUAL picolibc)
459459
picolibc-compile-tests
460460
)
461461
add_dependencies(check-picolibc picolibc-check)
462+
add_dependencies(clib-build ${C_LIBRARY}-compile-tests)
462463
endif()
463464

464465
endif()

arm-software/embedded/arm-runtimes/check-picolibc.cmake.in

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ endif()
1010
# This will be equal to the number of test failures.
1111
execute_process(
1212
COMMAND
13-
${MESON_EXECUTABLE}
13+
@MESON_EXECUTABLE@
1414
test
15-
-C ${BINARY_DIR}
15+
-C @BINARY_DIR@
1616
--no-rebuild
1717
RESULT_VARIABLE
1818
failure_count
@@ -22,15 +22,15 @@ execute_process(
2222
# variant specific.
2323
execute_process(
2424
COMMAND
25-
${Python3_EXECUTABLE}
26-
${CMAKE_CURRENT_SOURCE_DIR}/test-support/modify-picolibc-xml.py
27-
--dir ${BINARY_DIR}
28-
--variant ${VARIANT}
25+
@Python3_EXECUTABLE@
26+
@CMAKE_CURRENT_SOURCE_DIR@/test-support/modify-picolibc-xml.py
27+
--dir @BINARY_DIR@
28+
--variant @VARIANT@
2929
COMMAND_ERROR_IS_FATAL
3030
ANY
3131
)
3232

3333
# Use a message to set a return code.
3434
if(failure_count GREATER 0 AND NOT ignore_fail)
35-
message(FATAL_ERROR "Stopping due to test failures.")
35+
message(FATAL_ERROR "Stopping due to test failures.")
3636
endif()

0 commit comments

Comments
 (0)