diff --git a/makefiles/tests/tests.inc.mk b/makefiles/tests/tests.inc.mk index 8aaaa72387..f10e8ec642 100644 --- a/makefiles/tests/tests.inc.mk +++ b/makefiles/tests/tests.inc.mk @@ -85,6 +85,9 @@ test-with-config/check-config: done; \ ${COLOR_ECHO} -n "${COLOR_RESET}" + +RIOT_TEST_HASH_DIR ?= $(BINDIR) + # this target only makes sense if an ELFFILE is actually created, thus guard by # RIOTNOLINK="". ifeq (,$(RIOTNOLINK)) @@ -92,10 +95,10 @@ ifeq (,$(RIOTNOLINK)) $(error HASHFILE is empty for $(BOARD)) endif test-input-hash: $(TESTS) $(TESTS_WITH_CONFIG) $(TESTS_AS_ROOT) $(HASHFILE) $(TEST_EXTRA_FILES) - sha1sum $^ > $(BINDIR)/test-input-hash.sha1 + sha1sum $^ > $(RIOT_TEST_HASH_DIR)/test-input-hash.sha1 else # .SECONDARY creates the bin folder, we depend on it to avoid writing to it # prior to it being created when concurrent building is used test-input-hash: .SECONDARY - $(file >$(BINDIR)/test-input-hash.sha1,no binary generated due to RIOTNOLINK=1) + $(file >$(RIOT_TEST_HASH_DIR)/test-input-hash.sha1,no binary generated due to RIOTNOLINK=1) endif diff --git a/makefiles/vars.inc.mk b/makefiles/vars.inc.mk index 53d29b953d..42992202a3 100644 --- a/makefiles/vars.inc.mk +++ b/makefiles/vars.inc.mk @@ -46,6 +46,7 @@ export RIOTMAKE # Location of all supplemental Makefiles (such as t export RIOTKCONFIG # Location of all supplemental Kconfig files export BINDIRBASE # This is the folder where the application should be built in. For each BOARD a different subfolder is used. export BINDIR # This is the folder where the application should be built in. +export RIOT_TEST_HASH_DIR # The dir to generate the test-input-hash.sha1 file for checking if a test has changed, uses BINDIR by default. export CARGO_TARGET_DIR # This is the folder where Rust parts of the application should be built in. export BUILD_DIR # This is the base folder to store common build files and artifacts, e.g. test results. export APPDIR # The base folder containing the application