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

Fix Windows CI test failures by cleaning env vars #43

Merged
merged 6 commits into from
Feb 7, 2023

Conversation

JohnStarich
Copy link
Contributor

@JohnStarich JohnStarich commented Jan 29, 2023

Adds a script to clean the test environment variables.
Uses a Go script for easy cross-OS portability.

Currently under ./internal/cmd/cleanenv. If it should be shared more widely, then ./cmd/cleanenv may be more appropriate. Done.

Fixes #40 and unblocks #42

Add script to clean the test environment variables.
Uses a Go script for cross-OS portability.
@JohnStarich JohnStarich marked this pull request as ready for review January 29, 2023 03:36
}
}

type App struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I designed this with extensibility and testability in mind, hence extra bits like this. It should help if we later decide to share the tool more widely.

Copy link
Owner

@agnivade agnivade left a comment

Choose a reason for hiding this comment

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

In my testing, I can see that:

cleanenv -remove-prefix=JAVA -- GOOS=js GOARCH=wasm go test -exec=/home/agniva/go/bin/wasmbrowsertest -v

fails with exec: "GOOS=js": executable file not found in $PATH, and we need to move the env var declarations ahead like so:

GOOS=js GOARCH=wasm cleanenv -remove-prefix=JAVA -- go test -exec=/home/agniva/go/bin/wasmbrowsertest -v

Wondering if we can look into supporting this? Or if it's too much work, we can just go ahead and document it.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
cmd/cleanenv/main.go Outdated Show resolved Hide resolved
cmd/cleanenv/main_test.go Show resolved Hide resolved
cmd/cleanenv/main.go Show resolved Hide resolved
Copy link
Owner

@agnivade agnivade left a comment

Choose a reason for hiding this comment

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

Thanks!

@agnivade agnivade merged commit bb77d44 into agnivade:master Feb 7, 2023
@JohnStarich JohnStarich deleted the feature/cleanenv branch February 8, 2023 03: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.

total length of command line and environment variables exceeds limit in GitHub Actions
2 participants