You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/lsp/regtest: use a common directory for regtest sandboxes
For easier debugging (and less cruft if regtests are ctrl-c'ed), root
all regtest sandboxes in a common directory.
This also tries one last time to clean up the directory, and fails on an
error. This might be flaky on windows, but hasn't been so far...
Also give regtest sandboxes names derived from their test name.
Updates golang/go#39384
Updates golang/go#38490
Change-Id: Iae53c29e75f5eb2b8d938d205fbeb463ffc82eb2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/240059
Run-TryBot: Robert Findley <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Rebecca Stambler <[email protected]>
Copy file name to clipboardExpand all lines: internal/lsp/regtest/reg_test.go
+12-1
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ import (
8
8
"context"
9
9
"flag"
10
10
"fmt"
11
+
"io/ioutil"
11
12
"os"
12
13
"testing"
13
14
"time"
@@ -20,6 +21,7 @@ var (
20
21
runSubprocessTests=flag.Bool("enable_gopls_subprocess_tests", false, "run regtests against a gopls subprocess")
21
22
goplsBinaryPath=flag.String("gopls_test_binary", "", "path to the gopls binary for use as a remote, for use with the -enable_gopls_subprocess_tests flag")
22
23
regtestTimeout=flag.Duration("regtest_timeout", 60*time.Second, "default timeout for each regtest")
24
+
skipCleanup=flag.Bool("regtest_skip_cleanup", false, "whether to skip cleaning up temp directories")
23
25
printGoroutinesOnFailure=flag.Bool("regtest_print_goroutines", false, "whether to print goroutines info on failure")
0 commit comments