Skip to content

Commit

Permalink
Fix two PTSes tests for MESH
Browse files Browse the repository at this point in the history
It is possible that setup has more than two PTSes available and invalid
check was causing those to be skipped. Follow early return pattern as
other profiles as this is future proof.
  • Loading branch information
sjanc committed Sep 4, 2024
1 parent 7a24ff0 commit 73158a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions autopts/ptsprojects/mynewt/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,10 @@ def test_cases(ptses):

tc_list.append(instance)

if len(ptses) == 2:
tc_list += test_cases_slaves
pts2 = ptses[1]
if len(ptses) < 2:
return tc_list

tc_list += test_cases_slaves
pts2 = ptses[1]

return tc_list
8 changes: 5 additions & 3 deletions autopts/ptsprojects/zephyr/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,10 @@ def test_cases(ptses):

tc_list.append(instance)

if len(ptses) == 2:
tc_list += test_cases_slaves
pts2 = ptses[1]
if len(ptses) < 2:
return tc_list

tc_list += test_cases_slaves
pts2 = ptses[1]

return tc_list

0 comments on commit 73158a3

Please sign in to comment.