GN glob support |
|||
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.
,
Mar 1 2016
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?
,
Mar 1 2016
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.
,
Nov 9 2017
,
Feb 3 2018
I've changed my mind, and am wontfix'ing it :). |
|||
►
Sign in to add a comment |
|||
Comment 1 by dpranke@chromium.org
, Mar 1 2016