From dd0512984ba9f05dbe09556dddfb86dde8cbc302 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Wed, 25 Mar 2020 19:32:42 +0000 Subject: [PATCH] Bug 1610886 - Make it easier to run test-verify on try; r=bc Ensure a minimum of 1 chunk for "per-file" tests like test-verify when run on try, even when no local file changes are detected. --full is still required. Differential Revision: https://phabricator.services.mozilla.com/D67694 --HG-- extra : moz-landing-system : lando --- taskcluster/taskgraph/util/perfile.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/taskcluster/taskgraph/util/perfile.py b/taskcluster/taskgraph/util/perfile.py index e2d966c80fbf..96f00f0772c0 100644 --- a/taskcluster/taskgraph/util/perfile.py +++ b/taskcluster/taskgraph/util/perfile.py @@ -83,4 +83,11 @@ def perfile_number_of_chunks(is_try, try_task_config, head_repository, head_rev, test_count += 1 chunks = test_count/tests_per_chunk - return int(math.ceil(chunks)) + chunks = int(math.ceil(chunks)) + + # Never return 0 chunks on try, so that per-file tests can be pushed to try with + # an explicit path, and also so "empty" runs can be checked on try. + if is_try and chunks == 0: + chunks = 1 + + return chunks