Commit 0533a425 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

subresource_filter: add generated files instead of a generated directory.

Including directories full of generated files causes incorrect incremental
builds.

There's already a data_deps on the action, so just setting `outputs`
correctly makes that do the right thing, without needing the explicit directory.

To make sure this does the right thing, I ran

gn gen out/gn --runtime-deps-list-file=<(echo -e \
//chrome/test:performance_test_suite\\n\
//chrome/test:ct_telemetry_perf_tests_without_chrome)

(...which is what

tools/mb/mb.py gen -m chromium.perf -b linux-builder-perf \
    --swarming-targets-file \
    <(echo -e performance_test_suite\\nct_telemetry_perf_tests_without_chrome) \
    out/gn

runs behind the scenes.)

I the compared these files before and after this patch:

out/gn/obj/chrome/test/performance_test_suite.stamp.runtime_deps
out/gn/obj/chrome/test/ct_telemetry_perf_tests_without_chrome.stamp.runtime_deps


$ diff -u performance_test_suite.stamp.runtime_deps out/gn/obj/chrome/test/performance_test_suite.stamp.runtime_deps
-gen/components/subresource_filter/tools/
+gen/components/subresource_filter/tools/default_local_state.json

$ diff -u ct_telemetry_perf_tests_without_chrome.stamp.runtime_deps out/gn/obj/chrome/test/ct_telemetry_perf_tests_without_chrome.stamp.runtime_deps
-gen/components/subresource_filter/tools/
+gen/components/subresource_filter/tools/default_local_state.json

I then grabbed an existing isolate off a recent
https://ci.chromium.org/p/chrome/builders/ci/linux-perf build from
a performance_test_suite run:

tools/swarming_client/isolateserver.py download -I https://chrome-isolated.appspot.com \
    --namespace default-gzip -s d60732b5f6374dc56d1b01c2e54c82fc411c83e5 --target foo

And inspected all the files in the tools directory:

$ ls foo/out/Release/gen/components/subresource_filter/tools/
GeneratedRulesetData		default_local_state.json

(gen/components/subresource_filter/tools/GeneratedRulesetData was already in
the .runtime_deps files.)

Bug: 912946,884035
Change-Id: Ife400071aa25589c66abfe693108a483ad14870d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769204
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690414}
parent 6163c552
......@@ -98,6 +98,7 @@ if (!is_ios) {
outputs = [
"$target_gen_dir/GeneratedRulesetData",
"$target_gen_dir/default_local_state.json",
]
inputs = [
......@@ -109,10 +110,8 @@ if (!is_ios) {
args = [
rebase_path(inputs[0], root_build_dir),
rebase_path("$target_gen_dir/GeneratedRulesetData", root_build_dir),
"--version_output=" +
rebase_path("$target_gen_dir/default_local_state.json",
root_build_dir),
rebase_path(outputs[0], root_build_dir),
"--version_output=" + rebase_path(outputs[1], root_build_dir),
"--content_version=1000",
]
}
......
......@@ -1100,7 +1100,6 @@ class MetaBuildWrapper(object):
# TODO(https://crbug.com/912946): Remove this if statement.
if (f == 'angledata/gl_cts/' or # http://anglebug.com/3827
f == 'gen/chrome/browser/resources/media_router/extension/' or
f == 'gen/components/subresource_filter/tools/' or
f == 'locales/' or
f.startswith('nacl_test_data/') or
f.startswith('ppapi_nacl_tests_libs/') or
......
......@@ -30,9 +30,6 @@ group("perf") {
# For image_decoding.measurement
"//chrome/test/data/image_decoding/",
# For ad tagging ruleset
"$root_gen_dir/components/subresource_filter/tools/",
# For Pylib used by VR tests
"//build/android/pylib/",
]
......@@ -83,9 +80,6 @@ group("perf_without_chrome") {
# For image_decoding.measurement
"//chrome/test/data/image_decoding/",
# For ad tagging ruleset
"$root_gen_dir/components/subresource_filter/tools/",
# For Pylib used by VR tests
"//build/android/pylib/",
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment