]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/tls: fix test caching for bogo
authorRoland Shoemaker <roland@golang.org>
Wed, 29 May 2024 17:38:15 +0000 (10:38 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 4 Jun 2024 16:56:43 +0000 (16:56 +0000)
Use a stat to tell the test caching infrastructure that we care about
the bogo config file.

Change-Id: Iae2336bfc45cd6a9e73cb83a3b68ade8b4f23927
Reviewed-on: https://go-review.googlesource.com/c/go/+/589155
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>

src/crypto/tls/bogo_shim_test.go

index b9db73de81603a3e7c171b52582f7b2bfc221b3b..09b20a1c70370115dba1727e86d9c4b773a51c8d 100644 (file)
@@ -301,6 +301,14 @@ func TestBogoSuite(t *testing.T) {
                t.Skip("#66913: windows network connections are flakey on builders")
        }
 
+       // In order to make Go test caching work as expected, we stat the
+       // bogo_config.json file, so that the Go testing hooks know that it is
+       // important for this test and will invalidate a cached test result if the
+       // file changes.
+       if _, err := os.Stat("bogo_config.json"); err != nil {
+               t.Fatal(err)
+       }
+
        var bogoDir string
        if *bogoLocalDir != "" {
                bogoDir = *bogoLocalDir