Skip to content

Commit dac2457

Browse files
further fixes
1 parent d23ee0b commit dac2457

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

l10n_CM/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ The harness relies on several configuration files:
6868
# list of OS platforms to skip for this configuration run.
6969
# "Darwin", "Linux" or "Windows"
7070
"skip_os": []
71+
# regions to skip the tests for
72+
"skip_region": []
7173
}
7274
7375
```

l10n_CM/Unified/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_html_files(live_site, region):
4242

4343
@pytest.fixture()
4444
def region():
45-
return os.environ.get("FX_REGION", "GB")
45+
return os.environ.get("FX_REGION", "US")
4646

4747

4848
@pytest.fixture()

l10n_CM/constants/demo/demo_ad.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
"country",
2222
"email",
2323
"tel"
24-
]
24+
],
25+
"skip_regions": ["IT"]
2526
}

l10n_CM/run_l10n.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def remove_skipped_tests(extracted_tests, live_site, reg):
169169
for suffix in ("ad", "cc")
170170
]
171171
for live_site, suffix in live_sites:
172-
skipped_tests = get_skipped_tests(live_site)
172+
skipped_tests = get_skipped_tests(live_site, reg)
173173
if skipped_tests and skipped_tests != "All":
174174
skipped_tests = list(
175175
map(
@@ -189,7 +189,7 @@ def should_keep_test(test):
189189
return extracted_tests
190190

191191

192-
def get_skipped_tests(live_site) -> list[str] | str:
192+
def get_skipped_tests(live_site, reg) -> list[str] | str:
193193
"""
194194
Read the mapping for the given region and site and return any tests that are marked as skipped.
195195
It is either a list of tests to skip or skipping all tests for the given site.
@@ -202,7 +202,8 @@ def get_skipped_tests(live_site) -> list[str] | str:
202202
with open(os.path.join(current_dir, "constants", live_site) + ".json", "r") as fp:
203203
live_site_data = load(fp)
204204
platform_skip = platform.system() in live_site_data.get("skip_os", [])
205-
if live_site_data.get("skip") or platform_skip:
205+
region_skip = reg in live_site_data.get("skip_regions", [])
206+
if live_site_data.get("skip") or platform_skip or region_skip:
206207
return "All"
207208
return live_site_data.get("skipped", [])
208209

0 commit comments

Comments
 (0)