Skip to content

Commit 3169007

Browse files
add more detailed mapping coverage again for l10n reporting.
1 parent f73d759 commit 3169007

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

modules/testrail_integration.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,21 @@ def reportable(platform_to_test=None):
189189
if os.environ.get("FX_L10N"):
190190
beta_version = int(minor_num.split("b")[-1])
191191
distributed_mappings = select_l10n_mappings(beta_version)
192-
expected_mappings = len(distributed_mappings)
192+
expected_mappings = sum(map(lambda x: len(x), distributed_mappings.values()))
193193
covered_mappings = 0
194194
# keeping this logic to still see how many mappings are reported.
195195
for entry in plan_entries:
196196
if entry.get("name") in distributed_mappings:
197-
covered_mappings += 1
197+
site = entry.get("name")
198+
for run_ in entry.get("runs"):
199+
if run_.get("config"):
200+
run_region, run_platform = run_.get("config").split("-")
201+
if (
202+
run_region in distributed_mappings[site]
203+
and platform in run_platform
204+
):
205+
logging.warning(f"Already reported: {site} {run_.get("config")}")
206+
covered_mappings += 1
198207
logging.warning(
199208
f"Potentially matching run found for {platform}, may be reportable. (Found {covered_mappings} site/region mappings reported, expected {expected_mappings}.)"
200209
)

0 commit comments

Comments
 (0)