aboutsummaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2014-02-23 21:49:58 +0100
committerJunio C Hamano <gitster@pobox.com>2014-02-24 13:33:17 -0800
commit5d9fc888b485caa1b6a95f2cb583dc26ab7e8d13 (patch)
treeccbd11c9cb1acce9ba0852de740213ba5151a698 /t/test-lib.sh
parent136347d718320c56030e3b7a3437259e99c4c41b (diff)
downloadgit-5d9fc888b485caa1b6a95f2cb583dc26ab7e8d13.tar.gz
git-5d9fc888b485caa1b6a95f2cb583dc26ab7e8d13.tar.xz
test-lib: allow setting the index format version
Allow adding a TEST_GIT_INDEX_VERSION variable to config.mak to set the index version with which the test suite should be run. If it isn't set, the default version given in the source code is used (currently version 3). To avoid breakages with index versions other than [23], also set the index version under which t2104 is run to 3. This test only tests functionality specific to version 2 and 3 of the index file and would fail if the test suite is run with any other version. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 1531c241c..569b52dc0 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -108,6 +108,12 @@ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
export EDITOR
+if test -n "${TEST_GIT_INDEX_VERSION:+isset}"
+then
+ GIT_INDEX_VERSION="$TEST_GIT_INDEX_VERSION"
+ export GIT_INDEX_VERSION
+fi
+
# Add libc MALLOC and MALLOC_PERTURB test
# only if we are not executing the test with valgrind
if expr " $GIT_TEST_OPTS " : ".* --valgrind " >/dev/null ||