[bazel+js]: Avoid shadowing directory with test name#16784
[bazel+js]: Avoid shadowing directory with test name#16784shs96c merged 1 commit intoSeleniumHQ:trunkfrom
Conversation
The test target name `test` collides with the source directory `test/` containing the test HTML files. When Bazel builds the runfiles tree: * The default `test` target (named `test`) places its binary at `_main/javascript/atoms/test` (a file) * The test HTML files should be at `_main/javascript/atoms/test/*.html` (in a directory) * Since the binary occupies the test path as a file, the `test/` directory with HTML files cannot exist in the runfiles `Files.find()` returns 0 test files because the test directory doesn't exist (it's a file instead) Renaming the tests avoids this problem. Insert facepalm -->here<--
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨No code suggestions found for the PR. |
|
hah, I fixed this in another PR. Your fix is better. 😂 |
User description
The test target name
testcollides with the source directorytest/containing the test HTML files. When Bazel builds the runfiles tree:testtarget (namedtest) places its binary at_main/javascript/atoms/test(a file)_main/javascript/atoms/test/*.html(in a directory)test/directory with HTML files cannot exist in the runfilesFiles.find()returns 0 test files because the test directory doesn't exist (it's a file instead)Renaming the tests avoids this problem.
Insert facepalm -->here<--
PR Type
Bug fix
Description
Rename test targets from
testtoclosure-testto avoid shadowingPrevents file/directory collision in Bazel runfiles tree
Fixes test discovery issue where HTML test files were inaccessible
Updates documentation and examples with new target names
Diagram Walkthrough
File Walkthrough
BUILD.bazel
Rename atoms test target to closure-testjavascript/atoms/BUILD.bazel
closure_test_suitetarget fromtesttoclosure-testBUILD.bazel
Rename chrome-driver test target to closure-testjavascript/chrome-driver/BUILD.bazel
closure_test_suitetarget fromtesttoclosure-testBUILD.bazel
Rename webdriver test target to closure-testjavascript/webdriver/BUILD.bazel
closure_test_suitetarget fromtesttoclosure-testREADME.md
Update documentation with new test target namejavascript/atoms/README.md
closure-test_debug_serverclosure-testtarget