Skip to content

Commit 912e6f8

Browse files
committed
unit-tests: use clean test environment
So far, unit-tests are run in the user's environment, in particular with the user's git config which can influence test runs. Set up the same clean test environment which we use for the other tests.
1 parent 700c83d commit 912e6f8

3 files changed

Lines changed: 387 additions & 1 deletion

File tree

t/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ prove: pre-clean $(TEST_LINT)
8383
$(MAKE) clean-except-prove-cache
8484

8585
$(T):
86-
@echo "*** $@ ***"; '$(TEST_SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
86+
@echo "*** $@ ***"; '$(TEST_SHELL_PATH_SQ)' ./run-test.sh $@ $(GIT_TEST_OPTS)
8787

8888
$(UNIT_TESTS):
8989
@echo "*** $@ ***"; $@

t/run-test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ case "$1" in
1313
exec "${TEST_SHELL_PATH}" "$@" ${TEST_OPTIONS}
1414
;;
1515
*)
16+
. ./unittest-lib.sh
1617
exec "$@"
1718
;;
1819
esac

0 commit comments

Comments
 (0)