Skip to content
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

use filepath.WalkDir, add TestScript.Name #236

Merged
merged 2 commits into from Oct 26, 2023
Merged

Conversation

mvdan
Copy link
Collaborator

@mvdan mvdan commented Oct 24, 2023

(see commit messages - please do not squash)

This can easily save hundreds of stat calls per test script,
particularly when testing Go tools.

While here, remove a few uses of the deprecated io/ioutil in cmd,
and check some missed errors in txtar-c.
This will be useful in some cmd/cue test scripts
where we want each test to create a unique remote resource
that includes the current test name as a prefix,
for the sake of more easily seeing which test created which resource.
@mvdan mvdan requested review from rogpeppe and myitcv October 24, 2023 21:39
@mvdan
Copy link
Collaborator Author

mvdan commented Oct 24, 2023

FYI, the second commit is needed for the cmd/cue e2e tests. The first commit I had stashed for a couple of weeks and forgot about :)

Copy link
Collaborator

@myitcv myitcv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mvdan mvdan merged commit fa6a31e into rogpeppe:master Oct 26, 2023
6 checks passed
@mvdan mvdan deleted the walkdir branch October 30, 2023 10:20
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.

None yet

2 participants