Skip to content

Commit b8fdacc

Browse files
committed
Applied patch a9183756-gh#53
2 parents ac1f133 + a9144ff commit b8fdacc

File tree

3 files changed

+43
-35
lines changed

3 files changed

+43
-35
lines changed

Arduino/System/BoardToolchain.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ function (SetupBoardToolchain boards_namespace board_id generate_dir)
217217
_board_get_ref_platform("${_tool_name}" _ref_tool_pkg_name _tool_name)
218218
set(ARDUINO_BOARD_${_c_tool_prop} "${_tool_name}")
219219
if (_ref_tool_pkg_name AND
220-
# If same as _core_pkg_name or pkg_name, no need to trasnfer
220+
# If same as _core_pkg_name or pkg_name, no need to transfer
221221
# tool properties, because all their platform properties got
222222
# transferred already.
223223
NOT "${_ref_tool_pkg_name}" STREQUAL "${_core_pkg_name}" AND

Arduino/Utilities/PropertiesReader.cmake

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -200,43 +200,49 @@ function(_properties_expand_value value return_value namespace)
200200
return()
201201
endif ()
202202

203-
# Get the variables list
204-
string(REGEX MATCHALL "{[^{}/]+}" _var_list "${_value}")
205-
if (NOT "${_var_list}" STREQUAL "")
206-
list(REMOVE_DUPLICATES _var_list)
207-
endif()
208-
foreach(_var_str IN LISTS _var_list)
209-
210-
# Get the variable name
211-
string(REGEX MATCH "^{(.*)}$" _match "${_var_str}")
212-
set(_var_name "${CMAKE_MATCH_1}")
213-
214-
# Check if not resolved already
215-
if (NOT DEFINED "/prop_int_resolved.${_var_name}")
216-
# If such a variable is not in the namespace, no need to resolve
217-
if (NOT DEFINED "${namespace}.${_var_name}")
218-
properties_set_value("/prop_int_unresolved" ${_var_name} "")
219-
continue()
220-
endif()
221-
222-
# Temporarily resolve it to the same variable to handle recursive
223-
# references
224-
properties_set_value("/prop_int_resolved" "${_var_name}"
225-
"{${_var_name}}")
226-
227-
# message("=> Resolve *** ${_var_name} *** : "
228-
# "${${namespace}.${_var_name}}")
229-
_properties_expand_value("${${namespace}.${_var_name}}"
230-
_var_value "${namespace}")
231-
properties_set_value("/prop_int_resolved" "${_var_name}"
232-
"${_var_value}")
233-
# message("=> EXPANDED ${_var_name}: ${_var_value}")
203+
# Set previous value to nothing so that there is at least one iteration
204+
set(_previous_value "")
205+
while(NOT "${_previous_value}" STREQUAL "${_value}")
206+
set(_previous_value "${_value}")
207+
208+
# Get the variables list
209+
string(REGEX MATCHALL "{[^{}/]+}" _var_list "${_value}")
210+
if (NOT "${_var_list}" STREQUAL "")
211+
list(REMOVE_DUPLICATES _var_list)
234212
endif()
213+
foreach(_var_str IN LISTS _var_list)
214+
215+
# Get the variable name
216+
string(REGEX MATCH "^{(.*)}$" _match "${_var_str}")
217+
set(_var_name "${CMAKE_MATCH_1}")
218+
219+
# Check if not resolved already
220+
if (NOT DEFINED "/prop_int_resolved.${_var_name}")
221+
# If such a variable is not in the namespace, no need to resolve
222+
if (NOT DEFINED "${namespace}.${_var_name}")
223+
properties_set_value("/prop_int_unresolved" ${_var_name} "")
224+
continue()
225+
endif()
226+
227+
# Temporarily resolve it to the same variable to handle recursive
228+
# references
229+
properties_set_value("/prop_int_resolved" "${_var_name}"
230+
"{${_var_name}}")
231+
232+
# message("=> Resolve *** ${_var_name} *** : "
233+
# "${${namespace}.${_var_name}}")
234+
_properties_expand_value("${${namespace}.${_var_name}}"
235+
_var_value "${namespace}")
236+
properties_set_value("/prop_int_resolved" "${_var_name}"
237+
"${_var_value}")
238+
# message("=> EXPANDED ${_var_name}: ${_var_value}")
239+
endif()
235240

236-
string(REPLACE "${_var_str}" "${/prop_int_resolved.${_var_name}}"
237-
_value "${_value}")
241+
string(REPLACE "${_var_str}" "${/prop_int_resolved.${_var_name}}"
242+
_value "${_value}")
238243

239-
endforeach()
244+
endforeach()
245+
endwhile()
240246

241247
properties_set_parent_scope("/prop_int_resolved")
242248
properties_set_parent_scope("/prop_int_unresolved")

Tests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ function(SetupBoardTests)
218218
set_tests_properties("${distinct_id}" PROPERTIES
219219
FIXTURES_REQUIRED "PlTestResults"
220220
SKIP_RETURN_CODE 100
221+
TIMEOUT 3600
221222
)
222223

223224
if ("${shell_cmd}" STREQUAL "" AND
@@ -354,6 +355,7 @@ function(SetupPlatformTests pl_url ref_url_list return_pl_tests)
354355
set_tests_properties("${test_id}" PROPERTIES
355356
FIXTURES_REQUIRED "TestResults"
356357
SKIP_RETURN_CODE 100
358+
TIMEOUT 3600
357359
)
358360
if ("${shell_cmd}" STREQUAL "" AND
359361
NOT CMAKE_VERSION VERSION_LESS "3.16.0")

0 commit comments

Comments
 (0)