From 71e930924d6ff987fea9be52c56168e0a81e41d6 Mon Sep 17 00:00:00 2001 From: Kjetil Osteras Date: Mon, 25 Mar 2024 11:41:25 +0100 Subject: [PATCH] Adding support for providing tests that are placed outside of tree This change will make it possible to build and run simulation on testfolders that are placed in other directories than the hardcoded test subfolders. --- bin/yaml2make | 5 +++++ mk/uvmt/uvmt.mk | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/yaml2make b/bin/yaml2make index 47ccb4f594..0c786227c8 100755 --- a/bin/yaml2make +++ b/bin/yaml2make @@ -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)) diff --git a/mk/uvmt/uvmt.mk b/mk/uvmt/uvmt.mk index 1073f5d870..bdd885f28b 100644 --- a/mk/uvmt/uvmt.mk +++ b/mk/uvmt/uvmt.mk @@ -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