New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 590869 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

GN glob support

Project Member Reported by aizatsky@chromium.org, Feb 29 2016

Issue description

We really need glob support for better libfuzzer integration.

We're looking at storing most important fuzzer test cases in the VCS. This would result in nice, efficient unittest.

E.g. there wold be:

.../fuzzers/url_parser_fuzzer
.../fuzzers/url_parser_fuzzer_corpus/0012345
.../fuzzers/url_parser_fuzzer_corpus/6789abc
.../fuzzers/url_parser_fuzzer_corpus/def1234
...


And in BUILD.gn:


fuzzer_test("url_parser_fuzzer",
  corpus = glob("url_parser_fuzzer_corpus/*"),
  ...
).


This would also simplify defining dependencies to 3rd party code (e.g. libfuzzer) without breaking compilation when new files are added.
 
Cc: brettw@chromium.org
This is unlikely to be implemented (I won't go so far as to WontFix this, but brettw@ might).

There's no good way to implement this correctly such that we know when to regenerate the build files when the results of the glob changes.

We do (kinda) support this for specifying data file dependencies on a directory, so you can specify a directory that will get its contents included into an isolate for swarming, but that won't actually let you compile things.
I suppose I don't actually know what you mean by 'corpus' in your example; or how you would use it. If those are data files passed to tests, then maybe what we support is good enough?
You can also implement this using exec_script(). E.g.:

https://code.google.com/p/chromium/codesearch#chromium/src/build/config/android/rules.gni&q=exec_script%20find%20file:%5C.gn&sq=package:chromium&type=cs&l=2212

However, I hope to stop doing this in Android for the reason Dirk mentioned (GN doesn't notice when the glob changes, so doesn't automatically regenerate files). What I hope to change *to* is having generated checked in files that contain the result of find.py. That way when you add / remove a file, you'll need to re-generate the file list and GN will notice that.
Components: Build
Status: WontFix (was: Untriaged)
I've changed my mind, and am wontfix'ing it :).

Sign in to add a comment