From 02a32dbff7e13c8cf39339e0fb6b331cab02688a Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Wed, 29 Jul 2020 23:14:24 +0000 Subject: t: allow testing different hash algorithms via environment To allow developers to run the testsuite with a different algorithm than the default, provide an environment variable, GIT_TEST_DEFAULT_HASH, to specify the algorithm to use. Compute the fixed constants using test_oid. Move the constant initialization down below the point where test-lib-functions.sh is loaded so the functions are defined. Signed-off-by: brian m. carlson Reviewed-by: Eric Sunshine Signed-off-by: Junio C Hamano --- t/test-lib.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 't/test-lib.sh') diff --git a/t/test-lib.sh b/t/test-lib.sh index 618a7c8d5b..307bb2207e 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -452,6 +452,9 @@ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME export EDITOR +GIT_DEFAULT_HASH="${GIT_TEST_DEFAULT_HASH:-sha1}" +export GIT_DEFAULT_HASH + # Tests using GIT_TRACE typically don't want : output GIT_TRACE_BARE=1 export GIT_TRACE_BARE -- cgit v1.3-5-g9baa