Skip to content
Snippets Groups Projects
Commit d79360ea authored by Kent McLeod's avatar Kent McLeod
Browse files

hardware_gen.py: fail execute_process on error

Fail with an error if the script returns an error. Additionally hook
stdio up to execute process to allow easier use of python debugging
tools if required.
parent b7550ca8
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,14 @@ if (DEFINED KernelDTSList)
# Generate devices_gen header based on DTB
execute_process(
COMMAND ${PYTHON} "${HARDWARE_GEN_PATH}" --dtb "${KernelDTBPath}" --compatibility-strings "${compatibility_outfile}" --output "${device_dest}" --config "${config_file}" --schema "${config_schema}"
INPUT_FILE /dev/stdin
OUTPUT_FILE /dev/stdout
ERROR_FILE /dev/stderr
RESULT_VARIABLE error
)
if (error)
message(FATAL_ERROR "Failed to generate: ${device_dest}")
endif()
file(READ "${compatibility_outfile}" compatibility_strings)
include(src/drivers/config.cmake)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment