summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Liz Kammer <eakammer@google.com> 2023-06-09 11:29:48 -0400
committer Liz Kammer <eakammer@google.com> 2023-06-09 11:31:28 -0400
commit2fb361cfb8367a3d1528764a46fad39976ebe2bc (patch)
treee313e20412136d5791d754b65a35d97003297ead
parent767fad4b05b97bf0d6b2590cc256de4ebc9003e8 (diff)
Add feature to print output paths for module
Test: ./genrule_sandbox_test.py -o gen_fstab.gs201 \ libbt_topshim_bridge_header \ android-support-multidex-instrumentation-version Change-Id: Ied74d727054a1bc3b447c1f10a4ee41b3fdfdf1d
-rwxr-xr-xtests/genrule_sandbox_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/genrule_sandbox_test.py b/tests/genrule_sandbox_test.py
index 39a60d959..697fc26e8 100755
--- a/tests/genrule_sandbox_test.py
+++ b/tests/genrule_sandbox_test.py
@@ -140,6 +140,13 @@ def main():
required=False,
help="whether to display differing files",
)
+ parser.add_argument(
+ "--output-paths-only",
+ "-o",
+ action="store_true",
+ required=False,
+ help="Whether to only return the output paths per module",
+ )
args = parser.parse_args()
out_dir = os.environ.get("OUT_DIR", "out")
@@ -147,6 +154,11 @@ def main():
modules = set(args.modules)
module_to_outs = _find_outputs_for_modules(modules, out_dir, target_product)
+ if args.output_paths_only:
+ for m, o in module_to_outs.items():
+ print(f"{m} outputs: {o}")
+ exit(0)
+
all_outs = set()
for outs in module_to_outs.values():
all_outs.update(outs)