]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: update TestScripts/svn to not depend on TZ database
authorqmuntal <quimmuntal@gmail.com>
Wed, 2 Nov 2022 16:41:21 +0000 (17:41 +0100)
committerGopher Robot <gobot@golang.org>
Thu, 3 Nov 2022 15:34:01 +0000 (15:34 +0000)
`TestScripts/svn` test suite fails if the host does not have a TZ
database installed.

This CL updates those tests so SVN formats dates using UTC, which
don't require a TZ database.

Fixes #56527

Change-Id: I20f3c03c3cedd7d748f4623dddc66bd04d1df318
Reviewed-on: https://go-review.googlesource.com/c/go/+/447335
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>

src/cmd/go/testdata/vcstest/svn/hello.txt
src/cmd/go/testdata/vcstest/svn/test1-svn-git.txt
src/cmd/go/testdata/vcstest/svn/test2-svn-git.txt

index b68ce9596999f8a35002e1199dc46bc5a8d37f70..526d00fc4b8be8eb8733708920400730436f2d4c 100644 (file)
@@ -1,6 +1,7 @@
 handle svn
 
-env TZ='America/New_York'
+# Ensure SVN displays dates using UTC.
+env TZ=''
 
 mkdir db/transactions
 mkdir db/txn-protorevs
@@ -30,7 +31,7 @@ func main() {
 }
 -- .checkout/.svn-log --
 ------------------------------------------------------------------------
-r1 | rsc | 2017-09-21 21:12:45 -0400 (Thu, 21 Sep 2017) | 3 lines
+r1 | rsc | 2017-09-22 01:12:45 +0000 (Fri, 22 Sep 2017) | 3 lines
 
 hello world
 
index 06ceef1a41cf9b52f83afb79fdd75838c891177a..3190e823e543047df6b3ee29422196ca0887a875 100644 (file)
@@ -13,7 +13,9 @@ env GIT_AUTHOR_NAME='Russ Cox'
 env GIT_AUTHOR_EMAIL='rsc@golang.org'
 env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
 env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
-env TZ='America/New_York'
+
+# Ensure SVN displays dates using UTC.
+env TZ=''
 
 mkdir db/transactions
 mkdir db/txn-protorevs
@@ -108,23 +110,23 @@ import _ "vcs-test.swtch.com/go/test1-svn-git/git-README-only/other"
 package tiny
 -- .checkout/.svn-log --
 ------------------------------------------------------------------------
-r5 | rsc | 2017-10-04 11:08:26 -0400 (Wed, 04 Oct 2017) | 1 line
+r5 | rsc | 2017-10-04 15:08:26 +0000 (Wed, 04 Oct 2017) | 1 line
 
 move from vcs-test.swtch.com to vcs-test.golang.org
 ------------------------------------------------------------------------
-r4 | rsc | 2017-09-27 13:48:18 -0400 (Wed, 27 Sep 2017) | 1 line
+r4 | rsc | 2017-09-27 17:48:18 +0000 (Wed, 27 Sep 2017) | 1 line
 
 add tiny
 ------------------------------------------------------------------------
-r3 | rsc | 2017-09-22 12:56:16 -0400 (Fri, 22 Sep 2017) | 1 line
+r3 | rsc | 2017-09-22 16:56:16 +0000 (Fri, 22 Sep 2017) | 1 line
 
 add other
 ------------------------------------------------------------------------
-r2 | rsc | 2017-09-22 11:49:11 -0400 (Fri, 22 Sep 2017) | 1 line
+r2 | rsc | 2017-09-22 15:49:11 +0000 (Fri, 22 Sep 2017) | 1 line
 
 use git-README-only/pkg
 ------------------------------------------------------------------------
-r1 | rsc | 2017-09-22 11:41:54 -0400 (Fri, 22 Sep 2017) | 1 line
+r1 | rsc | 2017-09-22 15:41:54 +0000 (Fri, 22 Sep 2017) | 1 line
 
 add modified git-README-only
 ------------------------------------------------------------------------
index 71d84c45c2f6eff4edd57074c1a059b09c3c06ba..ee0f90996b1b00a490213699e5de0335d97e065f 100644 (file)
@@ -13,7 +13,9 @@ env GIT_AUTHOR_NAME='Russ Cox'
 env GIT_AUTHOR_EMAIL='rsc@golang.org'
 env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
 env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
-env TZ='America/New_York'
+
+# Ensure SVN displays dates using UTC.
+env TZ=''
 
 mkdir db/transactions
 mkdir db/txn-protorevs
@@ -86,15 +88,15 @@ README
 package p1
 -- .checkout/.svn-log --
 ------------------------------------------------------------------------
-r3 | rsc | 2017-10-04 11:09:35 -0400 (Wed, 04 Oct 2017) | 1 line
+r3 | rsc | 2017-10-04 15:09:35 +0000 (Wed, 04 Oct 2017) | 1 line
 
 move from vcs-test.swtch.com to vcs-test.golang.org
 ------------------------------------------------------------------------
-r2 | rsc | 2017-09-27 14:16:14 -0400 (Wed, 27 Sep 2017) | 1 line
+r2 | rsc | 2017-09-27 18:16:14 +0000 (Wed, 27 Sep 2017) | 1 line
 
 add p1
 ------------------------------------------------------------------------
-r1 | rsc | 2017-09-27 14:00:52 -0400 (Wed, 27 Sep 2017) | 1 line
+r1 | rsc | 2017-09-27 18:00:52 +0000 (Wed, 27 Sep 2017) | 1 line
 
 git
 ------------------------------------------------------------------------