Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15
STALE3753d

[PATCH 1/2] test-lib: allow using split index in the test suite

From: Thomas Gummerer <hidden>
Date: 2016-06-15 23:04:14
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

Possibly related (same subject, not in this thread)

Allow adding a TEST_GIT_TEST_SPLIT_INDEX variable to config.mak to run
the test suite with split index enabled.

Signed-off-by: Thomas Gummerer <redacted>
---
 Makefile      | 6 ++++++
 t/test-lib.sh | 6 ++++++
 2 files changed, 12 insertions(+)
diff --git a/Makefile b/Makefile
index 44f1dd1..55e558a 100644
--- a/Makefile
+++ b/Makefile
@@ -339,6 +339,9 @@ all::
 # with a different indexfile format version.  If it isn't set the index
 # file format used is index-v[23].
 #
+# Define TEST_GIT_TEST_SPLIT_INDEX to 1 to run the test suite with split
+# index enabled.
+#
 # Define GMTIME_UNRELIABLE_ERRORS if your gmtime() function does not
 # return NULL when it receives a bogus time_t.
 #
@@ -2129,6 +2132,9 @@ endif
 ifdef TEST_GIT_INDEX_VERSION
 	@echo TEST_GIT_INDEX_VERSION=\''$(subst ','\'',$(subst ','\'',$(TEST_GIT_INDEX_VERSION)))'\' >>$@
 endif
+ifdef TEST_GIT_TEST_SPLIT_INDEX
+	@echo TEST_GIT_TEST_SPLIT_INDEX=\''$(subst ','\'',$(subst ','\'',$(TEST_GIT_TEST_SPLIT_INDEX)))'\' >>$@
+endif
 
 ### Detect Python interpreter path changes
 ifndef NO_PYTHON
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c096778..477f253 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -119,6 +119,12 @@ then
 	export GIT_INDEX_VERSION
 fi
 
+if test -n "${TEST_GIT_TEST_SPLIT_INDEX:+isset}"
+then
+	GIT_TEST_SPLIT_INDEX="$TEST_GIT_TEST_SPLIT_INDEX"
+	export GIT_TEST_SPLIT_INDEX
+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 ||
-- 
2.1.0.264.g0463184.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help