Skip to content

Commit 1d44be2

Browse files
author
Jamie Smith
authored
Fix issue with Python exit codes that masked failures (#56)
1 parent 7cd7e60 commit 1d44be2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/cmake/mbed-run-greentea-test.in.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ message("Executing: mbedhtrun ${MBEDHTRUN_ARGS_FOR_DISPLAY}")
1818

1919
# Note: For this command, we need to survive mbedhtrun not being on the PATH, so we import the package and call the main function using "python -c"
2020
execute_process(
21-
COMMAND @Python3_EXECUTABLE@ -c "import mbed_host_tests.mbedhtrun; mbed_host_tests.mbedhtrun.main()" ${MBEDHTRUN_ARGS}
21+
COMMAND @Python3_EXECUTABLE@ -c "import mbed_host_tests.mbedhtrun; exit(mbed_host_tests.mbedhtrun.main())" ${MBEDHTRUN_ARGS}
2222
WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@"
2323
COMMAND_ERROR_IS_FATAL ANY)

tools/cmake/mbed_generate_configuration.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if(MBED_NEED_TO_RECONFIGURE)
9191
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/mbed_config.cmake)
9292

9393
set(MBEDTOOLS_CONFIGURE_COMMAND ${Python3_EXECUTABLE}
94-
-c "import mbed_tools.cli.main\; mbed_tools.cli.main.cli()" # This is used instead of invoking mbed_tools as a script, because it might not be on the user's PATH.
94+
-c "import mbed_tools.cli.main\; exit(mbed_tools.cli.main.cli())" # This is used instead of invoking mbed_tools as a script, because it might not be on the user's PATH.
9595
configure
9696
-t GCC_ARM # GCC_ARM is currently the only supported toolchain
9797
-m "${MBED_TARGET}"

0 commit comments

Comments
 (0)