Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[go1.20] Updated gorepo test flag handling #1304

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 1 commit into from
May 6, 2024

Conversation

grantnelson-wf
Copy link
Collaborator

@grantnelson-wf grantnelson-wf commented May 2, 2024

The Go file go1.20.14:test/run.go added more handling of the test flag arguments. Since some of the new tests for go1.20 use these flags, I updated the flag parsing into the GopherJS copy of the same runner, gorepo/run.go. These updates are nearly identical copies of the code from the Go repo. Any deviations I've commented with a // GOPHERJS: comment. This is part of #1270

Other than being able to handle more flags, the only main change was adding the timeout flag ability. The comment in the timeout (i.e. "This command-timeout code adapted...") is from the original source code.

Here is an example of a test, fixedbugs/issue59334.go, failing prior to this update:

# go run run.go -- fixedbugs/issue59334.go
exit status 1
unknown shorthand flag: 't' in -tags=purego

FAIL    fixedbugs/issue59334.go 0.037s

@grantnelson-wf grantnelson-wf marked this pull request as ready for review May 3, 2024 18:19
@nevkontakte nevkontakte merged commit 31a8063 into gopherjs:go1.20 May 6, 2024
5 of 8 checks passed
@grantnelson-wf grantnelson-wf deleted the gorepoTestTimeout branch May 6, 2024 20:45
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.

2 participants