Skip to content

Disable test caching on Windows, hide gotestsum skipped tests outside CI #685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 21, 2025

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Mar 21, 2025

We've discovered that the go test cache makes go test ./internal/testrunner 4-5x slower on Windows:

$ go clean -testcache
$ Measure-Command { go test ./internal/testrunner | Out-Default }
ok      github.com/microsoft/typescript-go/internal/testrunner  13.584s

Days              : 0
Hours             : 0
Minutes           : 1
Seconds           : 5
Milliseconds      : 364
Ticks             : 653649277
TotalDays         : 0.000756538515046296
TotalHours        : 0.0181569243611111
TotalMinutes      : 1.08941546166667
TotalSeconds      : 65.3649277
TotalMilliseconds : 65364.9277
$ Measure-Command { go test -count=1 ./internal/testrunner | Out-Default }
ok      github.com/microsoft/typescript-go/internal/testrunner  11.726s

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 15
Milliseconds      : 296
Ticks             : 152960956
TotalDays         : 0.000177038143518519
TotalHours        : 0.00424891544444444
TotalMinutes      : 0.254934926666667
TotalSeconds      : 15.2960956
TotalMilliseconds : 15296.0956

Disable it for hereby test on Windows by setting -count=1 for now until we can report this upstream.

Additionally, we have >1000 skipped tests, which spam the gotestsum output. Outside CI, hide this text by default. (I had originally not used skipped tests for the test runner for this reason, which I could change back again instead. Instead this PR will explicitly print a warning about not having the submodule cloned, which is the only place we had skipped tests previously.)

@jakebailey
Copy link
Member Author

Filed golang/go#72992 upstream.

@jakebailey jakebailey enabled auto-merge March 21, 2025 16:01
@jakebailey jakebailey disabled auto-merge March 21, 2025 16:01
@jakebailey jakebailey enabled auto-merge March 21, 2025 16:02
@jakebailey jakebailey added this pull request to the merge queue Mar 21, 2025
Merged via the queue into main with commit a7e0eb4 Mar 21, 2025
22 checks passed
EricSpencer00 pushed a commit to EricSpencer00/typescript-go that referenced this pull request Mar 21, 2025
@jakebailey jakebailey deleted the jabaile/test-runner-fixes branch March 21, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants