git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/4] deterministic commit timestamps in tests

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 10, 2020, 22:02 UTC
Message-ID
<xmqqa707rpuu.fsf@gitster.c.googlers.com>
In-Reply-To
<20200709203336.GA2748777@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 33 quoted lines
> Most tests use test_tick or test_commit to get deterministic timestamps
> in commits. Some don't because they don't care about the timestamps. But
> they can still be annoying to debug, since the output changes from run
> to run.
>
> This series sets a default timestamp for those scripts, in a way that
> doesn't interfere with anybody using test_tick. The change is in the
> final commit. The others are preparatory to deal with fallout in the
> test suite. Normally fallout would give me pause about whether this is a
> good idea, but a) there's not much of it and b) I think it helped shake
> out questionable assumptions in those tests.
>
> This a replacement for the patches being discussed in:
>
>   https://lore.kernel.org/git/pull.816.git.git.1594149804313.gitgitgadget@gmail.com/
>
> It looks like Junio already picked up one of the fixes as
> jk/t6000-timestamp-fix. The first patch here is identical (so we can
> either drop that branch, or drop the first patch from this series and
> apply on top).
>
>   [1/4]: t6000: use test_tick consistently
>   [2/4]: t9700: loosen ident timezone regex
>   [3/4]: t5539: make timestamp requirements more explicit
>   [4/4]: test-lib: set deterministic default author/committer date
>
>  t/t5539-fetch-http-shallow.sh | 4 +++-
>  t/t6000-rev-list-misc.sh      | 7 +++++--
>  t/t9700/test.pl               | 6 +++---
>  t/test-lib.sh                 | 3 +++
>  4 files changed, 14 insertions(+), 6 deletions(-)
>
> -Peff

I have this queued on top for today's integration run. The last step is something worth doing in the longer term, but certainly not for the upcoming release ;-).

-- >8 --
Subject: [PATCH] BANDAID: t9100.17 & t9100.18
---
 t/t9100-git-svn-basic.sh | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 2c309a57d9..33ea813585 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -8,6 +8,8 @@ GIT_SVN_LC_ALL=${LC_ALL:-$LANG}
 
 . ./lib-git-svn.sh
 
+unset GIT_AUTHOR_DATE GIT_COMMITTER_DATE
+
 case "$GIT_SVN_LC_ALL" in
 *.UTF-8)
 	test_set_prereq UTF8
-- 
2.28.0-rc0
Previous: Jeff KingNext: Jeff King
Message 6 of 13 in “deterministic commit timestamps in tests”
  1. 0/4 deterministic commit timestamps in testsJeff King, Jul 9, 2020
  2. 1/4 t6000: use test_tick consistentlyJeff King, Jul 9, 2020
  3. 2/4 t9700: loosen ident timezone regexJeff King, Jul 9, 2020
  4. 3/4 t5539: make timestamp requirements more explicitJeff King, Jul 9, 2020
  5. 4/4 test-lib: set deterministic default author/committer dateJeff King, Jul 9, 2020
  6. Junio C HamanoJul 10, 2020
  7. Jeff KingJul 14, 2020
  8. Jeff KingJul 14, 2020
  9. Eric WongJul 14, 2020
  10. Jeff KingJul 15, 2020
  11. Junio C HamanoJul 15, 2020
  12. Junio C HamanoJul 15, 2020
  13. Jeff KingJul 16, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.