Commit 65e046df authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

ppapi: add generated files instead of a generated directory.

Including directories full of generated files causes incorrect incremental
builds.

But using data_deps makes it easy to copy just the generated files here,
so just do that instead.

To make sure this does the right thing, I ran

  gn gen out/gn --runtime-deps-list-file=<(echo //chrome/test:browser_tests)

with and without this patch and compared out/gn/browser_tests.runtime_deps.

The diff is

-test_case.html
-test_case.html.mock-http-headers
-test_page.css
-test_page.css.mock-http-headers
-test_url_loader_data/
+corb_eligible_resource.json
+corb_eligible_resource.json.mock-http-headers
+test_case.html
+test_case.html.mock-http-headers
+test_page.css
+test_page.css.mock-http-headers
+test_url_loader_data/hello.txt
-corb_eligible_resource.json
-corb_eligible_resource.json.mock-http-headers
-test_case.html
-test_case.html.mock-http-headers
-test_page.css
-test_page.css.mock-http-headers


Importantly, `test_url_loader_data/` no longer appears. (For some reason,
the non-directories were listed twice previously.)

We now bundle corb_eligible_resource when we weren't previously,
but that seems fine.

I then downloaded an isolate from the command printed on a browser_tests
run on swarming like so:

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

and verified that these are in fact all files:

    $ ls foo/out/Release/test_url_loader_data/
    hello.txt

Bug: 912946
Change-Id: I1ad01f8b53a1eb47c5b572ad645b1901305fcbc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769213Reviewed-by: default avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690946}
parent 3da4ce0e
...@@ -725,6 +725,11 @@ if (!is_android) { ...@@ -725,6 +725,11 @@ if (!is_android) {
# Runtime dependencies # Runtime dependencies
data_deps = [ data_deps = [
"//chrome/browser/resources/media/mei_preload:component", "//chrome/browser/resources/media/mei_preload:component",
# TODO(thakis): Why do these need copying in browser_tests?
# content_browsertests uses the non-copied files instead.
"//ppapi:copy_test_files",
"//ppapi:copy_test_files2",
"//ppapi:ppapi_tests", "//ppapi:ppapi_tests",
"//ppapi:power_saver_test_plugin", "//ppapi:power_saver_test_plugin",
"//remoting/webapp:browser_test_resources", "//remoting/webapp:browser_test_resources",
...@@ -761,11 +766,6 @@ if (!is_android) { ...@@ -761,11 +766,6 @@ if (!is_android) {
"//third_party/tlslite/", "//third_party/tlslite/",
"//ui/webui/resources/", "//ui/webui/resources/",
"$root_out_dir/browser_tests.pak", "$root_out_dir/browser_tests.pak",
"$root_out_dir/test_case.html",
"$root_out_dir/test_case.html.mock-http-headers",
"$root_out_dir/test_page.css",
"$root_out_dir/test_page.css.mock-http-headers",
"$root_out_dir/test_url_loader_data/",
] ]
sources = [ sources = [
......
...@@ -145,7 +145,6 @@ test_common_source_files = [ ...@@ -145,7 +145,6 @@ test_common_source_files = [
] ]
copy("copy_test_files") { copy("copy_test_files") {
visibility = [ ":*" ]
sources = [ sources = [
# Keep "test_case.html.mock-http-headers" with "test_case.html" # Keep "test_case.html.mock-http-headers" with "test_case.html"
# and "corb_eligible_resource.json.mock-http-headers" with # and "corb_eligible_resource.json.mock-http-headers" with
...@@ -163,7 +162,6 @@ copy("copy_test_files") { ...@@ -163,7 +162,6 @@ copy("copy_test_files") {
} }
copy("copy_test_files2") { copy("copy_test_files2") {
visibility = [ ":*" ]
sources = [ sources = [
"tests/test_url_loader_data/hello.txt", "tests/test_url_loader_data/hello.txt",
] ]
......
...@@ -1102,8 +1102,7 @@ class MetaBuildWrapper(object): ...@@ -1102,8 +1102,7 @@ class MetaBuildWrapper(object):
f == 'mr_extension/' or # https://crbug.com/997947 f == 'mr_extension/' or # https://crbug.com/997947
f == 'locales/' or f == 'locales/' or
f.startswith('nacl_test_data/') or f.startswith('nacl_test_data/') or
f.startswith('ppapi_nacl_tests_libs/') or f.startswith('ppapi_nacl_tests_libs/')):
f == 'test_url_loader_data/'):
continue continue
# This runs before the build, so we can't use isdir(f). But # This runs before the build, so we can't use isdir(f). But
......
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