diff options
author | Bryan C. Mills <bcmills@google.com> | 2019-02-14 17:38:36 -0500 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2019-02-19 19:56:43 +0000 |
commit | cf155b00d18f855eaaf2a541190dba3ff7b7cf8a (patch) | |
tree | c25c77ebcaaa877cdcf7b127503fb461d7fa4551 /src/runtime/crash_unix_test.go | |
parent | a10b4cff91cb5d26e2049f6efc20349aa4d50d20 (diff) | |
download | go-cf155b00d18f855eaaf2a541190dba3ff7b7cf8a.tar.gz go-cf155b00d18f855eaaf2a541190dba3ff7b7cf8a.zip |
runtime: make tests that invoke 'go build' module-agnostic
In module mode, building the current directory requires a go.mod file
(in order to determine the import path of the package).
Change the tests to pass explicit file arguments instead, since those
can be built in module mode without defining a module.
Updates #30228
Change-Id: I680c658d1f79645f73ad4d1e88189ea50a4852e9
Reviewed-on: https://go-review.googlesource.com/c/162837
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Diffstat (limited to 'src/runtime/crash_unix_test.go')
-rw-r--r-- | src/runtime/crash_unix_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/crash_unix_test.go b/src/runtime/crash_unix_test.go index 1384e00210..987c7095a0 100644 --- a/src/runtime/crash_unix_test.go +++ b/src/runtime/crash_unix_test.go @@ -63,7 +63,7 @@ func TestCrashDumpsAllThreads(t *testing.T) { t.Fatalf("failed to create Go file: %v", err) } - cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", "a.exe") + cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", "a.exe", "main.go") cmd.Dir = dir out, err := testenv.CleanCmdEnv(cmd).CombinedOutput() if err != nil { |