diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /taskcluster/gecko_taskgraph/util/perfile.py | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/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.py | 13 |
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: |