Test: new test cases showing existing issues on windows#90
Test: new test cases showing existing issues on windows#90peakschris wants to merge 1 commit intokeith:mainfrom
Conversation
|
It would be nice to re-enable the existing integration tests for windows on CI. However, rules_bazel_integration test is currently broken on windows - around half of the test cases are failing. Part of this might be its dependency on buildifier-prebuilt! I can have a look at that at some point, but for now I suggest we use these bazel shell tests to add coverage that works on all platforms, and I'll look at fixing rules_bazel_integration_test as a followup once my windows fixes here are released. |
| @@ -0,0 +1,856 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
Not for this PR. However, we should create a Bazel module that exposes this. We could host the repo under bazel-contrib.
|
@keith I've pushed a fix for ubuntu. For windows, could you add --enable_runfiles to the test command? That is required. |
|
Actually, I've fixed the new test so it can be used in norunfiles mode. @keith, could you rerun CI please? |
|
started |
|
I've improved the test cases. I'd expect //tests:buildifier:buildifier_test to fail on both linux and windows. The linux failures are due to buildifier check/fix having some issue in norunfiles mode. @keith could you rerun CI? These are the messages reported from inside //tests:buildifier:buildifier_test On linux: |
|
I just approved the CI run. |
|
@cgrindel thank you, windows 👍 , issue with bazel 5 on linux, I've submitted a fix, could you rerun? |
|
@peakschris I don't see an Approve button for CI. DId you push your changes? |
I pushed it. |
|
started ci |
This PR adds unit tests for buildifier that fail to demonstrate the current issues with Windows.
Because running fix modifies the source tree, I set them up as bazel shell tests so that they run in temporary workspaces.
You can add this command to CI:
bazel test //tests/buildifier/... --enable_runfiles
Although the tests must run with runfiles, the sub-workspaces that they validate run in both runfiles and non-runfiles mode.