Skip to content

Commit 03be91f

Browse files
authored
clean up reportable more (#946)
1 parent 850fe77 commit 03be91f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

modules/testrail_integration.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,20 +277,23 @@ def reportable(platform_to_test=None):
277277
if run_.get("config") and platform in run_.get("config"):
278278
covered_suites.append(str(run_.get("suite_id")))
279279

280+
if not covered_suites:
281+
print("No coverage found for this platform, running tests and report...")
282+
return True
283+
280284
if not os.environ.get("STARFOX_SPLIT"):
281285
sys.exit("No split selected")
282286
manifest = TestKey(TEST_KEY_LOCATION)
283287
expected_suites = manifest.get_valid_suites_in_split(
284-
os.environ["STARFOX_SPLIT"]
288+
os.environ["STARFOX_SPLIT"], suite_numbers=True
285289
)
286290

287291
uncovered_suites = set(expected_suites) - set(covered_suites)
288292
if len(uncovered_suites):
289-
suite_names = [
290-
s.get("name")
291-
for s in tr_session.get_suites(TESTRAIL_FX_DESK_PRJ)
292-
if str(s.get("id")) in uncovered_suites
293-
]
293+
suite_names = []
294+
for suite in tr_session.get_suites(TESTRAIL_FX_DESK_PRJ):
295+
if str(suite.get("id")) in uncovered_suites:
296+
suite_names.append(suite.get("name"))
294297
print("Coverage not found for the following suites:")
295298
print("\t-" + "\n\t-".join(suite_names))
296299

0 commit comments

Comments
 (0)