Merge "dist-one flag should be a boolean, not a string" into main am: 2e137a9963 am: 439b4ce7f7

Original change: https://android-review.googlesource.com/c/platform/build/+/2893725

Change-Id: Ic66501e7c2ae7013c62c12b295a170e2bc1d73e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2024-01-03 02:40:48 +00:00
committed by Automerger Merge Worker

View File

@@ -460,7 +460,7 @@ benchmarks:
parser.add_argument("--benchmark", nargs="*", default=[b.id for b in self._benchmarks],
metavar="BENCHMARKS",
help="Benchmarks to run. Default suite will be run if omitted.")
parser.add_argument("--dist-one", type=str,
parser.add_argument("--dist-one", action="store_true",
help="Copy logs and metrics to the given dist dir. Requires that only"
+ " one benchmark be supplied. Postroll steps will be skipped.")
@@ -478,7 +478,7 @@ benchmarks:
self._error(f"Invalid benchmark: {id}")
# --dist-one requires that only one benchmark be supplied
if len(self.Benchmarks()) != 1:
if self._args.dist_one and len(self.Benchmarks()) != 1:
self._error("--dist-one requires that exactly one --benchmark.")
if self._had_error: