BUILD.gn should explicitly declare bundle_data dependency if unittests depend on data files |
||||||||
Issue description
ios will need to explicitly declare dependency if unittests or some such depends on data files.
We might want to add rules in the presubmit or build files to auto detect this.
bundle_data("test_support_bundle_data") {
visibility = [ ":test_support" ]
testonly = true
sources = [
"data/ssl/certificates/1024-rsa-ee-by-1024-rsa-intermediate.pem",
...
]
outputs = [
"{{bundle_resources_dir}}/" +
"{{source_root_relative_dir}}/{{source_file_part}}",
]
}
...
if (is_ios) {
deps += [ ":test_support_bundle_data" ]
} else {
public_deps += [ "//third_party/protobuf:py_proto" ]
}
,
Mar 3 2017
Net triager here. Any owner for this?
,
Mar 3 2017
I can put this in my queue unless someone else is interested in fixing this issue :-)
,
Mar 6 2017
,
Mar 6 2017
,
Mar 6 2017
,
Apr 23 2018
Unassigned myself on this bug as I don't have time to get on this.
,
Apr 24 2018
Just to make sure I understand: this bug is about improving the developer ergonomics, so that we warn earlier when adding files that need to be explicitly defined for iOS? (as opposed to only failing once it hits the trybots/commitqueue and the iOS bots cant find the new file). We have //net/tools/update_ios_bundle_data.py which can re-generate the iOS file list from some globbing rules, so it may be possible to simply run that on presubmit to see if there is a new file in one of the globbed paths. That approach has its limitations though, and might not pass the bar for presubmit performance. I think better solutions are to note this issue at runtime (like: "error: you read a test data file that wasn't enumerate in test_support_bundle") by changing how test code reads files, but maybe there is already something like this that was built for test isolation?
,
May 2 2018
,
Sep 20
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by zhongyi@chromium.org
, Mar 2 2017