summaryrefslogtreecommitdiffstats
path: root/taskcluster/gecko_taskgraph/util/perfile.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /taskcluster/gecko_taskgraph/util/perfile.py
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/gecko_taskgraph/util/perfile.py')
-rw-r--r--taskcluster/gecko_taskgraph/util/perfile.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/taskcluster/gecko_taskgraph/util/perfile.py b/taskcluster/gecko_taskgraph/util/perfile.py
index 4e82d87dad..4c18ca98be 100644
--- a/taskcluster/gecko_taskgraph/util/perfile.py
+++ b/taskcluster/gecko_taskgraph/util/perfile.py
@@ -12,15 +12,12 @@ import taskgraph
from mozbuild.util import memoize
from mozpack.path import match as mozpackmatch
-from gecko_taskgraph import files_changed
-
-from .. import GECKO
-
logger = logging.getLogger(__name__)
@memoize
-def perfile_number_of_chunks(is_try, try_task_config, head_repository, head_rev, type):
+def perfile_number_of_chunks(is_try, try_task_config, files_changed, type):
+ changed_files = set(files_changed)
if taskgraph.fast and not is_try:
# When iterating on taskgraph changes, the exact number of chunks that
# test-verify runs usually isn't important, so skip it when going fast.
@@ -55,17 +52,11 @@ def perfile_number_of_chunks(is_try, try_task_config, head_repository, head_rev,
# Returning 0 means no tests to run, this captures non test-verify tasks
return 1
- changed_files = set()
if try_task_config:
suite_to_paths = json.loads(try_task_config)
specified_files = itertools.chain.from_iterable(suite_to_paths.values())
changed_files.update(specified_files)
- if is_try:
- changed_files.update(files_changed.get_locally_changed_files(GECKO))
- else:
- changed_files.update(files_changed.get_changed_files(head_repository, head_rev))
-
test_count = 0
for pattern in file_patterns:
for path in changed_files: