Chromium Code Search - Xrefs do not filter out *all* test code |
||||
Issue descriptionRepro: 1. Go to Chromium Code Search 2. Look at Xrefs of WindowOpenDisposition::NEW_POPUP (at https://cs.chromium.org/chromium/src/ui/base/window_open_disposition.h?l=20) 3. In "Xref Filter" dropdown check "Exclude tests" option Expected behavior: All test code is excluded (i.e. all code from Actual behavior: Some test code references are still included - for example references from chrome/browser/ui/browser_navigator_browsertest_chromeos.cc or from chrome/test/base/test_browser_window.cc (note that the latter example comes from chrome/test:test_support BUILD.gn target which is marked as testonly=true).
,
Oct 20 2016
Another example - Xrefs/Overrides of blink::EventListener::handleEvent include third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp even when tests are supposedly excluded.
,
Oct 26 2016
,
Oct 26 2016
These files are not being filtered out because the filter configuration is shared with internal code search. The internal convention for naming of test files is more uniform and different. I'll investigate if we can divide the config between internal and external.
,
Oct 27 2016
,
Oct 27 2016
I split of how filtering is done internally and externally for test files and generated files has been submitted. The fixed filtering will be available once we have migrated to the staging version of code search.
,
Feb 9 2017
This fix has been released. Closing this bug but please re-open if the issue reappears. |
||||
►
Sign in to add a comment |
||||
Comment 1 by lukasza@chromium.org
, Oct 19 2016Another example - Xrefs of blink::WebNavigationPolicy::WebNavigationPolicyNewPopup include components/test_runner/test_common.cc even when tests are supposedly excluded. Note that this source file is compiled via components/test_runner/BUILD.gn which does specify testonly=true under component("test_runner").