forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print the command when a greentea test is being run. Also fix mbedhtr…
…un not being on PATH causing all tests to pass! (ARMmbed#51) * Print the command when a greentea test is being run. Also fix mbedhtrun not being on PATH causing all tests to pass! * Also remove useless -f argument to mbedhtrun (not used with --skip-flashing)
- Loading branch information
1 parent
7e5066d
commit f317dbc
Showing
2 changed files
with
10 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
# This file is configured by CMake to create the script used to execute each Greentea test. | ||
|
||
# First flash the target using its configured Mbed OS upload method | ||
# ----------------------------------------------------------------------- | ||
execute_process( | ||
# Note: we don't use cmake --build because that performs a reconfigure of the build system each time | ||
COMMAND @CMAKE_MAKE_PROGRAM@ flash-@MBED_GREENTEA_TEST_NAME@ | ||
WORKING_DIRECTORY @CMAKE_BINARY_DIR@ | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
|
||
# Then run and communicate with the test | ||
# ----------------------------------------------------------------------- | ||
set(MBEDHTRUN_ARGS --skip-flashing @MBED_HTRUN_ARGUMENTS@) # filled in by configure script | ||
|
||
# Print out command | ||
string(REPLACE ";" " " MBEDHTRUN_ARGS_FOR_DISPLAY "${MBEDHTRUN_ARGS}") | ||
message("Executing: mbedhtrun ${MBEDHTRUN_ARGS_FOR_DISPLAY}") | ||
|
||
# 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" | ||
execute_process( | ||
COMMAND mbedhtrun --skip-flashing -f @MBED_GREENTEA_TEST_IMAGE_NAME@ @MBED_HTRUN_ARGUMENTS@ | ||
COMMAND @Python3_EXECUTABLE@ -c "import mbed_host_tests.mbedhtrun; mbed_host_tests.mbedhtrun.main()" ${MBEDHTRUN_ARGS} | ||
WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@" | ||
COMMAND_ERROR_IS_FATAL ANY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters