wiliot-certificate 1.5.2a1__py3-none-any.whl → 4.4.0__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.
Files changed (120) hide show
  1. brg_certificate/ag/energous_v0_defines.py +105 -114
  2. brg_certificate/ag/energous_v1_defines.py +105 -114
  3. brg_certificate/ag/energous_v2_defines.py +105 -114
  4. brg_certificate/ag/energous_v3_defines.py +105 -114
  5. brg_certificate/ag/energous_v4_defines.py +105 -114
  6. brg_certificate/ag/fanstel_lan_v0_defines.py +105 -114
  7. brg_certificate/ag/fanstel_lte_v0_defines.py +105 -114
  8. brg_certificate/ag/fanstel_wifi_v0_defines.py +105 -114
  9. brg_certificate/ag/minew_lte_v0_defines.py +105 -114
  10. brg_certificate/ag/wlt_types.html +983 -150
  11. brg_certificate/ag/wlt_types_ag.py +1326 -248
  12. brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +69 -0
  13. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +101 -0
  14. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +45 -0
  15. brg_certificate/ag/wlt_types_ag_jsons/calibration.json +75 -0
  16. brg_certificate/ag/wlt_types_ag_jsons/custom.json +99 -0
  17. brg_certificate/ag/wlt_types_ag_jsons/datapath.json +133 -8
  18. brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +99 -0
  19. brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +96 -0
  20. brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +113 -0
  21. brg_certificate/ag/wlt_types_ag_jsons/interface.json +157 -0
  22. brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +205 -0
  23. brg_certificate/cert_common.py +61 -11
  24. brg_certificate/cert_config.py +12 -7
  25. brg_certificate/cert_utils.py +3 -1
  26. brg_certificate/certificate_bcc_test_list.txt +0 -2
  27. brg_certificate/certificate_test_list.txt +4 -4
  28. brg_certificate/tests/calibration/interval_test/interval_test.json +1 -1
  29. brg_certificate/tests/calibration/interval_test/interval_test.py +5 -5
  30. brg_certificate/tests/calibration/output_power_test/output_power_test.json +1 -1
  31. brg_certificate/tests/calibration/output_power_test/output_power_test.py +5 -5
  32. brg_certificate/tests/calibration/pattern_test/pattern_test.json +1 -1
  33. brg_certificate/tests/calibration/pattern_test/pattern_test.py +16 -10
  34. brg_certificate/tests/datapath/aging_test/aging_test.py +10 -9
  35. brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +8 -13
  36. brg_certificate/tests/datapath/output_power_test/output_power_test.json +1 -1
  37. brg_certificate/tests/datapath/output_power_test/output_power_test.py +5 -5
  38. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
  39. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +11 -7
  40. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +11 -4
  41. brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +10 -10
  42. brg_certificate/tests/datapath/pattern_test/pattern_test.json +1 -1
  43. brg_certificate/tests/datapath/pattern_test/pattern_test.py +5 -6
  44. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
  45. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +10 -9
  46. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
  47. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +11 -10
  48. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
  49. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +11 -10
  50. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
  51. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +11 -10
  52. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +1 -1
  53. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +5 -6
  54. brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +39 -37
  55. brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +46 -46
  56. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +2 -3
  57. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +21 -17
  58. brg_certificate/tests/datapath/stress_test/stress_test.json +2 -3
  59. brg_certificate/tests/datapath/stress_test/stress_test.py +20 -17
  60. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +1 -1
  61. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +1 -1
  62. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +12 -10
  63. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +1 -1
  64. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +13 -13
  65. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +1 -1
  66. brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +2 -2
  67. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
  68. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +5 -5
  69. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +1 -1
  70. brg_certificate/tests/energy2400/output_power_test/output_power_test.py +5 -5
  71. brg_certificate/tests/energy2400/pattern_test/pattern_test.json +1 -1
  72. brg_certificate/tests/energy2400/pattern_test/pattern_test.py +5 -5
  73. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +2 -2
  74. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +256 -278
  75. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +2 -2
  76. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +256 -278
  77. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +3 -3
  78. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +30 -91
  79. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
  80. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +5 -5
  81. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
  82. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +5 -5
  83. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +2 -2
  84. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +1 -1
  85. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +5 -5
  86. brg_certificate/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +2 -2
  87. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +1 -1
  88. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +6 -7
  89. brg_certificate/wltPb_pb2.py +4 -4
  90. brg_certificate/wltPb_pb2.pyi +2 -1
  91. gw_certificate/api_if/gw_capabilities.py +37 -1
  92. gw_certificate/common/serialization_formatter.py +93 -0
  93. gw_certificate/common/wltPb_pb2.py +50 -38
  94. gw_certificate/common/wltPb_pb2.pyi +42 -35
  95. gw_certificate/gw_certificate.py +4 -2
  96. gw_certificate/gw_certificate_cli.py +5 -4
  97. gw_certificate/interface/4.4.91_app.zip +0 -0
  98. gw_certificate/interface/{4.4.52_sd_bl_app.zip → 4.4.91_sd_bl_app.zip} +0 -0
  99. gw_certificate/interface/ble_simulator.py +5 -3
  100. gw_certificate/interface/flash_fw.py +90 -0
  101. gw_certificate/interface/mqtt.py +39 -23
  102. gw_certificate/interface/pkt_generator.py +0 -44
  103. gw_certificate/interface/uart_if.py +25 -12
  104. gw_certificate/tests/actions.py +33 -5
  105. gw_certificate/tests/connection.py +3 -1
  106. gw_certificate/tests/downlink.py +2 -2
  107. gw_certificate/tests/generic.py +5 -4
  108. gw_certificate/tests/registration.py +4 -4
  109. gw_certificate/tests/static/generated_packet_table.py +47 -25
  110. gw_certificate/tests/static/packet_table.csv +10067 -10051
  111. gw_certificate/tests/static/uplink_defines.py +2 -1
  112. gw_certificate/tests/throughput.py +3 -2
  113. gw_certificate/tests/uplink.py +171 -32
  114. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/METADATA +71 -30
  115. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/RECORD +119 -117
  116. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/WHEEL +1 -1
  117. gw_certificate/interface/4.4.52_app.zip +0 -0
  118. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/entry_points.txt +0 -0
  119. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/licenses/LICENSE +0 -0
  120. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/top_level.txt +0 -0
@@ -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
- while not pkts_found and wait:
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
 
@@ -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 = 0x0000000000C0
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,6 @@ 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 brg0_rx_brg1_tx 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_rx_brg1_tx brg0_none_brg1_rx brg0_rxtx_brg1_rxtx brg0_tx_brg1_none
19
17
 
20
18
  # ------------- energy_sub1g -------------
21
19
  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 brg0_rx_brg1_tx 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_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 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 rep1_adaptive_pacer pixel_burst
40
- datapath/stress_gen3_test rep3 rep2 rep1 rep1_adaptive_pacer pixel_burst
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
 
@@ -6,7 +6,7 @@
6
6
  "initialCondition": "Bridge configured to defaults",
7
7
  "procedure": ["Test prolog", "Configurations", "Test epilog and revert to defaults"],
8
8
  "expectedOutcome": "All values configured successfully",
9
- "mandatory": 1,
9
+ "mandatory": 0,
10
10
  "multiBridgeTest": 0,
11
11
  "gwOnlyTest": 0,
12
12
  "internalBridge": 1,
@@ -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 = eval_pkt(f'ModuleCalibrationV{test.active_brg.api_version}')
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,9 @@ 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 and test.exit_on_param_failure:
24
- break
25
- else:
26
- test.reset_result()
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
+ test.reset_result() # reset result and continue to next param
27
27
 
28
28
  return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module])
@@ -8,7 +8,7 @@
8
8
  "For each supported value - configure the BRG and verify the value",
9
9
  "Test epilog and revert to defaults"],
10
10
  "expectedOutcome": "All values configured successfully",
11
- "mandatory": 1,
11
+ "mandatory": 0,
12
12
  "multiBridgeTest": 0,
13
13
  "gwOnlyTest": 0,
14
14
  "internalBridge": 1,
@@ -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 = eval_pkt(f'ModuleCalibrationV{test.active_brg.api_version}')
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,9 @@ 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 and test.exit_on_param_failure:
24
- break
25
- else:
26
- test.reset_result()
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
+ test.reset_result() # reset result and continue to next param
27
27
 
28
28
  return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module])
@@ -8,7 +8,7 @@
8
8
  "For each supported value - Configure the BRG and verify packet reception functionality (for specific patterns)",
9
9
  "Test epilog and revert to defaults"],
10
10
  "expectedOutcome": "All values configured successfully and packets received only on included channels. When configuring the brg to CALIBRATION_PATTERN_38_38_39 we configure the GW to rx channel 37 and make sure GW doesn't get any pixels",
11
- "mandatory": 1,
11
+ "mandatory": 0,
12
12
  "multiBridgeTest": 0,
13
13
  "gwOnlyTest": 0,
14
14
  "internalBridge": 1,
@@ -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 = eval_pkt(f'ModuleCalibrationV{test.active_brg.api_version}')
12
- datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
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
33
+ continue # skip the current phase and continue to next param
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,19 @@ 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 and test.exit_on_param_failure:
55
- break
56
- else:
57
- test.reset_result()
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
+ test.reset_result() # reset result and continue to next param
58
64
  else:
59
65
  test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=calib_module)[0]
60
66
  generate_log_file(test, param.name)
61
67
  field_functionality_pass_fail_print(test, fields[0], value=param.name)
62
68
  test.set_phase_rc(param.name, test.rc)
63
69
  test.add_phase_reason(param.name, test.reason)
64
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
65
- break
66
- else:
67
- test.reset_result()
70
+ if test.rc == TEST_FAILED:
71
+ if test.exit_on_param_failure:
72
+ break # break the whole for loop and keep the test as failed
73
+ test.reset_result() # reset result and continue to next param
68
74
 
69
75
  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
- return test
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,26 @@ def high_pacer(test, datapath_module, num_of_sim_tags):
118
118
 
119
119
  def run(test):
120
120
  # Test prolog
121
- datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
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
- STRESS_TEST_MAP = {"low_pacer": low_pacer, "high_pacer": high_pacer}
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 = STRESS_TEST_MAP[param.value](test, datapath_module, num_of_pixels)
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 and test.exit_on_param_failure:
137
- break
138
- else:
139
- test.reset_result()
136
+ if test.rc == TEST_FAILED:
137
+ if test.exit_on_param_failure:
138
+ break # break the whole for loop and keep the test as failed
139
+ test.reset_result() # reset result and continue to next param
140
+
140
141
  time.sleep(5)
141
142
 
142
- return cert_common.test_epilog(test, revert_brgs=True, revert_gws=False, modules=[datapath_module])
143
+ 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 = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
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,20 @@ 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.rc = TEST_FAILED
64
- test.add_reason(f"Found {num_of_tags} pixels instead of {param.name} pixels!")
65
- test.add_reason(f"Note - HB was {num_of_tags_HB}")
63
+ test.add_reason(f"Received {num_of_tags} pixels, expected: {param.name} pixels!")
66
64
 
67
65
  # 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.rc = TEST_FAILED
70
- test.add_reason(f"pixels counter in HB packet is {num_of_tags_HB} instead of {param.name} pixels!")
71
- test.add_reason(f"Note - tag counter field = {num_of_tags}")
72
-
66
+ if num_of_tags_HB < 0.95 * param.value or num_of_tags_HB > (param.value + 100):
67
+ test.add_reason(f"HB counter: {num_of_tags_HB}, expected: {param.name}!")
73
68
  # param epilog
74
69
  time.sleep(10)
75
70
  generate_log_file(test, param.name)
76
71
  field_functionality_pass_fail_print(test, "num_of_tags", value=param.name)
77
72
  test.set_phase_rc(param.name, test.rc)
78
73
  test.add_phase_reason(param.name, test.reason)
79
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
80
- break
81
- else:
82
- test.reset_result()
74
+ if test.rc == TEST_FAILED:
75
+ if test.exit_on_param_failure:
76
+ break # break the whole for loop and keep the test as failed
77
+ test.reset_result() # reset result and continue to next param
83
78
 
84
79
  return cert_common.test_epilog(test)
@@ -8,7 +8,7 @@
8
8
  "For each supported value - configure the BRG and verify the value",
9
9
  "Test epilog and revert to defaults"],
10
10
  "expectedOutcome": "All values configured successfully",
11
- "mandatory": 1,
11
+ "mandatory": 0,
12
12
  "multiBridgeTest": 0,
13
13
  "gwOnlyTest": 0,
14
14
  "internalBridge": 1,
@@ -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 = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
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,9 @@ 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 and test.exit_on_param_failure:
24
- break
25
- else:
26
- test.reset_result()
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
+ test.reset_result() # reset result and continue to next param
27
27
 
28
28
  return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
@@ -8,7 +8,7 @@
8
8
  "For each supported value - Configure the pacer interval, Generate GEN3 pixels packets & scan for packets in the bridge, Compare pacer interval mean per pixel to the configured value",
9
9
  "Test epilog and revert to defaults"],
10
10
  "expectedOutcome": "All values configured successfully and actual pacing found matching to the configured values",
11
- "mandatory": 1,
11
+ "mandatory": 0,
12
12
  "multiBridgeTest": 0,
13
13
  "gwOnlyTest": 0,
14
14
  "internalBridge": 1,
@@ -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 = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
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 and test.exit_on_param_failure:
21
- break
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,9 @@ 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 and test.exit_on_param_failure:
42
- break
43
- else:
44
- test.reset_result()
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
+ test.reset_result() # reset result and continue to next param
45
49
 
46
50
  return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module], ble5=True)
@@ -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 = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
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 and test.exit_on_param_failure:
34
- generate_log_file(test, param.name)
35
- return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
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 = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
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 and test.exit_on_param_failure:
23
- break
24
- else:
25
- test.reset_result()
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,9 @@ 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
- break
48
+ if test.exit_on_param_failure:
49
+ break # break the whole for loop and keep the test as failed
50
+ test.reset_result() # reset result and continue to next param
51
51
 
52
52
  return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
@@ -8,7 +8,7 @@
8
8
  "For each supported value - configure the BRG and verify the value",
9
9
  "Test epilog and revert to defaults"],
10
10
  "expectedOutcome": "All values configured successfully",
11
- "mandatory": 1,
11
+ "mandatory": 0,
12
12
  "multiBridgeTest": 0,
13
13
  "gwOnlyTest": 0,
14
14
  "internalBridge": 1,
@@ -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 = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
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,8 @@ 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 and test.exit_on_param_failure:
25
- break
26
- else:
27
- test.reset_result()
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
+ test.reset_result() # reset result and continue to next param
29
28
  return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
@@ -11,7 +11,7 @@
11
11
  "Repeat for all given packet filter values",
12
12
  "Test epilog and revert to defaults"],
13
13
  "expectedOutcome": "All values configured successfully and actual pacing found matching to the configured values",
14
- "mandatory": 1,
14
+ "mandatory": 0,
15
15
  "multiBridgeTest": 0,
16
16
  "gwOnlyTest": 0,
17
17
  "internalBridge": 1,
@@ -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 and test.exit_on_param_failure:
26
- test.add_reason(f"Failed to configure BRG with {param.name} filter")
27
- break
28
- else:
29
- test.reset_result()
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,9 @@ 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 and test.exit_on_param_failure:
54
- break
55
- else:
56
- test.reset_result()
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
+ test.reset_result() # reset result and continue to next param
57
58
 
58
59
  return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module], ble5=True)
@@ -11,7 +11,7 @@
11
11
  "Repeat for all given packet filter values",
12
12
  "Test epilog and revert to defaults"],
13
13
  "expectedOutcome": "All values configured successfully and actual pacing found matching to the configured values",
14
- "mandatory": 1,
14
+ "mandatory": 0,
15
15
  "multiBridgeTest": 0,
16
16
  "gwOnlyTest": 0,
17
17
  "internalBridge": 1,
@@ -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 = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
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 and test.exit_on_param_failure:
26
- test.add_reason(f"Failed to configure BRG with {param.name} filter")
27
- break
28
- else:
29
- test.reset_result()
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,9 @@ 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 and test.exit_on_param_failure:
55
- break
56
- else:
57
- test.reset_result()
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
+ test.reset_result() # reset result and continue to next param
58
59
 
59
60
  return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
@@ -11,7 +11,7 @@
11
11
  "Repeat for all given packet filter values",
12
12
  "Test epilog and revert to defaults"],
13
13
  "expectedOutcome": "All values configured successfully and actual pacing found matching to the configured values",
14
- "mandatory": 1,
14
+ "mandatory": 0,
15
15
  "multiBridgeTest": 0,
16
16
  "gwOnlyTest": 0,
17
17
  "internalBridge": 1,