Skip to content

Commit

Permalink
Adding support for providing tests that are placed outside of tree
Browse files Browse the repository at this point in the history
This change will make it possible to build and run simulation on
testfolders that are placed in other directories than the hardcoded
test subfolders.
  • Loading branch information
silabs-kjetil committed Mar 25, 2024
1 parent 6e1c102 commit 71e9309
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bin/yaml2make
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ def read_file(test, type, run_index):
matches = [os.path.join(TOPDIR, p, test, type) for p in TEST_PATHS
if os.path.exists(os.path.join(TOPDIR, p, test, type))]

# Allow the user to specify full path to test folder
test_path = os.path.abspath(os.path.join(test, type))
if os.path.exists(test_path):
matches.append(test_path)

# It is a fatal error to find less than 1 or more than 1 match
if len(matches) == 0:
logger.fatal('Could not find [{}] in any directories:'.format(type))
Expand Down
2 changes: 1 addition & 1 deletion mk/uvmt/uvmt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ SIM_RESULTS ?= $(if $(CV_RESULTS),$(abspath $(CV_RESULTS))/$(SIMULAT
SIM_CFG_RESULTS = $(SIM_RESULTS)/$(CFG)
SIM_COREVDV_RESULTS = $(SIM_CFG_RESULTS)/corev-dv
SIM_LDGEN_RESULTS = $(if $(LDGEN),$(SIM_CFG_RESULTS)/$(LDGEN),$(SIM_CFG_RESULTS))
SIM_TEST_RESULTS = $(SIM_CFG_RESULTS)/$(TEST)
SIM_TEST_RESULTS = $(SIM_CFG_RESULTS)/$(TEST_NAME)
SIM_RUN_RESULTS = $(SIM_TEST_RESULTS)/$(RUN_INDEX)
SIM_TEST_PROGRAM_RESULTS = $(SIM_RUN_RESULTS)/test_program
SIM_BSP_RESULTS = $(SIM_TEST_PROGRAM_RESULTS)/bsp
Expand Down

0 comments on commit 71e9309

Please sign in to comment.