diff --git a/autopts/ptsprojects/mynewt/mesh.py b/autopts/ptsprojects/mynewt/mesh.py index c03fdac979..8007a75e5f 100644 --- a/autopts/ptsprojects/mynewt/mesh.py +++ b/autopts/ptsprojects/mynewt/mesh.py @@ -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 diff --git a/autopts/ptsprojects/zephyr/mesh.py b/autopts/ptsprojects/zephyr/mesh.py index 234cee8e13..4cd8aeabe2 100644 --- a/autopts/ptsprojects/zephyr/mesh.py +++ b/autopts/ptsprojects/zephyr/mesh.py @@ -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