wiliot-certificate 1.5.2a1__py3-none-any.whl → 4.4.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.
- brg_certificate/ag/energous_v0_defines.py +3 -3
- brg_certificate/ag/energous_v1_defines.py +3 -3
- brg_certificate/ag/energous_v2_defines.py +3 -3
- brg_certificate/ag/energous_v3_defines.py +3 -3
- brg_certificate/ag/energous_v4_defines.py +3 -3
- brg_certificate/ag/fanstel_lan_v0_defines.py +3 -3
- brg_certificate/ag/fanstel_lte_v0_defines.py +3 -3
- brg_certificate/ag/fanstel_wifi_v0_defines.py +3 -3
- brg_certificate/ag/minew_lte_v0_defines.py +3 -3
- brg_certificate/ag/wlt_types.html +3 -3
- brg_certificate/ag/wlt_types_ag.py +8 -8
- brg_certificate/cert_common.py +61 -11
- brg_certificate/cert_config.py +12 -7
- brg_certificate/cert_utils.py +3 -1
- brg_certificate/certificate_bcc_test_list.txt +2 -2
- brg_certificate/certificate_test_list.txt +4 -4
- brg_certificate/tests/calibration/interval_test/interval_test.py +7 -6
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +7 -6
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +20 -10
- brg_certificate/tests/datapath/aging_test/aging_test.py +11 -9
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +11 -13
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +7 -5
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +13 -8
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +11 -4
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +12 -10
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +7 -6
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +12 -9
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +13 -10
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +13 -11
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +13 -11
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +7 -7
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +34 -35
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +41 -44
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +1 -2
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +7 -9
- brg_certificate/tests/datapath/stress_test/stress_test.json +1 -2
- brg_certificate/tests/datapath/stress_test/stress_test.py +8 -10
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +1 -1
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +14 -11
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +15 -13
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +1 -1
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +2 -2
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +7 -5
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +7 -5
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +7 -5
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +2 -2
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +256 -278
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +2 -2
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +256 -278
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +3 -3
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +30 -91
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +7 -6
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +7 -5
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +2 -2
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +7 -6
- brg_certificate/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +2 -2
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +8 -7
- gw_certificate/api_if/gw_capabilities.py +37 -1
- gw_certificate/common/serialization_formatter.py +80 -0
- gw_certificate/common/wltPb_pb2.py +50 -38
- gw_certificate/common/wltPb_pb2.pyi +42 -35
- gw_certificate/gw_certificate.py +4 -2
- gw_certificate/gw_certificate_cli.py +5 -4
- gw_certificate/interface/4.4.88_app.zip +0 -0
- gw_certificate/interface/{4.4.52_sd_bl_app.zip → 4.4.88_sd_bl_app.zip} +0 -0
- gw_certificate/interface/ble_simulator.py +5 -3
- gw_certificate/interface/mqtt.py +39 -23
- gw_certificate/interface/pkt_generator.py +0 -44
- gw_certificate/interface/uart_if.py +25 -12
- gw_certificate/tests/actions.py +33 -5
- gw_certificate/tests/connection.py +3 -1
- gw_certificate/tests/generic.py +1 -1
- gw_certificate/tests/registration.py +4 -4
- gw_certificate/tests/static/generated_packet_table.py +47 -25
- gw_certificate/tests/static/packet_table.csv +10067 -10051
- gw_certificate/tests/static/uplink_defines.py +1 -0
- gw_certificate/tests/throughput.py +2 -1
- gw_certificate/tests/uplink.py +142 -22
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/METADATA +1 -1
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/RECORD +84 -83
- gw_certificate/interface/4.4.52_app.zip +0 -0
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/WHEEL +0 -0
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/licenses/LICENSE +0 -0
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/top_level.txt +0 -0
brg_certificate/cert_config.py
CHANGED
|
@@ -161,7 +161,10 @@ def fields_n_vals_dict_get(fields, values):
|
|
|
161
161
|
functionality_run_print(print_string)
|
|
162
162
|
return fields_and_values
|
|
163
163
|
|
|
164
|
-
def brg_configure(test, cfg_pkt=None, module=None, fields=None, values=None, wait=True, ret_cfg_pkt=False):
|
|
164
|
+
def brg_configure(test, cfg_pkt=None, module=None, fields=None, values=None, wait=True, ret_cfg_pkt=False, ble5=False):
|
|
165
|
+
if ble5:
|
|
166
|
+
return brg_configure_ble5(test, cfg_pkt=cfg_pkt, module=module, fields=fields,
|
|
167
|
+
values=values, ret_cfg_pkt=ret_cfg_pkt, wait=wait)
|
|
165
168
|
retries = 3
|
|
166
169
|
if not cfg_pkt:
|
|
167
170
|
fields_n_vals = fields_n_vals_dict_get(fields, values)
|
|
@@ -217,7 +220,9 @@ def brg_configure_ble5(test, cfg_pkt=None, module=None, fields=None, values=None
|
|
|
217
220
|
wlt_pkt = WltPkt()
|
|
218
221
|
start_time = datetime.datetime.now()
|
|
219
222
|
gw_downlink(test=test, raw_tx_data=cfg_pkt.dump(), max_duration=BLE5_MAX_DURATION, max_retries=BLE5_MAX_RETRIES)
|
|
220
|
-
|
|
223
|
+
if wait is False:
|
|
224
|
+
return test, DONE
|
|
225
|
+
while not pkts_found:
|
|
221
226
|
if ((datetime.datetime.now() - start_time).seconds > ((ag.BLE5_PARAM_PRIMARY_CHANNEL_SCAN_CYCLE/1000)+1)):
|
|
222
227
|
if num_of_tries < 3:
|
|
223
228
|
num_of_tries += 1
|
|
@@ -279,16 +284,16 @@ def get_default_brg_pkt(test, pkt_type, group_id=ag.GROUP_ID_GW2BRG, seq_id=0, *
|
|
|
279
284
|
brg_pkt = WltPkt(hdr=ag.Hdr(group_id=group_id), pkt=pkt_type(brg_mac=test.active_brg.id_int if test.active_brg else 0, seq_id=seq_id, **kwargs))
|
|
280
285
|
return brg_pkt
|
|
281
286
|
|
|
282
|
-
def config_brg_defaults(test, modules=[], ble5=False):
|
|
287
|
+
def config_brg_defaults(test, modules=[], ble5=False, wait=True):
|
|
283
288
|
failed_cfg = False
|
|
284
289
|
modules = test.active_brg.modules if not modules else modules
|
|
285
290
|
for module in modules:
|
|
286
291
|
utPrint(f"Configuring {module.__name__} to defaults. board type[{test.active_brg.board_type}] api version[{test.active_brg.api_version}]", "BLUE")
|
|
287
292
|
cfg_pkt = get_default_brg_pkt(test, module)
|
|
288
293
|
if ble5:
|
|
289
|
-
test, res = brg_configure_ble5(test=test, cfg_pkt=cfg_pkt)
|
|
294
|
+
test, res = brg_configure_ble5(test=test, cfg_pkt=cfg_pkt, wait=wait)
|
|
290
295
|
else:
|
|
291
|
-
test, res = brg_configure(test=test, cfg_pkt=cfg_pkt)
|
|
296
|
+
test, res = brg_configure(test=test, cfg_pkt=cfg_pkt, wait=wait)
|
|
292
297
|
if res == NO_RESPONSE:
|
|
293
298
|
utPrint(f"FAILURE: {module.__name__} not configured to defaults", "RED")
|
|
294
299
|
failed_cfg = True
|
|
@@ -296,9 +301,9 @@ def config_brg_defaults(test, modules=[], ble5=False):
|
|
|
296
301
|
utPrint(f"SUCCESS: {module.__name__} configured to defaults", "GREEN")
|
|
297
302
|
return (test, DONE) if not failed_cfg else (test, NO_RESPONSE)
|
|
298
303
|
|
|
299
|
-
def config_brg1_defaults(test, modules=[], ble5=False):
|
|
304
|
+
def config_brg1_defaults(test, modules=[], ble5=False, wait=True):
|
|
300
305
|
test.active_brg = test.brg1
|
|
301
|
-
test, res = config_brg_defaults(test, modules, ble5)
|
|
306
|
+
test, res = config_brg_defaults(test, modules=modules, ble5=ble5, wait=wait)
|
|
302
307
|
test.active_brg = test.brg0
|
|
303
308
|
return test, res
|
|
304
309
|
|
brg_certificate/cert_utils.py
CHANGED
|
@@ -25,7 +25,7 @@ ORIGINAL_AG_FILE = "wlt_types_ag.py"
|
|
|
25
25
|
TEST_MODULES_MAP = {"calibration": ag.MODULE_CALIBRATION, "datapath": ag.MODULE_DATAPATH, "energy2400": ag.MODULE_ENERGY_2400, "energy_sub1g": ag.MODULE_ENERGY_SUB1G,
|
|
26
26
|
"pwr_mgmt": ag.MODULE_PWR_MGMT, "sensors": ag.MODULE_EXT_SENSORS, "custom": ag.MODULE_CUSTOM}
|
|
27
27
|
|
|
28
|
-
STATIC_RANDOM_ADDR_MASK =
|
|
28
|
+
STATIC_RANDOM_ADDR_MASK = 0xC00000000000
|
|
29
29
|
hex2alias_id_get = lambda id_str: cert_common.int2mac_get(int(id_str, 16) | STATIC_RANDOM_ADDR_MASK)
|
|
30
30
|
|
|
31
31
|
def module2name(module_id):
|
|
@@ -85,6 +85,7 @@ class WltTest:
|
|
|
85
85
|
self.internal_brg_obj = internal_brg_obj
|
|
86
86
|
# Actual brg to cfg - can be brg0 or brg1
|
|
87
87
|
self.active_brg = brg0
|
|
88
|
+
self.ab = self.active_brg # alias name
|
|
88
89
|
self.brg0 = brg0
|
|
89
90
|
self.brg1 = brg1
|
|
90
91
|
self.rc = TEST_PASSED
|
|
@@ -232,6 +233,7 @@ class Bridge:
|
|
|
232
233
|
if module in TEST_MODULES_MAP:
|
|
233
234
|
self.sup_caps += [TEST_MODULES_MAP[module]]
|
|
234
235
|
self.modules += [eval_pkt(ag.MODULES_DICT[TEST_MODULES_MAP[module]] + str(self.api_version))]
|
|
236
|
+
setattr(self, module, eval_pkt(ag.MODULES_DICT[TEST_MODULES_MAP[module]] + str(self.api_version)))
|
|
235
237
|
|
|
236
238
|
def update_modules(self):
|
|
237
239
|
self.modules = []
|
|
@@ -14,8 +14,8 @@ energy2400/pattern_test ENERGY_PATTERN_2_4_NO_ENERGIZING ENERGY_PATTERN_2_4_CHAN
|
|
|
14
14
|
energy2400/output_power_test -12 -8 -4 0 2 3
|
|
15
15
|
energy2400/duty_cycle_test 1 25 50 75
|
|
16
16
|
energy2400/signal_indicator_test internal_brg rssi_threshold brg0_rx_brg1_tx brg0_none_brg1_rx brg0_rxtx_brg1_rxtx brg0_tx_brg1_none
|
|
17
|
-
energy2400/signal_indicator_ble5_10_500k_test internal_brg rssi_threshold
|
|
18
|
-
energy2400/signal_indicator_ble5_10_250k_test internal_brg rssi_threshold
|
|
17
|
+
energy2400/signal_indicator_ble5_10_500k_test internal_brg rssi_threshold brg0_tx_brg1_rx brg0_none_brg1_rx brg0_rxtx_brg1_rxtx brg0_tx_brg1_none
|
|
18
|
+
energy2400/signal_indicator_ble5_10_250k_test internal_brg rssi_threshold brg0_tx_brg1_rx brg0_none_brg1_rx brg0_rxtx_brg1_rxtx brg0_tx_brg1_none
|
|
19
19
|
|
|
20
20
|
# ------------- energy_sub1g -------------
|
|
21
21
|
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
|
|
@@ -14,8 +14,8 @@ energy2400/pattern_test ENERGY_PATTERN_2_4_NO_ENERGIZING ENERGY_PATTERN_2_4_CHAN
|
|
|
14
14
|
energy2400/output_power_test -12 -8 -4 0 2 3
|
|
15
15
|
energy2400/duty_cycle_test 1 25 50 75
|
|
16
16
|
energy2400/signal_indicator_test internal_brg rssi_threshold brg0_rx_brg1_tx brg0_none_brg1_rx brg0_rxtx_brg1_rxtx brg0_tx_brg1_none
|
|
17
|
-
energy2400/signal_indicator_ble5_10_500k_test internal_brg rssi_threshold
|
|
18
|
-
energy2400/signal_indicator_ble5_10_250k_test internal_brg rssi_threshold
|
|
17
|
+
energy2400/signal_indicator_ble5_10_500k_test internal_brg rssi_threshold brg0_tx_brg1_rx brg0_none_brg1_rx brg0_tx_brg1_none
|
|
18
|
+
energy2400/signal_indicator_ble5_10_250k_test internal_brg rssi_threshold brg0_tx_brg1_rx brg0_none_brg1_rx brg0_tx_brg1_none
|
|
19
19
|
|
|
20
20
|
# ------------- energy_sub1g -------------
|
|
21
21
|
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
|
|
@@ -36,8 +36,8 @@ datapath/rx_channel_test RX_CHANNEL_37 RX_CHANNEL_38 RX_CHANNEL_39 RX_CHANNEL_10
|
|
|
36
36
|
datapath/rx_rate_gen2_test mid_values diff_pacer min_value max_value diff_rate
|
|
37
37
|
datapath/rx_rate_gen3_test mid_values diff_pacer min_value max_value diff_rate
|
|
38
38
|
datapath/pacer_interval_tags_count_test 1 10 15 30
|
|
39
|
-
datapath/stress_test rep3 rep2 rep1
|
|
40
|
-
datapath/stress_gen3_test rep3 rep2 rep1
|
|
39
|
+
datapath/stress_test rep3 rep2 rep1
|
|
40
|
+
datapath/stress_gen3_test rep3 rep2 rep1
|
|
41
41
|
datapath/aging_test low_pacer high_pacer
|
|
42
42
|
datapath/num_of_tags_test 5000
|
|
43
43
|
|
|
@@ -8,7 +8,7 @@ import brg_certificate.cert_config as cert_config
|
|
|
8
8
|
def run(test):
|
|
9
9
|
|
|
10
10
|
fields = [BRG_CALIB_INTERVAL]
|
|
11
|
-
calib_module =
|
|
11
|
+
calib_module = test.active_brg.calibration
|
|
12
12
|
|
|
13
13
|
test = cert_common.test_prolog(test)
|
|
14
14
|
if test.rc == TEST_FAILED:
|
|
@@ -20,9 +20,10 @@ def run(test):
|
|
|
20
20
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
21
21
|
test.set_phase_rc(param.name, test.rc)
|
|
22
22
|
test.add_phase_reason(param.name, test.reason)
|
|
23
|
-
if test.rc == TEST_FAILED
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
if test.rc == TEST_FAILED:
|
|
24
|
+
if test.exit_on_param_failure:
|
|
25
|
+
break # break the whole for loop and keep the test as failed
|
|
26
|
+
else:
|
|
27
|
+
test.reset_result() # reset result and continue to next param
|
|
28
|
+
continue
|
|
28
29
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module])
|
|
@@ -8,7 +8,7 @@ import brg_certificate.cert_config as cert_config
|
|
|
8
8
|
def run(test):
|
|
9
9
|
|
|
10
10
|
fields = [BRG_OUTPUT_POWER]
|
|
11
|
-
calib_module =
|
|
11
|
+
calib_module = test.active_brg.calibration
|
|
12
12
|
|
|
13
13
|
test = cert_common.test_prolog(test)
|
|
14
14
|
if test.rc == TEST_FAILED:
|
|
@@ -20,9 +20,10 @@ def run(test):
|
|
|
20
20
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
21
21
|
test.set_phase_rc(param.name, test.rc)
|
|
22
22
|
test.add_phase_reason(param.name, test.reason)
|
|
23
|
-
if test.rc == TEST_FAILED
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
if test.rc == TEST_FAILED:
|
|
24
|
+
if test.exit_on_param_failure:
|
|
25
|
+
break # break the whole for loop and keep the test as failed
|
|
26
|
+
else:
|
|
27
|
+
test.reset_result() # reset result and continue to next param
|
|
28
|
+
continue
|
|
28
29
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module])
|
|
@@ -8,8 +8,8 @@ import brg_certificate.cert_config as cert_config
|
|
|
8
8
|
def run(test):
|
|
9
9
|
|
|
10
10
|
fields = [BRG_PATTERN]
|
|
11
|
-
calib_module =
|
|
12
|
-
datapath_module =
|
|
11
|
+
calib_module = test.active_brg.calibration
|
|
12
|
+
datapath_module = test.active_brg.datapath
|
|
13
13
|
|
|
14
14
|
test = cert_common.test_prolog(test)
|
|
15
15
|
if test.rc == TEST_FAILED:
|
|
@@ -25,6 +25,12 @@ def run(test):
|
|
|
25
25
|
# Configure the BRG, wait=False
|
|
26
26
|
test = cert_config.brg_configure(test, fields=[BRG_PATTERN, BRG_CALIB_INTERVAL],
|
|
27
27
|
values=[param.value, 1], module=calib_module, wait=False)[0]
|
|
28
|
+
if test.rc == TEST_FAILED:
|
|
29
|
+
if test.exit_on_param_failure:
|
|
30
|
+
break # break the whole for loop and keep the test as failed
|
|
31
|
+
else:
|
|
32
|
+
test.reset_result() # reset result and continue to next param
|
|
33
|
+
continue
|
|
28
34
|
cert_common.wait_time_n_print(CLEAR_DATA_PATH_TIMEOUT)
|
|
29
35
|
# MQTT scan
|
|
30
36
|
if test.data == DATA_SIMULATION:
|
|
@@ -51,19 +57,23 @@ def run(test):
|
|
|
51
57
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
52
58
|
test.set_phase_rc(param.name, test.rc)
|
|
53
59
|
test.add_phase_reason(param.name, test.reason)
|
|
54
|
-
if test.rc == TEST_FAILED
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
if test.rc == TEST_FAILED:
|
|
61
|
+
if test.exit_on_param_failure:
|
|
62
|
+
break # break the whole for loop and keep the test as failed
|
|
63
|
+
else:
|
|
64
|
+
test.reset_result() # reset result and continue to next param
|
|
65
|
+
continue
|
|
58
66
|
else:
|
|
59
67
|
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=calib_module)[0]
|
|
60
68
|
generate_log_file(test, param.name)
|
|
61
69
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
62
70
|
test.set_phase_rc(param.name, test.rc)
|
|
63
71
|
test.add_phase_reason(param.name, test.reason)
|
|
64
|
-
if test.rc == TEST_FAILED
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
if test.rc == TEST_FAILED:
|
|
73
|
+
if test.exit_on_param_failure:
|
|
74
|
+
break # break the whole for loop and keep the test as failed
|
|
75
|
+
else:
|
|
76
|
+
test.reset_result() # reset result and continue to next param
|
|
77
|
+
continue
|
|
68
78
|
|
|
69
79
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module, datapath_module])
|
|
@@ -31,7 +31,7 @@ def combination_func(test, datapath_module, pacer_interval, num_of_sim_tags, agi
|
|
|
31
31
|
if test.rc == TEST_FAILED and test.reason != TEST_PASSED:
|
|
32
32
|
for i in range(2):
|
|
33
33
|
if test.rc == TEST_PASSED:
|
|
34
|
-
|
|
34
|
+
break # exist the loop and continue, if succeeded
|
|
35
35
|
test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
|
|
36
36
|
test = test.add_reason("Didn't succeed to configure after two attempts - No pkt was found!")
|
|
37
37
|
return test
|
|
@@ -118,25 +118,27 @@ def high_pacer(test, datapath_module, num_of_sim_tags):
|
|
|
118
118
|
|
|
119
119
|
def run(test):
|
|
120
120
|
# Test prolog
|
|
121
|
-
datapath_module =
|
|
121
|
+
datapath_module = test.active_brg.datapath
|
|
122
122
|
test = cert_common.test_prolog(test)
|
|
123
123
|
if test.rc == TEST_FAILED:
|
|
124
124
|
return cert_common.test_epilog(test)
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
AGING_TEST_MAP = {"low_pacer": low_pacer, "high_pacer": high_pacer}
|
|
127
127
|
num_of_pixels = 500
|
|
128
128
|
|
|
129
129
|
for param in test.params:
|
|
130
130
|
functionality_run_print(param.name)
|
|
131
|
-
test =
|
|
131
|
+
test = AGING_TEST_MAP[param.value](test, datapath_module, num_of_pixels)
|
|
132
132
|
generate_log_file(test, param.name)
|
|
133
133
|
field_functionality_pass_fail_print(test, param.name)
|
|
134
134
|
test.set_phase_rc(param.name, test.rc)
|
|
135
135
|
test.add_phase_reason(param.name, test.reason)
|
|
136
|
-
if test.rc == TEST_FAILED
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
if test.rc == TEST_FAILED:
|
|
137
|
+
if test.exit_on_param_failure:
|
|
138
|
+
break
|
|
139
|
+
else:
|
|
140
|
+
test.reset_result()
|
|
141
|
+
continue
|
|
140
142
|
time.sleep(5)
|
|
141
143
|
|
|
142
|
-
return cert_common.test_epilog(test, revert_brgs=True,
|
|
144
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
@@ -10,7 +10,7 @@ GW_CYCLE_TIME = 0.02 # GW sends BLE packet every 20 nsec
|
|
|
10
10
|
|
|
11
11
|
def run(test):
|
|
12
12
|
|
|
13
|
-
datapath_module =
|
|
13
|
+
datapath_module = test.active_brg.datapath
|
|
14
14
|
print(f"values: {[param.value for param in test.params]}")
|
|
15
15
|
|
|
16
16
|
test = cert_common.test_prolog(test)
|
|
@@ -60,25 +60,23 @@ def run(test):
|
|
|
60
60
|
|
|
61
61
|
# compare the numbers of tags that come from the brg, success in 95% from number of tags (value) or more.
|
|
62
62
|
if num_of_tags < (param.value * 0.95):
|
|
63
|
-
test.
|
|
64
|
-
test.add_reason(f"
|
|
65
|
-
test.add_reason(f"Note - HB was {num_of_tags_HB}")
|
|
63
|
+
test.add_reason(f"Found {num_of_tags} pixels expected: {param.name} pixels!")
|
|
64
|
+
test.add_reason(f"HB: {num_of_tags_HB}, Df: {num_of_tags}")
|
|
66
65
|
|
|
67
66
|
# compare the counter tags in the HB packet
|
|
68
|
-
if num_of_tags_HB < param.value or num_of_tags_HB > (param.value + 100):
|
|
69
|
-
test.
|
|
70
|
-
test.add_reason(f"
|
|
71
|
-
test.add_reason(f"Note - tag counter field = {num_of_tags}")
|
|
72
|
-
|
|
67
|
+
if num_of_tags_HB < 0.95 * param.value or num_of_tags_HB > (param.value + 100):
|
|
68
|
+
test.add_reason(f"Found {num_of_tags_HB} pixels expected: {param.name} pixels!")
|
|
69
|
+
test.add_reason(f"HB: {num_of_tags_HB}, Df: {num_of_tags}")
|
|
73
70
|
# param epilog
|
|
74
71
|
time.sleep(10)
|
|
75
72
|
generate_log_file(test, param.name)
|
|
76
73
|
field_functionality_pass_fail_print(test, "num_of_tags", value=param.name)
|
|
77
74
|
test.set_phase_rc(param.name, test.rc)
|
|
78
75
|
test.add_phase_reason(param.name, test.reason)
|
|
79
|
-
if test.rc == TEST_FAILED
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
if test.rc == TEST_FAILED:
|
|
77
|
+
if test.exit_on_param_failure:
|
|
78
|
+
break
|
|
79
|
+
else:
|
|
80
|
+
test.reset_result()
|
|
83
81
|
|
|
84
82
|
return cert_common.test_epilog(test)
|
|
@@ -8,7 +8,7 @@ import brg_certificate.cert_config as cert_config
|
|
|
8
8
|
def run(test):
|
|
9
9
|
|
|
10
10
|
fields = [BRG_OUTPUT_POWER]
|
|
11
|
-
datapath_module =
|
|
11
|
+
datapath_module = test.active_brg.datapath
|
|
12
12
|
|
|
13
13
|
test = cert_common.test_prolog(test)
|
|
14
14
|
if test.rc == TEST_FAILED:
|
|
@@ -20,9 +20,11 @@ def run(test):
|
|
|
20
20
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
21
21
|
test.set_phase_rc(param.name, test.rc)
|
|
22
22
|
test.add_phase_reason(param.name, test.reason)
|
|
23
|
-
if test.rc == TEST_FAILED
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
if test.rc == TEST_FAILED:
|
|
24
|
+
if test.exit_on_param_failure:
|
|
25
|
+
break # break the whole for loop and keep the test as failed
|
|
26
|
+
else:
|
|
27
|
+
test.reset_result() # reset result and continue to next param
|
|
28
|
+
continue
|
|
27
29
|
|
|
28
30
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
@@ -8,7 +8,7 @@ import brg_certificate.cert_config as cert_config
|
|
|
8
8
|
def run(test):
|
|
9
9
|
|
|
10
10
|
fields = [BRG_PACER_INTERVAL, BRG_RX_CHANNEL, BRG_PKT_FILTER]
|
|
11
|
-
datapath_module =
|
|
11
|
+
datapath_module = test.active_brg.datapath
|
|
12
12
|
|
|
13
13
|
test = cert_common.test_prolog(test)
|
|
14
14
|
if test.rc == TEST_FAILED:
|
|
@@ -17,8 +17,12 @@ def run(test):
|
|
|
17
17
|
for param in test.params:
|
|
18
18
|
test = cert_config.brg_configure_ble5(test, fields=fields, values=[param.value, ag.RX_CHANNEL_10_250K, ag.PKT_FILTER_TEMP_PKT],
|
|
19
19
|
module=datapath_module)[0]
|
|
20
|
-
if test.rc == TEST_FAILED
|
|
21
|
-
|
|
20
|
+
if test.rc == TEST_FAILED:
|
|
21
|
+
if test.exit_on_param_failure:
|
|
22
|
+
break # break the whole for loop and keep the test as failed
|
|
23
|
+
else:
|
|
24
|
+
test.reset_result() # reset result and continue to next param
|
|
25
|
+
continue
|
|
22
26
|
num_of_pixels = 0
|
|
23
27
|
if test.data == DATA_SIMULATION:
|
|
24
28
|
# start generating pkts and send them using data simulator
|
|
@@ -38,9 +42,10 @@ def run(test):
|
|
|
38
42
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
39
43
|
test.set_phase_rc(param.name, test.rc)
|
|
40
44
|
test.add_phase_reason(param.name, test.reason)
|
|
41
|
-
if test.rc == TEST_FAILED
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
if test.rc == TEST_FAILED:
|
|
46
|
+
if test.exit_on_param_failure:
|
|
47
|
+
break # break the whole for loop and keep the test as failed
|
|
48
|
+
else:
|
|
49
|
+
test.reset_result() # reset result and continue to next param
|
|
50
|
+
continue
|
|
46
51
|
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module], ble5=True)
|
brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py
CHANGED
|
@@ -9,7 +9,7 @@ def run(test):
|
|
|
9
9
|
pacer_threshold = PACER_INTERVAL_THRESHOLD_HIGH if test.private_setup else PACER_INTERVAL_THRESHOLD
|
|
10
10
|
|
|
11
11
|
fields = [BRG_PACER_INTERVAL, BRG_TX_REPETITION]
|
|
12
|
-
datapath_module =
|
|
12
|
+
datapath_module = test.active_brg.datapath
|
|
13
13
|
|
|
14
14
|
test = cert_common.test_prolog(test)
|
|
15
15
|
if test.rc == TEST_FAILED:
|
|
@@ -30,9 +30,12 @@ def run(test):
|
|
|
30
30
|
tags_count_per_pacer = {}
|
|
31
31
|
for param in test.params:
|
|
32
32
|
test = cert_config.brg_configure(test, fields=fields, values=[param.value, 1], module=datapath_module)[0]
|
|
33
|
-
if test.rc == TEST_FAILED
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
if test.rc == TEST_FAILED:
|
|
34
|
+
if test.exit_on_param_failure:
|
|
35
|
+
break # break the whole for loop and keep the test as failed
|
|
36
|
+
else:
|
|
37
|
+
test.reset_result() # reset result and continue to next param
|
|
38
|
+
continue
|
|
36
39
|
df = cert_common.data_scan(test, scan_time=120, brg_data=True)
|
|
37
40
|
cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"brg_pacer_tags_count_{param.name}_", dir=test.dir)
|
|
38
41
|
tags_count_per_pacer[param.value] = df[TAG_ID].nunique()
|
|
@@ -52,6 +55,10 @@ def run(test):
|
|
|
52
55
|
print("tags_count_per_pacer: ", tags_count_per_pacer)
|
|
53
56
|
max_count = max([tags_count_per_pacer[pacer] for pacer in tags_count_per_pacer])
|
|
54
57
|
for param in test.params:
|
|
58
|
+
if param.value not in tags_count_per_pacer:
|
|
59
|
+
test.set_phase_rc(param.name, TEST_FAILED)
|
|
60
|
+
test.add_phase_reason(param.name, f"param value {param.value} not found in tags_count_per_pacer")
|
|
61
|
+
continue # Skip this param because the scan wasn't performed
|
|
55
62
|
if test.data == DATA_SIMULATION:
|
|
56
63
|
if tags_count_per_pacer[param.value] < num_of_pixels * 0.99 or tags_count_per_pacer[param.value] > num_of_pixels * 1.01:
|
|
57
64
|
test.set_phase_rc(param.name, TEST_FAILED)
|
|
@@ -8,7 +8,7 @@ import brg_certificate.cert_config as cert_config
|
|
|
8
8
|
def run(test):
|
|
9
9
|
|
|
10
10
|
fields = [BRG_PACER_INTERVAL, BRG_PKT_FILTER, BRG_RX_CHANNEL]
|
|
11
|
-
datapath_module =
|
|
11
|
+
datapath_module = test.active_brg.datapath
|
|
12
12
|
|
|
13
13
|
test = cert_common.test_prolog(test)
|
|
14
14
|
if test.rc == TEST_FAILED:
|
|
@@ -19,10 +19,12 @@ def run(test):
|
|
|
19
19
|
module=datapath_module)[0]
|
|
20
20
|
test.set_phase_rc(param.name, test.rc)
|
|
21
21
|
test.add_phase_reason(param.name, test.reason)
|
|
22
|
-
if test.rc == TEST_FAILED
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
if test.rc == TEST_FAILED:
|
|
23
|
+
if test.exit_on_param_failure:
|
|
24
|
+
break # break the whole for loop and keep the test as failed
|
|
25
|
+
else:
|
|
26
|
+
test.reset_result() # reset result and continue to next param
|
|
27
|
+
continue
|
|
26
28
|
|
|
27
29
|
num_of_pixels = 0
|
|
28
30
|
if test.data == DATA_SIMULATION:
|
|
@@ -42,11 +44,11 @@ def run(test):
|
|
|
42
44
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
43
45
|
test.set_phase_rc(param.name, test.rc)
|
|
44
46
|
test.add_phase_reason(param.name, test.reason)
|
|
45
|
-
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
46
|
-
break
|
|
47
|
-
else:
|
|
48
|
-
test.reset_result()
|
|
49
47
|
if test.rc == TEST_FAILED:
|
|
50
|
-
|
|
48
|
+
if test.exit_on_param_failure:
|
|
49
|
+
break # break the whole for loop and keep the test as failed
|
|
50
|
+
else:
|
|
51
|
+
test.reset_result() # reset result and continue to next param
|
|
52
|
+
continue
|
|
51
53
|
|
|
52
54
|
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
@@ -8,7 +8,7 @@ import brg_certificate.cert_config as cert_config
|
|
|
8
8
|
def run(test):
|
|
9
9
|
|
|
10
10
|
fields = [BRG_PATTERN]
|
|
11
|
-
datapath_module =
|
|
11
|
+
datapath_module = test.active_brg.datapath
|
|
12
12
|
|
|
13
13
|
test = cert_common.test_prolog(test)
|
|
14
14
|
if test.rc == TEST_FAILED:
|
|
@@ -21,9 +21,10 @@ def run(test):
|
|
|
21
21
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
22
22
|
test.set_phase_rc(param.name, test.rc)
|
|
23
23
|
test.add_phase_reason(param.name, test.reason)
|
|
24
|
-
if test.rc == TEST_FAILED
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
if test.rc == TEST_FAILED:
|
|
25
|
+
if test.exit_on_param_failure:
|
|
26
|
+
break # break the whole for loop and keep the test as failed
|
|
27
|
+
else:
|
|
28
|
+
test.reset_result() # reset result and continue to next param
|
|
29
|
+
continue
|
|
29
30
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
@@ -22,11 +22,12 @@ def run(test):
|
|
|
22
22
|
module=datapath_module)[0]
|
|
23
23
|
test.set_phase_rc(param.name, test.rc)
|
|
24
24
|
test.add_phase_reason(param.name, test.reason)
|
|
25
|
-
if test.rc == TEST_FAILED
|
|
26
|
-
test.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
if test.rc == TEST_FAILED:
|
|
26
|
+
if test.exit_on_param_failure:
|
|
27
|
+
break # break the whole for loop and keep the test as failed
|
|
28
|
+
else:
|
|
29
|
+
test.reset_result() # reset result and continue to next param
|
|
30
|
+
continue
|
|
30
31
|
print("waiting 5 seconds for datapath to clear")
|
|
31
32
|
print_update_wait(5)
|
|
32
33
|
num_of_pixels = 0
|
|
@@ -50,9 +51,11 @@ def run(test):
|
|
|
50
51
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
51
52
|
test.set_phase_rc(param.name, test.rc)
|
|
52
53
|
test.add_phase_reason(param.name, test.reason)
|
|
53
|
-
if test.rc == TEST_FAILED
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
if test.rc == TEST_FAILED:
|
|
55
|
+
if test.exit_on_param_failure:
|
|
56
|
+
break # break the whole for loop and keep the test as failed
|
|
57
|
+
else:
|
|
58
|
+
test.reset_result() # reset result and continue to next param
|
|
59
|
+
continue
|
|
57
60
|
|
|
58
61
|
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module], ble5=True)
|
|
@@ -11,7 +11,7 @@ def run(test):
|
|
|
11
11
|
|
|
12
12
|
# We add the field BRG_RX_CHANNEL so internal BRGs will be configured to channel 37 (default is 39)
|
|
13
13
|
fields = [BRG_PKT_FILTER, BRG_RX_CHANNEL, BRG_PACER_INTERVAL]
|
|
14
|
-
datapath_module =
|
|
14
|
+
datapath_module = test.active_brg.datapath
|
|
15
15
|
|
|
16
16
|
test = cert_common.test_prolog(test)
|
|
17
17
|
if test.rc == TEST_FAILED:
|
|
@@ -22,11 +22,12 @@ def run(test):
|
|
|
22
22
|
module=datapath_module)[0]
|
|
23
23
|
test.set_phase_rc(param.name, test.rc)
|
|
24
24
|
test.add_phase_reason(param.name, test.reason)
|
|
25
|
-
if test.rc == TEST_FAILED
|
|
26
|
-
test.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
if test.rc == TEST_FAILED:
|
|
26
|
+
if test.exit_on_param_failure:
|
|
27
|
+
break # break the whole for loop and keep the test as failed
|
|
28
|
+
else:
|
|
29
|
+
test.reset_result() # reset result and continue to next param
|
|
30
|
+
continue
|
|
30
31
|
print("waiting 5 seconds for datapath to clear")
|
|
31
32
|
print_update_wait(5)
|
|
32
33
|
|
|
@@ -51,9 +52,11 @@ def run(test):
|
|
|
51
52
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
52
53
|
test.set_phase_rc(param.name, test.rc)
|
|
53
54
|
test.add_phase_reason(param.name, test.reason)
|
|
54
|
-
if test.rc == TEST_FAILED
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
if test.rc == TEST_FAILED:
|
|
56
|
+
if test.exit_on_param_failure:
|
|
57
|
+
break # break the whole for loop and keep the test as failed
|
|
58
|
+
else:
|
|
59
|
+
test.reset_result() # reset result and continue to next param
|
|
60
|
+
continue
|
|
58
61
|
|
|
59
62
|
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
@@ -11,7 +11,7 @@ def run(test):
|
|
|
11
11
|
|
|
12
12
|
# We add the field BRG_RX_CHANNEL so internal BRGs will be configured to channel 37 (default is 39)
|
|
13
13
|
fields = [BRG_PKT_FILTER, BRG_RX_CHANNEL, BRG_PACER_INTERVAL]
|
|
14
|
-
datapath_module =
|
|
14
|
+
datapath_module = test.active_brg.datapath
|
|
15
15
|
|
|
16
16
|
test = cert_common.test_prolog(test)
|
|
17
17
|
if test.rc == TEST_FAILED:
|
|
@@ -22,11 +22,12 @@ def run(test):
|
|
|
22
22
|
module=datapath_module)[0]
|
|
23
23
|
test.set_phase_rc(param.name, test.rc)
|
|
24
24
|
test.add_phase_reason(param.name, test.reason)
|
|
25
|
-
if test.rc == TEST_FAILED
|
|
26
|
-
test.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
if test.rc == TEST_FAILED:
|
|
26
|
+
if test.exit_on_param_failure:
|
|
27
|
+
break # break the whole for loop and keep the test as failed
|
|
28
|
+
else:
|
|
29
|
+
test.reset_result() # reset result and continue to next param
|
|
30
|
+
continue
|
|
30
31
|
print("waiting 5 seconds for datapath to clear")
|
|
31
32
|
print_update_wait(5)
|
|
32
33
|
|
|
@@ -51,9 +52,10 @@ def run(test):
|
|
|
51
52
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
52
53
|
test.set_phase_rc(param.name, test.rc)
|
|
53
54
|
test.add_phase_reason(param.name, test.reason)
|
|
54
|
-
if test.rc == TEST_FAILED
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
if test.rc == TEST_FAILED:
|
|
56
|
+
if test.exit_on_param_failure:
|
|
57
|
+
break # break the whole for loop and keep the test as failed
|
|
58
|
+
else:
|
|
59
|
+
test.reset_result() # reset result and continue to next param
|
|
60
|
+
continue
|
|
59
61
|
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|