Skip to content

Commit

Permalink
all unicast ugg to ugt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mringwal committed Oct 3, 2024
1 parent 06e285a commit fc272a5
Show file tree
Hide file tree
Showing 2 changed files with 251 additions and 190 deletions.
117 changes: 56 additions & 61 deletions autopts/ptsprojects/btstack/gmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def set_pixits(ptses):
def sync_commands_for_wid_list(tc_name, wids):
cmds = []
tc_name_lt2 = tc_name + "_LT2"
for wid in wids:
for (wid_lt1, wid_lt2) in wids:
cmds += [TestFunc(get_stack().synch.add_synch_element, [
SynchPoint(tc_name, wid),
SynchPoint(tc_name_lt2, wid)])]
SynchPoint(tc_name, wid_lt1),
SynchPoint(tc_name_lt2, wid_lt2)])]
return cmds


Expand Down Expand Up @@ -85,65 +85,61 @@ def set_addr(addr):
test_case_name_list = pts.get_test_case_list('GMAP')
tc_list = []

test_cases_with_lt2_wid_311 = [
"GMAP/UGG/LLU/BV-75-C",
"GMAP/UGG/LLU/BV-76-C",
"GMAP/UGG/LLU/BV-05-C",
"GMAP/UGG/LLU/BV-06-C",
"GMAP/UGG/LLU/BV-07-C",
"GMAP/UGG/LLU/BV-08-C"]

test_cases_with_lt2_wid_313 = [
"GMAP/UGG/LLU/BV-97-C",
"GMAP/UGG/LLU/BV-98-C",
"GMAP/UGG/LLU/BV-99-C",
"GMAP/UGG/LLU/BV-100-C",
"GMAP/UGG/LLU/BV-41-C",
"GMAP/UGG/LLU/BV-42-C",
"GMAP/UGG/LLU/BV-21-C",
"GMAP/UGG/LLU/BV-22-C",
"GMAP/UGG/LLU/BV-23-C",
"GMAP/UGG/LLU/BV-24-C",
"GMAP/UGG/LLU/BV-25-C",
"GMAP/UGG/LLU/BV-26-C",
"GMAP/UGG/LLU/BV-77-C",
"GMAP/UGG/LLU/BV-78-C",
"GMAP/UGG/LLU/BV-105-C",
"GMAP/UGG/LLU/BV-106-C",
"GMAP/UGG/LLU/BV-107-C",
"GMAP/UGG/LLU/BV-108-C",
"GMAP/UGG/LLU/BV-81-C",
"GMAP/UGG/LLU/BV-82-C",
"GMAP/UGG/LLU/BV-33-C",
"GMAP/UGG/LLU/BV-34-C",
"GMAP/UGG/LLU/BV-35-C",
"GMAP/UGG/LLU/BV-36-C",
"GMAP/UGG/LLU/BV-37-C",
"GMAP/UGG/LLU/BV-38-C",
"GMAP/UGG/LLU/BV-113-C",
"GMAP/UGG/LLU/BV-114-C",
"GMAP/UGG/LLU/BV-115-C",
"GMAP/UGG/LLU/BV-116-C",
"GMAP/UGG/LLU/BV-85-C",
"GMAP/UGG/LLU/BV-86-C",
"GMAP/UGG/LLU/BV-45-C",
"GMAP/UGG/LLU/BV-46-C",
"GMAP/UGG/LLU/BV-49-C",
"GMAP/UGG/LLU/BV-50-C",
]

# Use the same preconditions and MMI/WID handler for all test cases of the profile
test_cases_with_lt2 = {
# tc_name: (wid lt1, wid lt2)
"GMAP/UGG/LLU/BV-75-C": (311, 311),
"GMAP/UGG/LLU/BV-76-C": (311, 311),
"GMAP/UGG/LLU/BV-05-C": (311, 311),
"GMAP/UGG/LLU/BV-06-C": (311, 311),
"GMAP/UGG/LLU/BV-07-C": (311, 311),
"GMAP/UGG/LLU/BV-08-C": (311, 311),
"GMAP/UGG/LLU/BV-97-C": (313, 313),
"GMAP/UGG/LLU/BV-98-C": (313, 313),
"GMAP/UGG/LLU/BV-99-C": (313, 313),
"GMAP/UGG/LLU/BV-100-C": (313, 313),
"GMAP/UGG/LLU/BV-41-C": (313, 313),
"GMAP/UGG/LLU/BV-42-C": (313, 313),
"GMAP/UGG/LLU/BV-21-C": (313, 313),
"GMAP/UGG/LLU/BV-22-C": (313, 313),
"GMAP/UGG/LLU/BV-23-C": (313, 313),
"GMAP/UGG/LLU/BV-24-C": (313, 313),
"GMAP/UGG/LLU/BV-25-C": (313, 313),
"GMAP/UGG/LLU/BV-26-C": (313, 313),
"GMAP/UGG/LLU/BV-77-C": (313, 313),
"GMAP/UGG/LLU/BV-78-C": (313, 313),
"GMAP/UGG/LLU/BV-105-C": (313, 313),
"GMAP/UGG/LLU/BV-106-C": (313, 313),
"GMAP/UGG/LLU/BV-107-C": (313, 313),
"GMAP/UGG/LLU/BV-108-C": (313, 313),
"GMAP/UGG/LLU/BV-81-C": (313, 313),
"GMAP/UGG/LLU/BV-82-C": (313, 313),
"GMAP/UGG/LLU/BV-33-C": (311, 313),
"GMAP/UGG/LLU/BV-34-C": (311, 313),
"GMAP/UGG/LLU/BV-35-C": (311, 313),
"GMAP/UGG/LLU/BV-36-C": (311, 313),
"GMAP/UGG/LLU/BV-37-C": (311, 313),
"GMAP/UGG/LLU/BV-38-C": (311, 313),
"GMAP/UGG/LLU/BV-113-C": (313, 313),
"GMAP/UGG/LLU/BV-114-C": (313, 313),
"GMAP/UGG/LLU/BV-115-C": (313, 313),
"GMAP/UGG/LLU/BV-116-C": (313, 313),
"GMAP/UGG/LLU/BV-85-C": (313, 313),
"GMAP/UGG/LLU/BV-86-C": (313, 313),
"GMAP/UGG/LLU/BV-45-C": (313, 313),
"GMAP/UGG/LLU/BV-46-C": (313, 313),
"GMAP/UGG/LLU/BV-49-C": (313, 313),
"GMAP/UGG/LLU/BV-50-C": (313, 313),
}

# For test case with 2 LTs, specify the correct WID to sync
for tc_name in test_case_name_list:
if tc_name in test_cases_with_lt2_wid_311:
if tc_name in test_cases_with_lt2:
tc_name_lt2 = tc_name + "_LT2"
wid_lt1, wid_lt2 = test_cases_with_lt2[tc_name]
instance = ZTestCase('GMAP', tc_name,
cmds=pre_conditions + sync_commands_for_wid_list(tc_name, [20100, 20106, 311]),
cmds=pre_conditions +
sync_commands_for_wid_list(tc_name, [(20100, 20100), (20106, 20106), (wid_lt1, wid_lt2)]),
generic_wid_hdl=gmap_wid_hdl, lt2=tc_name_lt2)
elif tc_name in test_cases_with_lt2_wid_313:
tc_name_lt2 = tc_name + "_LT2"
instance = ZTestCase('GMAP', tc_name,
cmds=pre_conditions + sync_commands_for_wid_list(tc_name, [20100, 20106, 313]),
generic_wid_hdl=gmap_wid_hdl, lt2=tc_name_lt2)
else:
instance = ZTestCase('GMAP', tc_name, cmds=pre_conditions, generic_wid_hdl=gmap_wid_hdl)
tc_list.append(instance)
Expand All @@ -160,10 +156,9 @@ def set_addr(addr):
]

# Test cases LT2
for tc_name in test_cases_with_lt2_wid_311:
for tc_name in test_cases_with_lt2.keys():
tc_name_lt2 = tc_name + "_LT2"
tc_list.append(
ZTestCaseSlave("GMAP", tc_name_lt2,
tc_list.append(ZTestCaseSlave("GMAP", tc_name_lt2,
cmds=pre_conditions_lt2,
generic_wid_hdl=gmap_wid_hdl))

Expand Down
Loading

0 comments on commit fc272a5

Please sign in to comment.