Skip to content

Commit 2bee3b7

Browse files
gabor-toth-armadeaarm
authored andcommitted
RSE: Unittests: Ensure target folder exists for Ruby-generated file
generate_test_runner.rb requires the target folder for test_runner.c to exist and fails with an error if it doesn’t. This change ensures the necessary directories are created before running the Ruby script. Signed-off-by: Gabor Toth <[email protected]> Change-Id: Id79f55a99e33652aba9d3160c3c32e7975170174
1 parent 4467e42 commit 2bee3b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform/ext/target/arm/rse/common/unittests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024, Arm Limited. All rights reserved.
2+
# SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55
#
@@ -40,6 +40,7 @@ function(generate_test UNIT_NAME UNIT_PATH)
4040
# Generate runner for the test
4141
add_custom_command(
4242
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/unittests/${UNIT_NAME}/test_runner.c
43+
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/unittests/${UNIT_NAME}
4344
COMMAND ${Ruby_EXECUTABLE}
4445
${UNITY_PATH}/auto/generate_test_runner.rb
4546
${CMAKE_CURRENT_LIST_DIR}/framework/unity/cfg.yml

0 commit comments

Comments
 (0)