Index: build/config/android/rules.gni |
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni |
index a08a4755523c40ed357bf8869112b651a42b47b2..e66d9280c38d6484951727b35a3d9022a459aa7b 100644 |
--- a/build/config/android/rules.gni |
+++ b/build/config/android/rules.gni |
@@ -579,7 +579,11 @@ if (enable_java_templates) { |
assert(defined(invoker.res_dir)) |
_base_path = "$target_gen_dir/$target_name" |
- _resources_zip = _base_path + ".resources.zip" |
+ |
+ # JUnit tests use resource zip files. These must not be put in gen/ |
+ # directory or they will not be available to tester bots. |
+ _resources_zip_rebased_path = rebase_path(target_gen_dir, root_gen_dir) |
+ _resources_zip = "${root_out_dir}/resource_zips/${_resources_zip_rebased_path}/${target_name}.resources.zip" |
_build_config = _base_path + ".build_config" |
write_build_config("${target_name}__build_config") { |
@@ -676,7 +680,11 @@ if (enable_java_templates) { |
assert(defined(invoker.resource_dirs)) |
base_path = "$target_gen_dir/$target_name" |
- zip_path = base_path + ".resources.zip" |
+ |
+ # JUnit tests use resource zip files. These must not be put in gen/ |
+ # directory or they will not be available to tester bots. |
+ _resources_zip_rebased_path = rebase_path(target_gen_dir, root_gen_dir) |
+ zip_path = "${root_out_dir}/resource_zips/${_resources_zip_rebased_path}/${target_name}.resources.zip" |
srcjar_path = base_path + ".srcjar" |
r_text_out_path = base_path + "_R.txt" |
build_config = base_path + ".build_config" |
@@ -895,7 +903,11 @@ if (enable_java_templates) { |
forward_variables_from(invoker, [ "testonly" ]) |
base_path = "$target_gen_dir/$target_name" |
- resources_zip = base_path + ".resources.zip" |
+ |
+ # JUnit tests use resource zip files. These must not be put in gen/ |
+ # directory or they will not be available to tester bots. |
+ _resources_zip_rebased_path = rebase_path(target_gen_dir, root_gen_dir) |
+ resources_zip = "${root_out_dir}/resource_zips/${_resources_zip_rebased_path}/${target_name}.resources.zip" |
build_config = base_path + ".build_config" |
write_build_config("${target_name}__build_config") { |
@@ -907,6 +919,7 @@ if (enable_java_templates) { |
grit_target_name = "${target_name}__grit" |
grit_output_dir = "$target_gen_dir/$extra_output_path" |
+ |
grit(grit_target_name) { |
forward_variables_from(invoker, [ "deps" ]) |
grit_flags = [ |
@@ -961,7 +974,11 @@ if (enable_java_templates) { |
forward_variables_from(invoker, [ "testonly" ]) |
base_path = "$target_gen_dir/$target_name" |
- resources_zip = base_path + ".resources.zip" |
+ |
+ # JUnit tests use resource zip files. These must not be put in gen/ |
+ # directory or they will not be available to tester bots. |
+ _resources_zip_rebased_path = rebase_path(target_gen_dir, root_gen_dir) |
+ resources_zip = "${root_out_dir}/resource_zips/${_resources_zip_rebased_path}/${target_name}.resources.zip" |
build_config = base_path + ".build_config" |
build_config_target_name = "${target_name}__build_config" |
@@ -1516,7 +1533,11 @@ if (enable_java_templates) { |
gen_dir = "$target_gen_dir/$target_name" |
base_path = "$gen_dir/$target_name" |
_build_config = "$target_gen_dir/$target_name.build_config" |
- resources_zip_path = "$base_path.resources.zip" |
+ |
+ # JUnit tests use resource zip files. These must not be put in gen/ |
+ # directory or they will not be available to tester bots. |
+ _resources_zip_rebased_path = rebase_path(target_gen_dir, root_gen_dir) |
+ resources_zip_path = "${root_out_dir}/resource_zips/${_resources_zip_rebased_path}/${target_name}.resources.zip" |
_all_resources_zip_path = "$base_path.resources.all.zip" |
_jar_path = "$base_path.jar" |
_lib_dex_path = "$base_path.dex.jar" |