[bazel+js]: Avoid shadowing directory with test name #16784
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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