diff options
| author | Ian Lance Taylor <iant@golang.org> | 2026-01-30 15:52:19 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-02-02 12:16:54 -0800 |
| commit | 07f7f8ca5202bdcd39216e25b4a5b2c309ea727f (patch) | |
| tree | aaf801edf37a59f4fdc0830e671f4a895029385c /src/cmd/covdata | |
| parent | 1c9abbdc8e9032cd613bd147c78b166ebacc8a2e (diff) | |
| download | go-07f7f8ca5202bdcd39216e25b4a5b2c309ea727f.tar.xz | |
cmd/cover, cmd/covdata: actually delete temp dirs
The code was using defer in TestMain, but was also calling os.Exit,
which meant that the deferred functions did not run.
TestMain does not require calling os.Exit, so stop doing it.
Change-Id: I25ca64c36acf65dae3dc3f46e5fa513b9460a8e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/740781
Reviewed-by: Than McIntosh <thanm@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/cmd/covdata')
| -rw-r--r-- | src/cmd/covdata/tool_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/covdata/tool_test.go b/src/cmd/covdata/tool_test.go index 730adf4c8e..a9669e7b6a 100644 --- a/src/cmd/covdata/tool_test.go +++ b/src/cmd/covdata/tool_test.go @@ -50,7 +50,7 @@ func TestMain(m *testing.M) { fmt.Fprintf(os.Stderr, "debug: preserving tmpdir %s\n", topTmpdir) } os.Setenv("CMDCOVDATA_TEST_RUN_MAIN", "true") - os.Exit(m.Run()) + m.Run() } var tdmu sync.Mutex |
