Skip to content

Commit c6ffcce

Browse files
authored
fix mac func dependencies GHA workflow (#968)
* fix mac func dependencies GHA workflow * return False on invalid split
1 parent 2166b7f commit c6ffcce

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

.github/workflows/functional-test-beta.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ jobs:
5656
secrets: inherit
5757

5858
Run-Mac-Functional:
59-
needs: Check-Beta-Version
59+
needs:
60+
- Check-Beta-Version
61+
- Get-Functional-Split
6062
if: ${{ needs.Check-Beta-Version.outputs.mac_reportable == 'True' }}
6163
uses: ./.github/workflows/main.yml
6264
with:

modules/testrail_integration.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,17 @@ def reportable(platform_to_test=None):
275275
return covered_mappings < expected_mappings
276276
else:
277277
logging.warning(f"Getting reportability for STARfox in {platform}...")
278+
if not os.environ.get("STARFOX_SPLIT"):
279+
logging.warning("No split selected")
280+
return False
281+
manifest = TestKey(TEST_KEY_LOCATION)
282+
expected_suites = manifest.get_valid_suites_in_split(
283+
os.environ["STARFOX_SPLIT"], suite_numbers=True
284+
)
285+
if not expected_suites:
286+
logging.warning("This split is empty, not running or reporting.")
287+
return False
288+
278289
covered_suites = []
279290
for entry in plan_entries:
280291
for run_ in entry.get("runs"):
@@ -291,17 +302,6 @@ def reportable(platform_to_test=None):
291302
f"Suite coverage found for Suite IDs: {', '.join(covered_suites)}"
292303
)
293304

294-
if not os.environ.get("STARFOX_SPLIT"):
295-
logging.warning("No split selected")
296-
return False
297-
manifest = TestKey(TEST_KEY_LOCATION)
298-
expected_suites = manifest.get_valid_suites_in_split(
299-
os.environ["STARFOX_SPLIT"], suite_numbers=True
300-
)
301-
if not expected_suites:
302-
logging.warning("This split is empty, not running or reporting.")
303-
return False
304-
305305
uncovered_suites = list(set(expected_suites) - set(covered_suites))
306306
if len(uncovered_suites):
307307
suite_names = []

0 commit comments

Comments
 (0)