@@ -47,27 +47,36 @@ def generate(repo_dir: str) -> None:
47
47
bucket = get_bucket (secrets [secrets .GOOGLE_CLOUD_STORAGE ])
48
48
49
49
with hgmo .HGMO (repo_dir = repo_dir ) as hgmo_server :
50
- reports = list (list_reports (bucket , "mozilla-central" ))
51
- for changeset , platform , suite in tqdm (reports ):
52
- # We are only interested in "overall" coverage, not platform or suite specific.
53
- if platform != DEFAULT_FILTER or suite != DEFAULT_FILTER :
54
- continue
55
-
56
- # We already have data for this commit.
57
- if changeset in commit_coverage :
58
- continue
59
-
60
- report_name = get_name ("mozilla-central" , changeset , platform , suite )
50
+ # We are only interested in "overall" coverage, not platform or suite specific.
51
+ changesets_to_analyze = [
52
+ changeset
53
+ for changeset , platform , suite in list_reports (bucket , "mozilla-central" )
54
+ if platform == DEFAULT_FILTER and suite == DEFAULT_FILTER
55
+ ]
56
+
57
+ # Skip already analyzed changesets.
58
+ changesets_to_analyze = [
59
+ changeset
60
+ for changeset in changesets_to_analyze
61
+ if changeset not in commit_coverage
62
+ ]
63
+
64
+ for changeset_to_analyze in tqdm (changesets_to_analyze ):
65
+ report_name = get_name (
66
+ "mozilla-central" , changeset_to_analyze , DEFAULT_FILTER , DEFAULT_FILTER
67
+ )
61
68
assert download_report ("ccov-reports" , bucket , report_name )
62
69
63
70
with open (os .path .join ("ccov-reports" , f"{ report_name } .json" ), "r" ) as f :
64
71
report = json .load (f )
65
72
66
73
phabricatorUploader = PhabricatorUploader (
67
- repo_dir , changeset , warnings_enabled = False
74
+ repo_dir , changeset_to_analyze , warnings_enabled = False
68
75
)
69
76
70
- changesets = hgmo_server .get_automation_relevance_changesets (changeset )
77
+ changesets = hgmo_server .get_automation_relevance_changesets (
78
+ changeset_to_analyze
79
+ )
71
80
72
81
results = phabricatorUploader .generate (hgmo_server , report , changesets )
73
82
for changeset in changesets :
0 commit comments