wiliot-certificate 4.5.0__py3-none-any.whl → 4.5.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +211 -0
- certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +894 -0
- certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +184 -0
- certificate/ag/wlt_types_ag_jsons/calibration.json +490 -0
- certificate/ag/wlt_types_ag_jsons/custom.json +614 -0
- certificate/ag/wlt_types_ag_jsons/datapath.json +900 -0
- certificate/ag/wlt_types_ag_jsons/energy2400.json +670 -0
- certificate/ag/wlt_types_ag_jsons/energySub1g.json +691 -0
- certificate/ag/wlt_types_ag_jsons/externalSensor.json +727 -0
- certificate/ag/wlt_types_ag_jsons/interface.json +1095 -0
- certificate/ag/wlt_types_ag_jsons/powerManagement.json +1439 -0
- certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +105 -0
- certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +77 -0
- certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +126 -0
- certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +175 -0
- certificate/ag/wlt_types_ag_jsons/unified_sensor_pkt.json +65 -0
- certificate/cert_common.py +46 -75
- certificate/cert_config.py +18 -43
- certificate/cert_data_sim.py +9 -12
- certificate/cert_defines.py +0 -9
- certificate/cert_gw_sim.py +7 -35
- certificate/cert_mqtt.py +5 -15
- certificate/cert_prints.py +0 -1
- certificate/cert_results.py +37 -56
- certificate/cert_utils.py +15 -27
- certificate/certificate.py +5 -12
- certificate/certificate_cli.py +13 -10
- certificate/certificate_eth_test_list.txt +4 -6
- certificate/certificate_sanity_test_list.txt +2 -3
- certificate/certificate_test_list.txt +4 -5
- certificate/tests/calibration/interval_test/interval_test.json +0 -1
- certificate/tests/calibration/output_power_test/output_power_test.json +0 -1
- certificate/tests/calibration/pattern_test/pattern_test.json +0 -1
- certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.json +1 -2
- certificate/tests/cloud_connectivity/acl_test/acl_test.json +1 -2
- certificate/tests/cloud_connectivity/acl_test/acl_test.py +15 -13
- certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +1 -2
- certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.py +6 -8
- certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.json +1 -2
- certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +3 -3
- certificate/tests/cloud_connectivity/connection_test/connection_test.json +0 -1
- certificate/tests/cloud_connectivity/connection_test/connection_test.py +13 -6
- certificate/tests/cloud_connectivity/downlink_test/downlink_test.json +0 -1
- certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +4 -1
- certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.json +1 -2
- certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +14 -20
- certificate/tests/cloud_connectivity/reboot_test/reboot_test.json +0 -1
- certificate/tests/cloud_connectivity/reboot_test/reboot_test.py +0 -2
- certificate/tests/cloud_connectivity/registration_test/registration_test.json +0 -1
- certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +1 -1
- certificate/tests/cloud_connectivity/stress_test/stress_test.json +1 -2
- certificate/tests/cloud_connectivity/stress_test/stress_test.py +16 -20
- certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.json +0 -1
- certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +2 -1
- certificate/tests/cloud_connectivity/uplink_test/uplink_test.json +0 -1
- certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +20 -28
- certificate/tests/datapath/aging_test/aging_test.json +0 -1
- certificate/tests/datapath/aging_test/aging_test.py +3 -7
- certificate/tests/datapath/event_ble5_test/event_ble5_test.json +2 -3
- certificate/tests/datapath/event_ble5_test/event_ble5_test.py +13 -7
- certificate/tests/datapath/event_test/event_test.json +2 -3
- certificate/tests/datapath/event_test/event_test.py +10 -5
- certificate/tests/datapath/num_of_tags_test/num_of_tags_test.json +2 -3
- certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +5 -9
- certificate/tests/datapath/output_power_test/output_power_test.json +0 -1
- certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +0 -1
- certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +4 -4
- certificate/tests/datapath/pacer_interval_test/pacer_interval_test.json +0 -1
- certificate/tests/datapath/pattern_test/pattern_test.json +0 -1
- certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.json +0 -1
- certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +5 -5
- certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +0 -1
- certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +5 -5
- certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.json +0 -1
- certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +8 -10
- certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +0 -1
- certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +0 -1
- certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -2
- certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.json +0 -1
- certificate/tests/datapath/rx_channel_test/rx_channel_test.json +0 -1
- certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +0 -1
- certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +1 -1
- certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +0 -1
- certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +0 -1
- certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +0 -3
- certificate/tests/datapath/stress_test/stress_test.json +0 -1
- certificate/tests/datapath/stress_test/stress_test.py +0 -3
- certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +0 -1
- certificate/tests/edge_mgmt/action_blink_test/action_blink_test.json +0 -1
- certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.json +0 -1
- certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.json +0 -1
- certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.json +0 -1
- certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.json +0 -1
- certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.json +0 -1
- certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.json +0 -1
- certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.json +0 -1
- certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.py +14 -18
- certificate/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.json +0 -1
- certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +0 -1
- certificate/tests/energy2400/output_power_test/output_power_test.json +0 -1
- certificate/tests/energy2400/pattern_test/pattern_test.json +0 -1
- certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +0 -1
- certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +3 -4
- certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +9 -9
- certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +271 -113
- certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +0 -1
- certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +1 -1
- certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +0 -1
- certificate/tests/energy_sub1g/pattern_test/pattern_test.json +0 -1
- certificate/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +0 -1
- certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +0 -1
- certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +9 -4
- common/api_if/api_validation.py +2 -8
- common/web/templates/generator.html +79 -141
- common/web/web_utils.py +56 -78
- gui_certificate/server.py +78 -283
- gui_certificate/templates/cert_run.html +113 -179
- {wiliot_certificate-4.5.0.dist-info → wiliot_certificate-4.5.0a1.dist-info}/METADATA +38 -27
- {wiliot_certificate-4.5.0.dist-info → wiliot_certificate-4.5.0a1.dist-info}/RECORD +123 -109
- certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.json +0 -15
- certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.py +0 -80
- {wiliot_certificate-4.5.0.dist-info → wiliot_certificate-4.5.0a1.dist-info}/WHEEL +0 -0
- {wiliot_certificate-4.5.0.dist-info → wiliot_certificate-4.5.0a1.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-4.5.0.dist-info → wiliot_certificate-4.5.0a1.dist-info}/licenses/LICENSE +0 -0
- {wiliot_certificate-4.5.0.dist-info → wiliot_certificate-4.5.0a1.dist-info}/top_level.txt +0 -0
certificate/cert_results.py
CHANGED
|
@@ -31,13 +31,11 @@ CERT_VER = "Certificate Version"
|
|
|
31
31
|
TESTING_DEVICE_INFO = "Testing Device Information"
|
|
32
32
|
TESTED_DEVICE_INFO = "Tested Device Information"
|
|
33
33
|
SIM = "Simulator"
|
|
34
|
-
GATEWAY = "Gateway"
|
|
35
34
|
BRG = "Bridge"
|
|
36
35
|
BLE_MAC_ADDRESS = "BLE MAC Address"
|
|
37
36
|
BOARD_TYPE = "Board Type"
|
|
38
37
|
BLE_VER = "BLE Version"
|
|
39
38
|
SUP_API_VER = "Supported API Version"
|
|
40
|
-
ADD_INFO = "Additional information"
|
|
41
39
|
# TODO: This is a temporary list of all schema module names - remove this when auto generated
|
|
42
40
|
MODULE_SCHEMA_NAMES_LIST = ["Cloud Connectivity", "Edge Management", "Calibration", "Datapath", "Energizer 2.4GHz",
|
|
43
41
|
"Energizer Sub-1GHz", "Power Management", "BLE Sensor", "Custom"]
|
|
@@ -114,24 +112,32 @@ def get_important_tests_info():
|
|
|
114
112
|
patterns = ["DISCONNECTED", "WLT_ERROR", "free heap size", "python_mqtt_disconnect"]
|
|
115
113
|
return "".join([l.strip(' "') for l in open(os.path.join(ARTIFACTS_DIR, CERT_MQTT_LOG_FILE)).readlines() if any([p in l for p in patterns])])
|
|
116
114
|
|
|
117
|
-
def generate_results_files(html=True, pdf=True, failures=0, skipped=0, start_time=datetime.datetime.now(), tests=[], error=None, non_cert_run=False):
|
|
115
|
+
def generate_results_files(dut=None, tester=None, html=True, pdf=True, failures=0, skipped=0, start_time=datetime.datetime.now(), tests=[], error=None, non_cert_run=False):
|
|
118
116
|
print(cert_prints.SEP)
|
|
119
117
|
duration = (datetime.datetime.now()-start_time)
|
|
120
118
|
print("Tests duration: {}".format(str(duration).split(".")[0]))
|
|
121
119
|
pipeline = cert_prints.pipeline_running()
|
|
122
|
-
|
|
123
|
-
if
|
|
124
|
-
|
|
120
|
+
brg = None
|
|
121
|
+
if dut:
|
|
122
|
+
brg = dut.internal_brg if isinstance(dut, cert_utils.Gateway) and dut.has_internal_brg() else dut
|
|
123
|
+
if isinstance(brg, cert_utils.Bridge):
|
|
124
|
+
print("Bridge version: {}".format(brg.version))
|
|
125
125
|
if not error:
|
|
126
126
|
print(generate_tests_table(tests))
|
|
127
127
|
print(tabulate.tabulate([[len(tests), len(tests)-(failures+skipped), skipped, failures, len(tests)]],
|
|
128
128
|
headers=["FINISHED", "PASSED", "SKIPPED", "FAILED", "TOTAL"], tablefmt="pretty"))
|
|
129
129
|
print(cert_prints.WIL_CERT_TEXT)
|
|
130
130
|
cert_prints.print_warn(get_important_tests_info())
|
|
131
|
-
print(f"Run artifacts saved in \"{ARTIFACTS_DIR}\" directory")
|
|
132
131
|
run_type = headline_get(non_cert_run, "").strip()
|
|
133
132
|
cert_prints.print_pass_or_fail(not failures and not error, run_type)
|
|
134
133
|
|
|
134
|
+
# Get internal_brg from dut or tester
|
|
135
|
+
internal_brg = None
|
|
136
|
+
if dut and isinstance(dut, cert_utils.Gateway) and dut.has_internal_brg():
|
|
137
|
+
internal_brg = dut.internal_brg
|
|
138
|
+
elif tester:
|
|
139
|
+
internal_brg = tester.internal_brg
|
|
140
|
+
|
|
135
141
|
# Generate HTML file
|
|
136
142
|
if html:
|
|
137
143
|
file_path = os.path.join(ARTIFACTS_DIR, UT_RESULT_FILE_HTML)
|
|
@@ -153,8 +159,8 @@ def generate_results_files(html=True, pdf=True, failures=0, skipped=0, start_tim
|
|
|
153
159
|
f.write(update_status + "<br><br>")
|
|
154
160
|
f.write(error + "<br><br>")
|
|
155
161
|
f.write(f"{RUN_DUR}: {str(duration).split('.')[0]} <br><br>")
|
|
156
|
-
if
|
|
157
|
-
f.write(f"{BRG} {BLE_VER}: {
|
|
162
|
+
if brg:
|
|
163
|
+
f.write(f"{BRG} {BLE_VER}: {brg.version} <br><br>")
|
|
158
164
|
elif tests:
|
|
159
165
|
if not failures and ("successfully!" in update_status or "skipped!" in update_status or not pipeline):
|
|
160
166
|
headline = headline_get(non_cert_run, "Passed!")
|
|
@@ -169,20 +175,12 @@ def generate_results_files(html=True, pdf=True, failures=0, skipped=0, start_tim
|
|
|
169
175
|
f.write(f"{RUN_DATETIME}: {start_time.strftime('%d/%m/%Y, %H:%M:%S')} <br><br>")
|
|
170
176
|
f.write(f"{RUN_DUR}: {str(duration).split('.')[0]} <br><br>")
|
|
171
177
|
f.write(f"{CERT_VER}: {CERT_VERSION} <br><br>")
|
|
172
|
-
if
|
|
173
|
-
f.write(f"{
|
|
174
|
-
f.write(f"{
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
f.write(f"{BRG} {BLE_VER}: {test.dut.internal_brg.version} <br><br>")
|
|
179
|
-
if test.dut_is_bridge():
|
|
180
|
-
f.write(f"{BRG} {BLE_MAC_ADDRESS}: {test.dut.id_str} <br><br>")
|
|
181
|
-
f.write(f"{BRG} {BLE_VER}: {test.dut.version} <br><br>")
|
|
182
|
-
if test.tester:
|
|
183
|
-
f.write(f"{SIM} {BLE_MAC_ADDRESS}: {test.tester.internal_brg.id_str} <br><br>")
|
|
184
|
-
f.write(f"{SIM} {BLE_VER}: {test.tester.internal_brg.version} <br><br>")
|
|
185
|
-
|
|
178
|
+
if internal_brg:
|
|
179
|
+
f.write(f"{SIM} {BLE_MAC_ADDRESS}: {internal_brg.id_str} <br><br>")
|
|
180
|
+
f.write(f"{SIM} {BLE_VER}: {internal_brg.version} <br><br>")
|
|
181
|
+
if isinstance(brg, cert_utils.Bridge):
|
|
182
|
+
f.write(f"{BRG} {BLE_MAC_ADDRESS}: {brg.id_str} <br><br>")
|
|
183
|
+
f.write(f"{BRG} {BLE_VER}: {brg.version} <br><br>")
|
|
186
184
|
f.write(tabulate.tabulate([[len(tests)-(failures+skipped), skipped, failures, len(tests)]], headers=["PASSED", "SKIPPED", "FAILED", "TOTAL"], tablefmt="html"))
|
|
187
185
|
f.write(generate_tests_table(tests, html=True))
|
|
188
186
|
f.write("<br><br>")
|
|
@@ -238,48 +236,34 @@ def generate_results_files(html=True, pdf=True, failures=0, skipped=0, start_tim
|
|
|
238
236
|
|
|
239
237
|
hdr_page.append(Spacer(1, 20))
|
|
240
238
|
hdr_page.append(Paragraph(f"<a name='{SUMMARY_HEADLINE}'/><b>{SUMMARY_HEADLINE}</b>", module_header))
|
|
241
|
-
hdr_page.append(Spacer(1,
|
|
239
|
+
hdr_page.append(Spacer(1, 20))
|
|
242
240
|
hdr_page.append(Paragraph(f"<u>{RUN_INFO}:</u>", bold_text_style))
|
|
243
241
|
hdr_page.append(Paragraph(f"{RUN_DATETIME}: {start_time.strftime('%d/%m/%Y, %H:%M:%S')}", bold_text_style))
|
|
244
242
|
hdr_page.append(Paragraph(f"{RUN_DUR}: {str(duration).split('.')[0]}", bold_text_style))
|
|
245
243
|
hdr_page.append(Paragraph(f"{CERT_VER}: {CERT_VERSION}", bold_text_style))
|
|
246
244
|
hdr_page.append(Spacer(1, 10))
|
|
247
|
-
if
|
|
245
|
+
if brg:
|
|
248
246
|
hdr_page.append(Paragraph(f"<u>{TESTED_DEVICE_INFO}:</u>", bold_text_style))
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
hdr_page.append(Paragraph(f"{GATEWAY} {SUP_API_VER}: {test.dut.gw_api_version}", bold_text_style))
|
|
252
|
-
hdr_page.append(Paragraph(f"{GATEWAY} {SERIALIZATION_FORMAT}: {PROTOBUF if test.dut.protobuf else JSON}", bold_text_style))
|
|
253
|
-
if test.dut_is_combo() or test.dut_is_bridge():
|
|
254
|
-
brg = test.dut.internal_brg if test.dut_is_combo() else test.dut
|
|
255
|
-
hdr_page.append(Paragraph(f"{BRG} {BLE_MAC_ADDRESS}: {brg.id_str}", bold_text_style))
|
|
247
|
+
hdr_page.append(Paragraph(f"{BRG} {BLE_MAC_ADDRESS}: {brg.id_str}", bold_text_style))
|
|
248
|
+
if isinstance(brg, cert_utils.Bridge):
|
|
256
249
|
hdr_page.append(Paragraph(f"{BRG} {BOARD_TYPE}: {ag.BOARD_TYPES_LIST[brg.board_type]}", bold_text_style))
|
|
257
250
|
hdr_page.append(Paragraph(f"{BRG} {BLE_VER}: {brg.version}", bold_text_style))
|
|
258
251
|
hdr_page.append(Paragraph(f"{BRG} {SUP_API_VER}: {brg.api_version}", bold_text_style))
|
|
259
|
-
hdr_page.append(Spacer(1, 10))
|
|
260
|
-
|
|
261
|
-
# In wlt-cert-reg there is no tester
|
|
262
|
-
if test.tester:
|
|
263
|
-
hdr_page.append(Paragraph(f"<u>{TESTING_DEVICE_INFO}:</u>", bold_text_style))
|
|
264
|
-
hdr_page.append(Paragraph(f"{SIM} {BLE_MAC_ADDRESS}: {test.tester.internal_brg.id_str}", bold_text_style))
|
|
265
|
-
hdr_page.append(Paragraph(f"{SIM} {BOARD_TYPE}: {ag.BOARD_TYPES_LIST[test.tester.internal_brg.board_type]}", bold_text_style))
|
|
266
|
-
hdr_page.append(Paragraph(f"{SIM} {BLE_VER}: {test.tester.internal_brg.version}", bold_text_style))
|
|
267
252
|
hdr_page.append(Spacer(1, 10))
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
hdr_page.append(Paragraph(f"
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
hdr_page.append(Spacer(1, 15))
|
|
253
|
+
if internal_brg:
|
|
254
|
+
hdr_page.append(Paragraph(f"<u>{TESTING_DEVICE_INFO}:</u>", bold_text_style))
|
|
255
|
+
hdr_page.append(Paragraph(f"{SIM} {BLE_MAC_ADDRESS}: {internal_brg.id_str}", bold_text_style))
|
|
256
|
+
hdr_page.append(Paragraph(f"{SIM} {BOARD_TYPE}: {ag.BOARD_TYPES_LIST[internal_brg.board_type]}", bold_text_style))
|
|
257
|
+
hdr_page.append(Paragraph(f"{SIM} {BLE_VER}: {internal_brg.version}", bold_text_style))
|
|
258
|
+
hdr_page.append(Paragraph(f"{SIM} {SUP_API_VER}: {internal_brg.api_version}", bold_text_style))
|
|
259
|
+
hdr_page.append(Spacer(1, 20))
|
|
276
260
|
|
|
277
261
|
# Analyze results per module and generate results per module for PDF
|
|
278
262
|
results_per_module = generate_results_per_module_for_pdf(tests=tests)
|
|
279
263
|
|
|
280
264
|
# Modules Table
|
|
281
265
|
hdr_page.append(Paragraph(f"<b>Modules Overview</b>", module_header))
|
|
282
|
-
hdr_page.append(Spacer(1,
|
|
266
|
+
hdr_page.append(Spacer(1, 20))
|
|
283
267
|
modules_overview = get_modules_overview(results_per_module)
|
|
284
268
|
module_stats_table_data = []
|
|
285
269
|
for module_name, status in modules_overview.items():
|
|
@@ -287,6 +271,7 @@ def generate_results_files(html=True, pdf=True, failures=0, skipped=0, start_tim
|
|
|
287
271
|
module_stats_table = Table([["Module", "Status"]] + module_stats_table_data, colWidths=[100, 100])
|
|
288
272
|
module_stats_table.setStyle(inner_table_style('CENTER'))
|
|
289
273
|
hdr_page.append(module_stats_table)
|
|
274
|
+
hdr_page.append(Spacer(1, 20))
|
|
290
275
|
hdr_page.append(PageBreak())
|
|
291
276
|
|
|
292
277
|
# Tests Tables
|
|
@@ -301,7 +286,7 @@ def generate_results_files(html=True, pdf=True, failures=0, skipped=0, start_tim
|
|
|
301
286
|
count_table = Table(count_data)
|
|
302
287
|
count_table.setStyle(inner_table_style('CENTER'))
|
|
303
288
|
hdr_page.append(count_table)
|
|
304
|
-
hdr_page.append(Spacer(1,
|
|
289
|
+
hdr_page.append(Spacer(1, 20))
|
|
305
290
|
|
|
306
291
|
# Tests Results Table
|
|
307
292
|
summary_data = []
|
|
@@ -347,12 +332,8 @@ def generate_results_files(html=True, pdf=True, failures=0, skipped=0, start_tim
|
|
|
347
332
|
import io
|
|
348
333
|
from botocore.exceptions import ClientError
|
|
349
334
|
|
|
350
|
-
if
|
|
351
|
-
|
|
352
|
-
version = test.dut.internal_brg.version if test.dut_is_combo() else test.dut.version
|
|
353
|
-
else:
|
|
354
|
-
device_id = "NO_ID"
|
|
355
|
-
version = "0.0.0"
|
|
335
|
+
device_id = brg.id_str if brg else internal_brg.id_str if internal_brg else "NO_ID"
|
|
336
|
+
version = brg.version if brg else internal_brg.version if internal_brg else "0.0.0"
|
|
356
337
|
json_data = {
|
|
357
338
|
"setup_name": os.environ['PIPELINE_NAME'],
|
|
358
339
|
"device_id": device_id,
|
certificate/cert_utils.py
CHANGED
|
@@ -26,6 +26,10 @@ ORIGINAL_AG_FILE = "wlt_types_ag.py"
|
|
|
26
26
|
TEST_MODULES_MAP = {"calibration": ag.MODULE_CALIBRATION, "datapath": ag.MODULE_DATAPATH, "energy2400": ag.MODULE_ENERGY_2400, "energy_sub1g": ag.MODULE_ENERGY_SUB1G,
|
|
27
27
|
"pwr_mgmt": ag.MODULE_PWR_MGMT, "sensors": ag.MODULE_EXT_SENSORS, "custom": ag.MODULE_CUSTOM}
|
|
28
28
|
|
|
29
|
+
# Used when mac is not really important for the test (e.g: gw_sim) or to randomize pkt data
|
|
30
|
+
def get_random_hex_str(len=12):
|
|
31
|
+
return ''.join([random.choice('0123456789ABCDEF') for i in range(len)])
|
|
32
|
+
|
|
29
33
|
def module2name(module_id):
|
|
30
34
|
for k, v in TEST_MODULES_MAP.items():
|
|
31
35
|
if module_id == v:
|
|
@@ -159,22 +163,8 @@ class WltTest:
|
|
|
159
163
|
|
|
160
164
|
def create_test_phases_and_params(self, line_params):
|
|
161
165
|
self.params = []
|
|
162
|
-
phases_source = []
|
|
163
|
-
dynamic_parameters = "dynamic_parameters" in self.test_json[ALL_SUPPORTED_VALUES]
|
|
164
|
-
if dynamic_parameters:
|
|
165
|
-
self.test_json[ALL_SUPPORTED_VALUES].remove("dynamic_parameters")
|
|
166
166
|
if len(self.test_json[ALL_SUPPORTED_VALUES]) > 0:
|
|
167
|
-
|
|
168
|
-
if line_params:
|
|
169
|
-
phases_source = line_params
|
|
170
|
-
elif len(self.test_json[ALL_SUPPORTED_VALUES]) > 0:
|
|
171
|
-
phases_source = self.test_json[ALL_SUPPORTED_VALUES]
|
|
172
|
-
else:
|
|
173
|
-
error = f"ERROR: No dynamic parameters provided for test {self.name}! Check test list file and update the supported values!\n{[f.__dict__ for f in self.phases]}"
|
|
174
|
-
handle_error(error, datetime.datetime.now())
|
|
175
|
-
else:
|
|
176
|
-
phases_source = self.test_json[ALL_SUPPORTED_VALUES]
|
|
177
|
-
self.phases = [Phase(PRE_CONFIG)] + [Phase(phase) for phase in phases_source] + [Phase(RESTORE_CONFIG)]
|
|
167
|
+
self.phases = [Phase(PRE_CONFIG)] + [Phase(param) for param in self.test_json[ALL_SUPPORTED_VALUES]] + [Phase(RESTORE_CONFIG)]
|
|
178
168
|
for param_phase in self.phases:
|
|
179
169
|
param = Param(param_phase.name)
|
|
180
170
|
if (param.name in line_params or param.value in [eval_param(p) for p in line_params]):
|
|
@@ -230,9 +220,6 @@ class WltTest:
|
|
|
230
220
|
return phase
|
|
231
221
|
return None
|
|
232
222
|
|
|
233
|
-
def add_phase(self, phase):
|
|
234
|
-
self.phases[-1:-1] = [phase]
|
|
235
|
-
|
|
236
223
|
def update_overall_rc(self):
|
|
237
224
|
if any([phase.rc == TEST_FAILED for phase in self.phases]):
|
|
238
225
|
self.rc = TEST_FAILED
|
|
@@ -318,8 +305,6 @@ class Bridge:
|
|
|
318
305
|
self.cfg_hash = interface_pkt.cfg_hash if interface_pkt else cfg_hash
|
|
319
306
|
self.api_version = interface_pkt.api_version if interface_pkt else api_version
|
|
320
307
|
if import_defs:
|
|
321
|
-
if self.board_type >= len(ag.BOARD_TYPES_LIST):
|
|
322
|
-
handle_error(f"ERROR: Unknown board type {self.board_type} for bridge {self.id_str}!", datetime.datetime.now())
|
|
323
308
|
self.defines_file_name = f'{ag.BOARD_TYPES_LIST[self.board_type]}_defines.cfg'
|
|
324
309
|
overwrite_dict = {}
|
|
325
310
|
# Overwrite auto-generated defines for the specific bridge
|
|
@@ -400,7 +385,7 @@ def ut_prep_brg(args, start_time, tester, brg_id, tester_flag=False, validation_
|
|
|
400
385
|
if args.latest or args.rc:
|
|
401
386
|
return handle_prep_brg_for_latest(test, interface, brg_id, start_time)
|
|
402
387
|
elif test.rc == TEST_FAILED:
|
|
403
|
-
error = f"ERROR: Didn't get ModuleIfV{test.active_brg.api_version} from BRG:{brg.id_str}
|
|
388
|
+
error = f"ERROR: Didn't get ModuleIfV{test.active_brg.api_version} from BRG:{brg.id_str}!"
|
|
404
389
|
handle_error(error, start_time)
|
|
405
390
|
version = f"{interface.major_ver}.{interface.minor_ver}.{interface.patch_ver}"
|
|
406
391
|
board_type = interface.board_type
|
|
@@ -477,7 +462,7 @@ class Gateway:
|
|
|
477
462
|
|
|
478
463
|
def get_tester_id(tester):
|
|
479
464
|
if not tester or tester == GW_SIM_PREFIX:
|
|
480
|
-
return f"GW_SIM_{get_random_hex_str(
|
|
465
|
+
return f"GW_SIM_{get_random_hex_str()}"
|
|
481
466
|
else:
|
|
482
467
|
# Allow tester to be specified as tester_id:ble_addr
|
|
483
468
|
if ':' in tester:
|
|
@@ -527,16 +512,16 @@ def prep_dut(args, tester, validation_schema, mqttc, start_time, upload_wait_tim
|
|
|
527
512
|
# Prepare gateway's internal BRG
|
|
528
513
|
if brg_flag(validation_schema):
|
|
529
514
|
dut.internal_brg = ut_prep_brg(args, start_time, tester=test.dut, brg_id=args.combo_ble_addr, validation_schema=validation_schema['modules'])
|
|
530
|
-
if dut.internal_brg.api_version
|
|
531
|
-
|
|
515
|
+
if dut.internal_brg.api_version != ag.API_VERSION_LATEST:
|
|
516
|
+
handle_error(f"ERROR: Certificate FW api_version={dut.internal_brg.api_version} instead of api_version={ag.API_VERSION_LATEST}! Please upgrade the FW!", start_time)
|
|
532
517
|
# Return Gateway object
|
|
533
518
|
return dut
|
|
534
519
|
|
|
535
520
|
elif brg_flag(validation_schema):
|
|
536
521
|
# Prepare standalone bridge using prepared tester
|
|
537
522
|
brg = ut_prep_brg(args, start_time, tester=tester, brg_id=args.dut, validation_schema=validation_schema['modules'])
|
|
538
|
-
if brg.api_version
|
|
539
|
-
handle_error(f"ERROR: DUT
|
|
523
|
+
if brg.api_version != ag.API_VERSION_LATEST:
|
|
524
|
+
handle_error(f"ERROR: DUT FW api_version={brg.api_version} instead of api_version={ag.API_VERSION_LATEST}!", start_time)
|
|
540
525
|
return brg
|
|
541
526
|
|
|
542
527
|
|
|
@@ -591,6 +576,10 @@ def prep_tester(args, mqttc, start_time, gw_sim_thread=None):
|
|
|
591
576
|
|
|
592
577
|
# Prepare tester's internal BRG
|
|
593
578
|
tester.internal_brg = ut_prep_brg(args, start_time, tester, internal_brg_mac_addr, tester_flag=True, validation_schema=None)
|
|
579
|
+
if gw_sim_thread and tester.internal_brg.version not in TESTER_FW_VERSIONS:
|
|
580
|
+
utPrint(f"ERROR: Certificate FW version={tester.internal_brg.version} instead of versions={TESTER_FW_VERSIONS}!\n"
|
|
581
|
+
f"Please run the command wlt-cert-tester-upgrade to upgrade the tester firmware!", "RED")
|
|
582
|
+
handle_error("ERROR: Tester FW version mismatch!", start_time)
|
|
594
583
|
# Return Gateway object
|
|
595
584
|
return tester
|
|
596
585
|
|
|
@@ -621,7 +610,6 @@ def prep_gw_info_action(test, start_time, brg_flag, target):
|
|
|
621
610
|
gw.gw_version = {BLE_VERSION : info[BLE_VERSION], WIFI_VERSION : info[WIFI_VERSION]}
|
|
622
611
|
if brg_flag and BLE_MAC_ADDR in info:
|
|
623
612
|
internal_brg_mac_addr = info[BLE_MAC_ADDR]
|
|
624
|
-
# For internal use only in versions update test
|
|
625
613
|
if GW_API_VERSION in info:
|
|
626
614
|
gw.gw_api_version = info[GW_API_VERSION]
|
|
627
615
|
|
certificate/certificate.py
CHANGED
|
@@ -51,11 +51,6 @@ def skip_test_check(test, validation_schema):
|
|
|
51
51
|
skip_string = f"Skipped {test.module_name} because it can run only with Gateway or Combo devices"
|
|
52
52
|
elif BRIDGE_ONLY_TEST in test.test_json and test.test_json[BRIDGE_ONLY_TEST] and not test.dut_is_bridge():
|
|
53
53
|
skip_string = f"Skipped {test.module_name} because it can run only with Bridge devices without Gateway functionality"
|
|
54
|
-
elif SUPPORTED_FROM_API_VERSION in test.test_json:
|
|
55
|
-
if test.test_json[MODULE] == "Cloud Connectivity" and test.dut_is_gateway() and int(test.dut.gw_api_version) < test.test_json[SUPPORTED_FROM_API_VERSION]:
|
|
56
|
-
skip_string = f"Skipped {test.module_name} because it is supported from api version {test.test_json[SUPPORTED_FROM_API_VERSION]} and dut api version is {test.dut.gw_api_version}"
|
|
57
|
-
elif test.test_json[MODULE] != "Cloud Connectivity" and test.active_brg.api_version < test.test_json[SUPPORTED_FROM_API_VERSION]:
|
|
58
|
-
skip_string = f"Skipped {test.module_name} because it is supported from api version {test.test_json[SUPPORTED_FROM_API_VERSION]} and dut api version is {test.active_brg.api_version}"
|
|
59
54
|
if skip_string:
|
|
60
55
|
utPrint(f"{SEP}{skip_string}{SEP}", "WARNING")
|
|
61
56
|
test.reason = skip_string
|
|
@@ -106,12 +101,11 @@ def main(args):
|
|
|
106
101
|
|
|
107
102
|
utPrint(f"wiliot_certificate version: {CERT_VERSION}")
|
|
108
103
|
utPrint(str(args.__dict__))
|
|
104
|
+
os.makedirs(ARTIFACTS_DIR, exist_ok=True)
|
|
109
105
|
start_time = datetime.datetime.now()
|
|
110
106
|
|
|
111
107
|
# Clean
|
|
112
108
|
clean(args)
|
|
113
|
-
# Create artifacts dir
|
|
114
|
-
os.makedirs(ARTIFACTS_DIR, exist_ok=True)
|
|
115
109
|
|
|
116
110
|
# Filter tests
|
|
117
111
|
test_list = TEST_LIST_FW_UPDATE_FILE if args.latest or args.rc else args.tl
|
|
@@ -136,9 +130,9 @@ def main(args):
|
|
|
136
130
|
# Run Gateway Simulator in separate thread
|
|
137
131
|
gw_sim_thread = threading.Thread(target=cert_gw_sim.gw_sim_run, daemon=True, kwargs={'port':args.port, 'gw_id': args.tester,
|
|
138
132
|
'custom_broker':args.custom_broker,
|
|
139
|
-
'
|
|
133
|
+
'analyze_interference':args.analyze_interference})
|
|
140
134
|
gw_sim_thread.start()
|
|
141
|
-
sleep_time = (len(cert_gw_sim.CHANNELS_TO_ANALYZE) * 30) + 15 if
|
|
135
|
+
sleep_time = (len(cert_gw_sim.CHANNELS_TO_ANALYZE) * 30) + 15 if args.analyze_interference else 10
|
|
142
136
|
time.sleep(sleep_time)
|
|
143
137
|
tester = cert_utils.prep_tester(args, tester_mqttc, start_time, gw_sim_thread)
|
|
144
138
|
|
|
@@ -188,13 +182,12 @@ def main(args):
|
|
|
188
182
|
print(f"Test Duration: {test.duration}")
|
|
189
183
|
print(tabulate.tabulate([[i+1, i+1-(failures+skipped), skipped, failures, len(tests)]],
|
|
190
184
|
headers=["FINISHED", "PASSED", "SKIPPED", "FAILED", "TOTAL"], tablefmt="pretty"))
|
|
191
|
-
|
|
192
|
-
wait_time_n_print(2)
|
|
185
|
+
wait_time_n_print(2)
|
|
193
186
|
if exit_on_test_failure and test.rc == TEST_FAILED:
|
|
194
187
|
break
|
|
195
188
|
|
|
196
189
|
# Print results
|
|
197
|
-
cert_results.generate_results_files(html=True, pdf=True, failures=failures, skipped=skipped, start_time=start_time, tests=tests, non_cert_run=args.non_cert_run)
|
|
190
|
+
cert_results.generate_results_files(test.dut, test.tester, html=True, pdf=True, failures=failures, skipped=skipped, start_time=start_time, tests=tests, non_cert_run=args.non_cert_run)
|
|
198
191
|
if not pipeline_running():
|
|
199
192
|
webbrowser.open('file://' + os.path.realpath(os.path.join(ARTIFACTS_DIR, UT_RESULT_FILE_PDF)))
|
|
200
193
|
|
certificate/certificate_cli.py
CHANGED
|
@@ -24,23 +24,25 @@ class CertificateCLI:
|
|
|
24
24
|
description='Certificate - CLI Tool to test Wiliot Devices',
|
|
25
25
|
epilog=
|
|
26
26
|
"run examples:\n"
|
|
27
|
-
" Run command example with COM PORT
|
|
28
|
-
" wlt-cert-cli --
|
|
29
|
-
" Run command example with remote GW
|
|
30
|
-
" wlt-cert-cli --
|
|
27
|
+
" Run command example with COM PORT connection:\n"
|
|
28
|
+
" wlt-cert-cli --gw SIM --brg <XXXXXXXXXXXX> --port <COM_PORT>\n"
|
|
29
|
+
" Run command example with remote GW connection:\n"
|
|
30
|
+
" wlt-cert-cli --gw <YYYYYYYYYYYY> --brg <XXXXXXXXXXXX>\n"
|
|
31
31
|
" Run command example for running datapath module tests only:\n"
|
|
32
|
-
" wlt-cert-cli --
|
|
32
|
+
" wlt-cert-cli --gw <YYYYYYYYYYYY> --brg <XXXXXXXXXXXX> --run datapath\n"
|
|
33
33
|
" Run command example with sanity test list:\n"
|
|
34
|
-
" wlt-cert-cli --
|
|
35
|
-
" Run command example with COM PORT
|
|
36
|
-
" wlt-cert-cli --
|
|
34
|
+
" wlt-cert-cli --gw <YYYYYYYYYYYY> --brg <XXXXXXXXXXXX> --tl certificate_sanity_test_list.txt\n"
|
|
35
|
+
" Run command example with COM PORT connection for bridge with cloud connectivity:\n"
|
|
36
|
+
" wlt-cert-cli --gw SIM --brg_cloud_connectivity <XXXXXXXXXXXX> --tl certificate_bcc_test_list.txt --port <COM_PORT>\n"
|
|
37
|
+
" Run command example with remote GW connection for bridge with cloud connectivity:\n"
|
|
38
|
+
" wlt-cert-cli --gw <YYYYYYYYYYYY> --brg_cloud_connectivity <XXXXXXXXXXXX> --tl certificate_bcc_test_list.txt\n",
|
|
37
39
|
formatter_class=argparse.RawDescriptionHelpFormatter
|
|
38
40
|
)
|
|
39
41
|
self.parser.add_argument('--validation_schema', '-vs', required=True, help='Validation schema json file path to use for the run')
|
|
40
42
|
self.parser.add_argument('--dut', required=True, help="Tested device ID. When DUT is a combo device, use <Gateway_ID>:<BLE_MAC>")
|
|
41
43
|
self.parser.add_argument('--combo_ble_addr', default="", help="Combo device BLE MAC address" + argparse.SUPPRESS)
|
|
42
44
|
self.parser.add_argument('--tester', default=GW_SIM_PREFIX, help='Tester id to run on the test, SIM prefix is default and used for COM tester')
|
|
43
|
-
self.parser.add_argument('--port', '-p', default='', help='UART PORT connection to use for the run, if not provided
|
|
45
|
+
self.parser.add_argument('--port', '-p', default='', help='UART PORT connection to use for the run, if not provided last available port is used')
|
|
44
46
|
self.parser.add_argument('--custom_broker', '-cb', required=True, help='Choose custom MQTT broker configuration json file to use for the run,' \
|
|
45
47
|
' for explanation of the format see https://community.wiliot.com/customers/s/article/Wiliot-Gateway-Certification')
|
|
46
48
|
self.parser.add_argument('--clean', default=False, action='store_true', help='Clean old logs before running the tests')
|
|
@@ -50,7 +52,8 @@ class CertificateCLI:
|
|
|
50
52
|
self.parser.add_argument('--exit_on_test_failure', default=False, action='store_true', help='Stop running the tests if a test failed ' + argparse.SUPPRESS)
|
|
51
53
|
self.parser.add_argument('--exit_on_param_failure', default=False, action='store_true', help='Sets exit_on_param_failure mode to true in order to prevent \
|
|
52
54
|
tests from continuing iteration over all possibilities in case of failure ' + argparse.SUPPRESS)
|
|
53
|
-
self.parser.add_argument('--
|
|
55
|
+
self.parser.add_argument('--analyze_interference', '-ai', default=False, action='store_true', help='Analyze interference before tests start \
|
|
56
|
+
(relevant only for Gateway Simulator)')
|
|
54
57
|
self.parser.add_argument('--unsterile_run', '-ur', default=False, action='store_true',
|
|
55
58
|
help="Set unsterile run mode for the run if there are pixels or energizing devices nearby")
|
|
56
59
|
self.parser.add_argument("--overwrite_defaults", '-od', type=parse_dict_arg, help='Manually overwrite default defines for the bridge (key1=value1,key2=value2...)')
|
|
@@ -22,7 +22,6 @@ energy2400/output_power_test OUTPUT_POWER_2_4_MAX_MINUS_26 OUTPUT_POWER_2_4_MAX_
|
|
|
22
22
|
energy2400/duty_cycle_test 1 25 50 75
|
|
23
23
|
energy2400/signal_indicator_test rssi_threshold rx tx_eu_pattern disable_rx disable_tx rx_tx
|
|
24
24
|
energy2400/signal_indicator_ble5_test rssi_threshold rx tx disable_rx disable_tx rx_tx
|
|
25
|
-
energy2400/signal_indicator_ext_adv_test ext_adv_rx37 ext_adv_rx10
|
|
26
25
|
|
|
27
26
|
# ------------- energy_sub1g -------------
|
|
28
27
|
energy_sub1g/pattern_test SUB1G_ENERGY_PATTERN_NO_ENERGIZING SUB1G_ENERGY_PATTERN_SINGLE_TONE_915000 SUB1G_ENERGY_PATTERN_FCC_HOPPING SUB1G_ENERGY_PATTERN_SINGLE_TONE_917500 SUB1G_ENERGY_PATTERN_NZ_HOPPING
|
|
@@ -49,7 +48,7 @@ datapath/rx_rate_gen2_test mid_values diff_pacer min_value max_value diff_rate
|
|
|
49
48
|
datapath/rx_rate_gen3_test mid_values diff_pacer min_value max_value diff_rate
|
|
50
49
|
datapath/stress_test rep3 rep2 rep1
|
|
51
50
|
datapath/stress_gen3_test rep3 rep2 rep1
|
|
52
|
-
datapath/num_of_tags_test
|
|
51
|
+
datapath/num_of_tags_test 5000
|
|
53
52
|
|
|
54
53
|
# ------------- pwr_mgmt -------------
|
|
55
54
|
pwr_mgmt/pwr_mgmt_test
|
|
@@ -68,9 +67,8 @@ cloud_connectivity/uplink_test mgmt_pkt pixels_pkt sensor_pkt
|
|
|
68
67
|
cloud_connectivity/downlink_test
|
|
69
68
|
cloud_connectivity/uplink_ext_adv_test
|
|
70
69
|
cloud_connectivity/reboot_test
|
|
71
|
-
cloud_connectivity/stress_test
|
|
72
|
-
cloud_connectivity/ext_adv_stress_test
|
|
70
|
+
cloud_connectivity/stress_test 20 40 60 80 100 120 140 160 180 200 222 250 285 333
|
|
71
|
+
cloud_connectivity/ext_adv_stress_test 20 40 60 80 100 120 140 160 180 200
|
|
73
72
|
cloud_connectivity/channel_scan_behaviour_test
|
|
74
73
|
cloud_connectivity/acl_test deny allow
|
|
75
|
-
cloud_connectivity/acl_ext_adv_test deny allow
|
|
76
|
-
cloud_connectivity/deduplication_test
|
|
74
|
+
cloud_connectivity/acl_ext_adv_test deny allow
|
|
@@ -22,7 +22,6 @@ energy2400/output_power_test OUTPUT_POWER_2_4_MAX_MINUS_14 OUTPUT_POWER_2_4_MAX_
|
|
|
22
22
|
energy2400/duty_cycle_test 1 50 75
|
|
23
23
|
energy2400/signal_indicator_test rx_tx
|
|
24
24
|
energy2400/signal_indicator_ble5_test rx_tx
|
|
25
|
-
energy2400/signal_indicator_ext_adv_test ext_adv_rx37
|
|
26
25
|
|
|
27
26
|
# ------------- energy_sub1g -------------
|
|
28
27
|
energy_sub1g/pattern_test SUB1G_ENERGY_PATTERN_NO_ENERGIZING SUB1G_ENERGY_PATTERN_FCC_HOPPING SUB1G_ENERGY_PATTERN_SINGLE_TONE_917500 SUB1G_ENERGY_PATTERN_NZ_HOPPING
|
|
@@ -60,7 +59,7 @@ cloud_connectivity/uplink_test mgmt_pkt pixels_pkt
|
|
|
60
59
|
cloud_connectivity/downlink_test
|
|
61
60
|
cloud_connectivity/uplink_ext_adv_test
|
|
62
61
|
cloud_connectivity/reboot_test
|
|
63
|
-
cloud_connectivity/stress_test
|
|
64
|
-
cloud_connectivity/ext_adv_stress_test
|
|
62
|
+
cloud_connectivity/stress_test 100 222
|
|
63
|
+
cloud_connectivity/ext_adv_stress_test 20 100
|
|
65
64
|
cloud_connectivity/acl_test deny
|
|
66
65
|
cloud_connectivity/acl_ext_adv_test allow
|
|
@@ -22,7 +22,7 @@ energy2400/output_power_test OUTPUT_POWER_2_4_MAX_MINUS_26 OUTPUT_POWER_2_4_MAX_
|
|
|
22
22
|
energy2400/duty_cycle_test 1 25 50 75
|
|
23
23
|
energy2400/signal_indicator_test rssi_threshold rx tx_eu_pattern disable_rx disable_tx rx_tx
|
|
24
24
|
energy2400/signal_indicator_ble5_test rssi_threshold rx tx disable_rx disable_tx rx_tx
|
|
25
|
-
energy2400/signal_indicator_ext_adv_test
|
|
25
|
+
#energy2400/signal_indicator_ext_adv_test rssi_threshold brg0_tx_brg1_rx brg0_rxtx_brg1_rxtx
|
|
26
26
|
|
|
27
27
|
# ------------- energy_sub1g -------------
|
|
28
28
|
energy_sub1g/pattern_test SUB1G_ENERGY_PATTERN_NO_ENERGIZING SUB1G_ENERGY_PATTERN_SINGLE_TONE_915000 SUB1G_ENERGY_PATTERN_FCC_HOPPING SUB1G_ENERGY_PATTERN_SINGLE_TONE_917500 SUB1G_ENERGY_PATTERN_NZ_HOPPING
|
|
@@ -49,7 +49,7 @@ datapath/rx_rate_gen2_test mid_values diff_pacer min_value max_value diff_rate
|
|
|
49
49
|
datapath/rx_rate_gen3_test mid_values diff_pacer min_value max_value diff_rate
|
|
50
50
|
datapath/stress_test rep3 rep2 rep1
|
|
51
51
|
datapath/stress_gen3_test rep3 rep2 rep1
|
|
52
|
-
datapath/num_of_tags_test
|
|
52
|
+
datapath/num_of_tags_test 5000
|
|
53
53
|
|
|
54
54
|
# ------------- pwr_mgmt -------------
|
|
55
55
|
pwr_mgmt/pwr_mgmt_test
|
|
@@ -67,10 +67,9 @@ cloud_connectivity/uplink_test mgmt_pkt pixels_pkt sensor_pkt geolocation
|
|
|
67
67
|
cloud_connectivity/downlink_test
|
|
68
68
|
cloud_connectivity/uplink_ext_adv_test
|
|
69
69
|
cloud_connectivity/reboot_test
|
|
70
|
-
cloud_connectivity/stress_test
|
|
71
|
-
cloud_connectivity/ext_adv_stress_test
|
|
70
|
+
cloud_connectivity/stress_test 20 40 60 80 100 120 140 160 180 200 222 250 285 333
|
|
71
|
+
cloud_connectivity/ext_adv_stress_test 20 40 60 80 100 120 140 160 180 200
|
|
72
72
|
cloud_connectivity/channel_scan_behaviour_test
|
|
73
73
|
cloud_connectivity/acl_test deny allow
|
|
74
74
|
cloud_connectivity/acl_ext_adv_test deny allow
|
|
75
75
|
cloud_connectivity/brg_ota_test
|
|
76
|
-
cloud_connectivity/deduplication_test
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"dataSimOnlyTest": 0,
|
|
15
|
-
"SupportedFromApiVersion": 13,
|
|
16
15
|
"allSupportedValues": ["OUTPUT_POWER_2_4_MAX", "OUTPUT_POWER_2_4_MAX_MINUS_2", "OUTPUT_POWER_2_4_MAX_MINUS_3",
|
|
17
16
|
"OUTPUT_POWER_2_4_MAX_MINUS_4", "OUTPUT_POWER_2_4_MAX_MINUS_6", "OUTPUT_POWER_2_4_MAX_MINUS_7",
|
|
18
17
|
"OUTPUT_POWER_2_4_MAX_MINUS_8", "OUTPUT_POWER_2_4_MAX_MINUS_10", "OUTPUT_POWER_2_4_MAX_MINUS_11",
|
|
@@ -12,6 +12,5 @@
|
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"dataSimOnlyTest": 0,
|
|
15
|
-
"SupportedFromApiVersion": 12,
|
|
16
15
|
"allSupportedValues": ["CALIBRATION_PATTERN_STANDARD", "CALIBRATION_PATTERN_38_38_39", "CALIBRATION_PATTERN_EU_PATTERN", "CALIBRATION_PATTERN_DISABLE_BEACON"]
|
|
17
16
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "Access Control List using Extended Advertising",
|
|
3
3
|
"module": "Cloud Connectivity",
|
|
4
4
|
"purpose": "Test the access control list (ACL) functionality, configure allow list and deny list and test the behavior, while the Bridge is transmitting in extended advertising",
|
|
5
|
-
"documentation": "
|
|
5
|
+
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
6
|
"initialCondition": "Gateway configured to defaults",
|
|
7
7
|
"procedure": ["Test prolog", "configure the brg to be on the deny list", "configure the brg to be on the allow list", "Test epilog"],
|
|
8
8
|
"expectedOutcome": "For the deny list - no unified packets are found, for the allow list - unified packets are found",
|
|
@@ -10,6 +10,5 @@
|
|
|
10
10
|
"multiBridgeTest": 0,
|
|
11
11
|
"gwOnlyTest": 1,
|
|
12
12
|
"dataSimOnlyTest": 1,
|
|
13
|
-
"SupportedFromApiVersion": 206,
|
|
14
13
|
"allSupportedValues": ["deny", "allow"]
|
|
15
14
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "Access Control List",
|
|
3
3
|
"module": "Cloud Connectivity",
|
|
4
4
|
"purpose": "Test the access control list (ACL) functionality, configure allow list and deny list and test the behavior",
|
|
5
|
-
"documentation": "
|
|
5
|
+
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
6
|
"initialCondition": "Gateway configured to defaults",
|
|
7
7
|
"procedure": ["Test prolog", "configure the brg to be on the deny list", "configure the brg to be on the allow list", "Test epilog"],
|
|
8
8
|
"expectedOutcome": "For the deny list - no unified packets are found, for the allow list - unified packets are found",
|
|
@@ -10,6 +10,5 @@
|
|
|
10
10
|
"multiBridgeTest": 0,
|
|
11
11
|
"gwOnlyTest": 1,
|
|
12
12
|
"dataSimOnlyTest": 1,
|
|
13
|
-
"SupportedFromApiVersion": 205,
|
|
14
13
|
"allSupportedValues": ["deny", "allow"]
|
|
15
14
|
}
|
|
@@ -8,7 +8,7 @@ import certificate.cert_data_sim as cert_data_sim
|
|
|
8
8
|
from certificate.ag.wlt_types_ag import *
|
|
9
9
|
|
|
10
10
|
SCAN_TIMEOUT = 30
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
# DEFINES
|
|
13
13
|
test_indicator = cert_data_sim.PIXEL_SIM_INDICATOR
|
|
14
14
|
|
|
@@ -20,11 +20,11 @@ def run(test):
|
|
|
20
20
|
return cert_common.test_epilog(test)
|
|
21
21
|
|
|
22
22
|
# Generate management and data packets
|
|
23
|
-
bridge_ids = [
|
|
24
|
-
pixels_pkts,
|
|
25
|
-
|
|
23
|
+
bridge_ids = []
|
|
24
|
+
pixels_pkts, bridge_ids = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=20, num_of_brgs=4,
|
|
25
|
+
pkt_type=PIXELS_PKT, indicator=test_indicator)
|
|
26
26
|
|
|
27
|
-
mgmt_pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=
|
|
27
|
+
mgmt_pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=4, brgs_list=bridge_ids,
|
|
28
28
|
pkt_type=MGMT_PKT, indicator=test_indicator)
|
|
29
29
|
# Use first 3 bridges for ACL, 4th bridge is not in ACL
|
|
30
30
|
acl_bridge_ids = bridge_ids[:3]
|
|
@@ -41,7 +41,7 @@ def run(test):
|
|
|
41
41
|
cfg = cert_config.get_default_gw_dict(test)
|
|
42
42
|
cfg[ACL][ACL_BRIDGE_IDS] = acl_bridge_ids
|
|
43
43
|
cfg[ACL][ACL_MODE] = param.value
|
|
44
|
-
test,
|
|
44
|
+
test, ret = cert_config.gw_configure(test, cfg=cfg, wait=True)
|
|
45
45
|
print_update_wait(1)
|
|
46
46
|
|
|
47
47
|
test.get_mqttc_by_target(DUT).flush_pkts()
|
|
@@ -51,8 +51,8 @@ def run(test):
|
|
|
51
51
|
# Analyze pass/fail
|
|
52
52
|
# Get all received packets with the test indicator and filter packets by bridge IDs in ACL list
|
|
53
53
|
received_pkts = cert_mqtt.get_unified_data_pkts(test, only_active_brg=False, indicator=test_indicator)
|
|
54
|
-
acl_bridge_pkts = [pkt for pkt in received_pkts if
|
|
55
|
-
non_acl_bridge_pkts = [pkt for pkt in received_pkts if
|
|
54
|
+
acl_bridge_pkts = [pkt for pkt in received_pkts if pkt[ALIAS_BRIDGE_ID] in acl_bridge_ids]
|
|
55
|
+
non_acl_bridge_pkts = [pkt for pkt in received_pkts if pkt[ALIAS_BRIDGE_ID] in non_acl_bridge_id]
|
|
56
56
|
|
|
57
57
|
# In deny mode - we want to make sure bridges in ACL list are filtered
|
|
58
58
|
if param.value == ACL_DENY:
|
|
@@ -71,18 +71,20 @@ def run(test):
|
|
|
71
71
|
test.add_reason(f"Phase failed! Bridge {non_acl_bridge_id} was not on the allow list "
|
|
72
72
|
f"and {len(non_acl_bridge_pkts)} packets were found from it")
|
|
73
73
|
# Check that we received packets from all expected bridges
|
|
74
|
-
|
|
75
|
-
if
|
|
74
|
+
received_bridge_ids = set([pkt[ALIAS_BRIDGE_ID] for pkt in acl_bridge_pkts])
|
|
75
|
+
if received_bridge_ids != set(acl_bridge_ids):
|
|
76
76
|
test.rc = TEST_FAILED
|
|
77
77
|
test.add_reason("Phase failed! Didn't receive packets from all bridges that were on the allow list")
|
|
78
78
|
|
|
79
79
|
# Check that management packets are received from all bridges (ACL doesn't filter mgmt packets)
|
|
80
80
|
all_mgmt_pkts = cert_mqtt.get_all_mgmt_pkts(test.get_mqttc_by_target(DUT), indicator=test_indicator)
|
|
81
|
-
|
|
81
|
+
mgmt_bridge_ids = set([pkt[ALIAS_BRIDGE_ID] for pkt in all_mgmt_pkts])
|
|
82
82
|
|
|
83
|
-
if
|
|
83
|
+
if not set(bridge_ids).issubset(mgmt_bridge_ids):
|
|
84
84
|
test.rc = TEST_FAILED
|
|
85
|
-
|
|
85
|
+
missing_bridges = set(bridge_ids) - mgmt_bridge_ids
|
|
86
|
+
test.add_reason(f"Phase failed! Expected management packets from all bridges, "
|
|
87
|
+
f"whether they are on the ACL or not, but missing from BRG {missing_bridges}")
|
|
86
88
|
|
|
87
89
|
field_functionality_pass_fail_print(test, "ACL", value=param.value)
|
|
88
90
|
test.set_phase_rc(param.name, test.rc)
|
|
@@ -9,11 +9,10 @@
|
|
|
9
9
|
"Analyze if bridge was upgraded and action status message was uploaded",
|
|
10
10
|
"Test epilog"],
|
|
11
11
|
"expectedOutcome": "Tester brg advertises ModuleIF packet with the new version and DUT Gateway publish an actionStatus message indicating success and within timeout",
|
|
12
|
-
"mandatory":
|
|
12
|
+
"mandatory": 1,
|
|
13
13
|
"multiBridgeTest": 0,
|
|
14
14
|
"gwOnlyTest": 1,
|
|
15
15
|
"internalBridge": 1,
|
|
16
|
-
"SupportedFromApiVersion": 203,
|
|
17
16
|
"allSupportedValues": []
|
|
18
17
|
|
|
19
18
|
}
|