From: Ben Peart <benpeart@microsoft.com>
To: "peartben@gmail.com" <peartben@gmail.com>
Cc: Ben Peart <Ben.Peart@microsoft.com>,
"avarab@gmail.com" <avarab@gmail.com>,
Ben Peart <Ben.Peart@microsoft.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
"gitster@pobox.com" <gitster@pobox.com>,
"t.gummerer@gmail.com" <t.gummerer@gmail.com>
Subject: [PATCH v2 4/5] read-cache: update TEST_GIT_INDEX_VERSION support
Date: Fri, 14 Sep 2018 20:14:03 +0000 [thread overview]
Message-ID: <20180914201340.37400-5-benpeart@microsoft.com> (raw)
In-Reply-To: <20180914201340.37400-1-benpeart@microsoft.com>
Rename TEST_GIT_INDEX_VERSION to GIT_TEST_INDEX_VERSION for consistency with
the other GIT_TEST_ special setups and properly document its use.
Add logic in t/test-lib.sh to give a warning when the old variable is set to
let people know they need to update their environment to use the new
variable.
Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
---
Makefile | 6 +++---
t/README | 4 ++++
t/test-lib.sh | 5 +++--
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 5a969f5830..9e84ef02f7 100644
--- a/Makefile
+++ b/Makefile
@@ -400,7 +400,7 @@ all::
# (defaults to "man") if you want to have a different default when
# "git help" is called without a parameter specifying the format.
#
-# Define TEST_GIT_INDEX_VERSION to 2, 3 or 4 to run the test suite
+# Define GIT_TEST_INDEX_VERSION to 2, 3 or 4 to run the test suite
# with a different indexfile format version. If it isn't set the index
# file format used is index-v[23].
#
@@ -2599,8 +2599,8 @@ endif
ifdef GIT_INTEROP_MAKE_OPTS
@echo GIT_INTEROP_MAKE_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_INTEROP_MAKE_OPTS)))'\' >>$@+
endif
-ifdef TEST_GIT_INDEX_VERSION
- @echo TEST_GIT_INDEX_VERSION=\''$(subst ','\'',$(subst ','\'',$(TEST_GIT_INDEX_VERSION)))'\' >>$@+
+ifdef GIT_TEST_INDEX_VERSION
+ @echo GIT_TEST_INDEX_VERSION=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_INDEX_VERSION)))'\' >>$@+
endif
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
diff --git a/t/README b/t/README
index 47165f7eab..9b13f6d12e 100644
--- a/t/README
+++ b/t/README
@@ -323,6 +323,10 @@ GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor
code path for utilizing a file system monitor to speed up detecting
new or changed files.
+GIT_TEST_INDEX_VERSION=<n> exercises the index read/write code path
+for the index version specified. Can be set to any valid version
+(currently 2, 3, or 4).
+
Naming Tests
------------
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 653688c067..397eb71578 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -134,9 +134,9 @@ export EDITOR
GIT_TRACE_BARE=1
export GIT_TRACE_BARE
-if test -n "${TEST_GIT_INDEX_VERSION:+isset}"
+if test -n "${GIT_TEST_INDEX_VERSION:+isset}"
then
- GIT_INDEX_VERSION="$TEST_GIT_INDEX_VERSION"
+ GIT_INDEX_VERSION="$GIT_TEST_INDEX_VERSION"
export GIT_INDEX_VERSION
fi
@@ -159,6 +159,7 @@ check_var_migration () {
}
check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR
+check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION
# Add libc MALLOC and MALLOC_PERTURB test
# only if we are not executing the test with valgrind
--
2.18.0.windows.1
next prev parent reply other threads:[~2018-09-14 20:14 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 14:37 [PATCH v1 0/4] Cleanup pass on special test setups Ben Peart
2018-09-14 14:37 ` [PATCH v1 1/4] correct typo/spelling error in t/README Ben Peart
2018-09-14 14:37 ` [PATCH v1 2/4] fsmonitor: update GIT_TEST_FSMONITOR support Ben Peart
2018-09-14 16:59 ` Junio C Hamano
2018-09-14 17:03 ` Junio C Hamano
2018-09-14 17:15 ` Junio C Hamano
2018-09-14 18:05 ` Ben Peart
2018-09-14 18:18 ` Junio C Hamano
2018-09-14 20:13 ` [PATCH v2 0/5] Cleanup pass on special test setups Ben Peart
2018-09-14 20:13 ` [PATCH v2 1/5] correct typo/spelling error in t/README Ben Peart
2018-09-14 20:43 ` Jonathan Nieder
2018-09-14 20:14 ` [PATCH v2 2/5] preload-index: teach GIT_FORCE_PRELOAD_TEST to take a boolean Ben Peart
2018-09-14 20:51 ` Jonathan Nieder
2018-09-14 21:54 ` Junio C Hamano
2018-09-14 20:14 ` [PATCH v2 3/5] fsmonitor: update GIT_TEST_FSMONITOR support Ben Peart
2018-09-14 20:14 ` Ben Peart [this message]
2018-09-14 22:13 ` [PATCH v2 4/5] read-cache: update TEST_GIT_INDEX_VERSION support Junio C Hamano
2018-09-14 22:26 ` Junio C Hamano
2018-09-14 20:14 ` [PATCH v2 5/5] preload-index: update GIT_FORCE_PRELOAD_TEST support Ben Peart
2018-09-14 14:37 ` [PATCH v1 3/4] read-cache: update TEST_GIT_INDEX_VERSION support Ben Peart
2018-09-14 14:37 ` [PATCH v1 4/4] preload-index: update GIT_FORCE_PRELOAD_TEST support Ben Peart
2018-09-18 23:29 ` [PATCH v3 0/5] Cleanup pass on special test setups Ben Peart
2018-09-18 23:29 ` [PATCH v3 1/5] t/README: correct spelling of "uncommon" Ben Peart
2018-09-18 23:29 ` [PATCH v3 2/5] preload-index: use git_env_bool() not getenv() for customization Ben Peart
2018-09-18 23:29 ` [PATCH v3 3/5] fsmonitor: update GIT_TEST_FSMONITOR support Ben Peart
2018-09-28 10:01 ` SZEDER Gábor
2018-09-28 14:21 ` Ben Peart
2018-09-28 14:27 ` Ben Peart
2018-09-28 18:43 ` Junio C Hamano
2018-09-18 23:29 ` [PATCH v3 4/5] read-cache: update TEST_GIT_INDEX_VERSION support Ben Peart
2018-09-18 23:29 ` [PATCH v3 5/5] preload-index: update GIT_FORCE_PRELOAD_TEST support Ben Peart
2018-09-20 18:43 ` Re*: [PATCH v3 0/5] Cleanup pass on special test setups Junio C Hamano
2018-09-25 18:44 ` Ben Peart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180914201340.37400-5-benpeart@microsoft.com \
--to=benpeart@microsoft.com \
--cc=Ben.Peart@microsoft.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peartben@gmail.com \
--cc=t.gummerer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).