]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/internal/fipstest: fix TestACVP not to write to module cache
authorRuss Cox <rsc@golang.org>
Wed, 20 Nov 2024 15:08:18 +0000 (10:08 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 20 Nov 2024 18:12:28 +0000 (18:12 +0000)
Not sure how this ever worked; the module cache is read-only.

Change-Id: I22e4945fa0bac101995ab9101d22dcfdcee40776
Reviewed-on: https://go-review.googlesource.com/c/go/+/629976
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/crypto/internal/fipstest/acvp_test.go

index 48559f601353a28db8dc6b91a2fe617cb1d0f41e..e59978e8804bbd24ede70836d3040789b34d4736 100644 (file)
@@ -368,9 +368,11 @@ func TestACVP(t *testing.T) {
        t.Log("building acvptool")
 
        // Build the acvptool binary.
+       toolPath := filepath.Join(t.TempDir(), "acvptool.exe")
        goTool := testenv.GoToolPath(t)
        cmd := testenv.Command(t, goTool,
                "build",
+               "-o", toolPath,
                "./util/fipstools/acvp/acvptool")
        cmd.Dir = bsslDir
        out := &strings.Builder{}
@@ -387,7 +389,6 @@ func TestACVP(t *testing.T) {
                t.Fatalf("failed to fetch cwd: %s", err)
        }
        configPath := filepath.Join(cwd, "acvp_test.config.json")
-       toolPath := filepath.Join(bsslDir, "acvptool")
        t.Logf("running check_expected.go\ncwd: %q\ndata_dir: %q\nconfig: %q\ntool: %q\nmodule-wrapper: %q\n",
                cwd, dataDir, configPath, toolPath, os.Args[0])