run-test build: Don't merge the shards by default.
The rules create one big zip at the end of the build.
However, the runner has logic to access the correct
shard directly now. So the big zip isn't needed.
Avoid creating the zip to slightly speed up the build.
Test: m art-run-test-{jvm,host,target}-data
Change-Id: I8249ae96c75902f4f1fb056ae2b1001db0ba8d9c
diff --git a/test/Android.run-test.bp.py b/test/Android.run-test.bp.py
index bca48fe..eaa093a 100755
--- a/test/Android.run-test.bp.py
+++ b/test/Android.run-test.bp.py
@@ -53,7 +53,7 @@
}}
""".format(name=name, mode=mode, shard=shard)))
- name = "art-run-test-{mode}-data".format(mode=mode)
+ name = "art-run-test-{mode}-data-merged".format(mode=mode)
srcs = ("\n"+" "*8).join('":{}-tmp",'.format(n) for n in names)
deps = ("\n"+" "*8).join('"{}",'.format(n) for n in names)
f.write(textwrap.dedent("""
@@ -81,5 +81,33 @@
}}
""").format(name=name, srcs=srcs, deps=deps))
+ name = "art-run-test-{mode}-data".format(mode=mode)
+ srcs = ("\n"+" "*8).join('":{}-tmp",'.format(n) for n in names)
+ deps = ("\n"+" "*8).join('"{}",'.format(n) for n in names)
+ f.write(textwrap.dedent("""
+ // Phony target used to build all shards
+ java_genrule {{
+ name: "{name}-tmp",
+ defaults: ["art-run-test-data-defaults"],
+ out: ["{name}.txt"],
+ srcs: [
+ {srcs}
+ ],
+ cmd: "echo $(in) > $(out)",
+ }}
+
+ // Phony target used to install all shards
+ prebuilt_etc_host {{
+ name: "{name}",
+ defaults: ["art_module_source_build_prebuilt_defaults"],
+ src: ":{name}-tmp",
+ required: [
+ {deps}
+ ],
+ sub_dir: "art",
+ filename: "{name}.txt",
+ }}
+ """).format(name=name, srcs=srcs, deps=deps))
+
if __name__ == "__main__":
main()