wiliot-certificate 1.5.3a1__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 (99) 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 +980 -147
  11. brg_certificate/ag/wlt_types_ag.py +1318 -240
  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/certificate_bcc_test_list.txt +0 -2
  24. brg_certificate/certificate_test_list.txt +2 -2
  25. brg_certificate/tests/calibration/interval_test/interval_test.json +1 -1
  26. brg_certificate/tests/calibration/interval_test/interval_test.py +4 -4
  27. brg_certificate/tests/calibration/output_power_test/output_power_test.json +1 -1
  28. brg_certificate/tests/calibration/output_power_test/output_power_test.py +4 -4
  29. brg_certificate/tests/calibration/pattern_test/pattern_test.json +1 -1
  30. brg_certificate/tests/calibration/pattern_test/pattern_test.py +14 -8
  31. brg_certificate/tests/datapath/aging_test/aging_test.py +9 -8
  32. brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +7 -12
  33. brg_certificate/tests/datapath/output_power_test/output_power_test.json +1 -1
  34. brg_certificate/tests/datapath/output_power_test/output_power_test.py +4 -4
  35. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
  36. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +10 -6
  37. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +10 -3
  38. brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -9
  39. brg_certificate/tests/datapath/pattern_test/pattern_test.json +1 -1
  40. brg_certificate/tests/datapath/pattern_test/pattern_test.py +4 -5
  41. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
  42. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +10 -9
  43. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
  44. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
  45. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
  46. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
  47. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
  48. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +10 -9
  49. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +1 -1
  50. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +4 -5
  51. brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +38 -36
  52. brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +45 -45
  53. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +2 -3
  54. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +20 -16
  55. brg_certificate/tests/datapath/stress_test/stress_test.json +2 -3
  56. brg_certificate/tests/datapath/stress_test/stress_test.py +19 -16
  57. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +1 -1
  58. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +11 -9
  59. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +1 -1
  60. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +4 -4
  61. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
  62. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +4 -4
  63. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +1 -1
  64. brg_certificate/tests/energy2400/output_power_test/output_power_test.py +4 -4
  65. brg_certificate/tests/energy2400/pattern_test/pattern_test.json +1 -1
  66. brg_certificate/tests/energy2400/pattern_test/pattern_test.py +4 -4
  67. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +6 -4
  68. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
  69. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +4 -4
  70. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
  71. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +4 -4
  72. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +1 -1
  73. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +4 -4
  74. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +1 -1
  75. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +4 -5
  76. brg_certificate/wltPb_pb2.py +4 -4
  77. brg_certificate/wltPb_pb2.pyi +2 -1
  78. gw_certificate/common/serialization_formatter.py +14 -1
  79. gw_certificate/common/wltPb_pb2.py +4 -4
  80. gw_certificate/common/wltPb_pb2.pyi +2 -1
  81. gw_certificate/interface/{4.4.82_app.zip → 4.4.91_app.zip} +0 -0
  82. gw_certificate/interface/{4.4.82_sd_bl_app.zip → 4.4.91_sd_bl_app.zip} +0 -0
  83. gw_certificate/interface/ble_simulator.py +5 -3
  84. gw_certificate/interface/flash_fw.py +90 -0
  85. gw_certificate/interface/uart_if.py +6 -4
  86. gw_certificate/tests/actions.py +1 -1
  87. gw_certificate/tests/downlink.py +2 -2
  88. gw_certificate/tests/generic.py +4 -3
  89. gw_certificate/tests/static/generated_packet_table.py +16 -16
  90. gw_certificate/tests/static/packet_table.csv +10052 -10052
  91. gw_certificate/tests/static/uplink_defines.py +1 -1
  92. gw_certificate/tests/throughput.py +3 -2
  93. gw_certificate/tests/uplink.py +38 -19
  94. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/METADATA +71 -30
  95. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/RECORD +99 -98
  96. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/WHEEL +1 -1
  97. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/entry_points.txt +0 -0
  98. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/licenses/LICENSE +0 -0
  99. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/top_level.txt +0 -0
@@ -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
@@ -123,20 +123,21 @@ def run(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])
@@ -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,
@@ -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,
@@ -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)
@@ -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)
@@ -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,
@@ -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,
@@ -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,
@@ -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])
@@ -9,7 +9,7 @@
9
9
  "Checking for packets violating RSSI threshold",
10
10
  "Test epilog and revert to defaults"],
11
11
  "expectedOutcome": "RSSI Threshold configured successfully and no pixel packets with RSSI weaker than the threshold have been echoed.",
12
- "mandatory": 1,
12
+ "mandatory": 0,
13
13
  "multiBridgeTest": 0,
14
14
  "gwOnlyTest": 0,
15
15
  "internalBridge": 1,
@@ -39,14 +39,15 @@ def run(test):
39
39
  # Configure the BRG with RSSI threshold and check for packets violating the threshold
40
40
  for param in test.params:
41
41
  functionality_run_print(f"test for RSSI threshold of {param.value}")
42
-
43
42
  test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=datapath_module)[0]
44
43
  test.set_phase_rc(param.name, test.rc)
45
44
  test.add_phase_reason(param.name, test.reason)
46
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
47
- break
48
- else:
49
- 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
+ else:
49
+ test.reset_result() # reset result and continue to next param
50
+ continue
50
51
  print("waiting 5 seconds for datapath to clear")
51
52
  print_update_wait(5)
52
53
 
@@ -67,9 +68,9 @@ def run(test):
67
68
  field_functionality_pass_fail_print(test, fields[0], value=param.name)
68
69
  test.set_phase_rc(param.name, test.rc)
69
70
  test.add_phase_reason(param.name, test.reason)
70
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
71
- break
72
- else:
73
- test.reset_result()
71
+ if test.rc == TEST_FAILED:
72
+ if test.exit_on_param_failure:
73
+ break # break the whole for loop and keep the test as failed
74
+ test.reset_result() # reset result and continue to next param
74
75
 
75
76
  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,
@@ -30,16 +30,15 @@ def run(test):
30
30
  test = cert_config.brg_configure_ble5(test, fields=fields, values=[param.value], module=datapath_module)[0]
31
31
  else:
32
32
  test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=datapath_module)[0]
33
-
34
33
  # param epilog
35
34
  ble5_state = not is_primary_channel(param.value)
36
35
  generate_log_file(test, param.name)
37
36
  field_functionality_pass_fail_print(test, fields[0], value=param.name)
38
37
  test.set_phase_rc(param.name, test.rc)
39
38
  test.add_phase_reason(param.name, test.reason)
40
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
41
- break
42
- else:
43
- test.reset_result()
39
+ if test.rc == TEST_FAILED:
40
+ if test.exit_on_param_failure:
41
+ break # break the whole for loop and keep the test as failed
42
+ test.reset_result() # reset result and continue to next param
44
43
 
45
44
  return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module], ble5=ble5_state)
@@ -34,8 +34,8 @@ def scan_and_compare(test, pacer_interval, delay, expected_address_value):
34
34
  pixel_sim_thread.stop()
35
35
  cert_mqtt.dump_pkts(test, log="rx_rate")
36
36
  cert_common.display_data(df, tbc=True, nfpkt=True, rssi=True, dir=test.dir)
37
-
38
- if df.empty:
37
+ # check if the dataframe is empty or not
38
+ if len(df) <= 1:
39
39
  print("Df is empty")
40
40
  test.rc = TEST_FAILED
41
41
  test.add_reason("Df is empty")
@@ -48,11 +48,16 @@ def scan_and_compare(test, pacer_interval, delay, expected_address_value):
48
48
  print(f"Most common tag: {most_common_tag}")
49
49
  df = df[df[TAG_ID] == most_common_tag]
50
50
  df = df[[TAG_ID, TBC, PACKET_TYPE, DATETIME]]
51
+ length = len(df)
52
+ mid_index = int(length // 2)
53
+ if mid_index == 0:
54
+ mid_index = 1
55
+ print(f"Length of df: {length}, mid index: {mid_index}")
51
56
  print(f"df:\n {df}")
52
57
 
53
58
  tag = df.iloc[0][TAG_ID]
54
59
  # iloc [1:] to skip the first value of tbc_values which could be 0 sometimes.
55
- actual_address_value = round(df.iloc[1:][TBC].mean(), 2) # extract the tbc value from df
60
+ actual_address_value = round(df.iloc[mid_index:][TBC].mean(), 2) # extract the tbc value from df
56
61
  print(f"\nactual address value: {actual_address_value}\nexpected address value: {expected_address_value}")
57
62
  THRESHOLD_ADDRESS_VALUE = 5
58
63
  # check if the actual address value is in the range of -+5 of the expected address value
@@ -147,8 +152,9 @@ def diff_rate(test, datapath_module):
147
152
  df = cert_common.data_scan(test, scan_time=scan_time, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
148
153
  pixel_sim_thread.stop()
149
154
  df = df[[TAG_ID, TBC]]
155
+ lenght = len(df)
150
156
 
151
- if df.empty:
157
+ if len(df) <= 1:
152
158
  test.add_reason("Df is empty")
153
159
  test.rc = TEST_FAILED
154
160
  return test
@@ -156,50 +162,46 @@ def diff_rate(test, datapath_module):
156
162
  print(f"Df:\n {df}")
157
163
  # NOTE: all next rows are specific for the values: delay 0.5 and 3, and in relation address values 128 and 235
158
164
  # check if the last tbc value is as we expected for delay 3 sec we need to get 235 according to LUT table
159
- # we define tolerance of +-2 units for address value
165
+ # we define tolerance of +-10 units for address value
166
+
167
+ # Most important check, verify it converges to the correct value
160
168
  if df.iloc[-1][TBC] not in range(232, 237):
161
169
  test.rc = TEST_FAILED
162
170
  test.add_reason(f"TBC value: {df.iloc[-1][TBC]}, expected value [232,236]")
163
171
  print(f"TBC value: {df.iloc[-1][TBC]}, expected value [232,236] according to delay:{second_delay / 1000} sec")
164
- # skip the first packet in case the second one is still from the last delay value
165
- index = 0
166
- if df.iloc[1][TBC] in range(232, 237):
167
- index = 1
168
-
169
- # verify the first tbc value
170
- first_tbc = df.iloc[index][TBC]
171
- if first_tbc not in range(120, 145):
172
- test.rc = TEST_FAILED
173
- test.add_reason(f"TBC value: {first_tbc}, expected value [120,144]")
174
- print(f"TBC value of last packet before the delay change is wrong\n"
175
- f"TBC value: {first_tbc}, expected value [120,144] according to delay:{first_delay / 1000} sec")
176
-
177
- # check the first change of tbc value after delay changing which is verify the calculation of alpha filter
178
- second_tbc = df.iloc[index + 1][TBC]
179
- expected_address_value = 200
180
- # 4 is equal to 0.09 sec error
181
- threshold = 4 # 2 equal to 0.04 sec error
182
- if not expected_address_value - threshold <= second_tbc <= expected_address_value + threshold:
172
+ return test
173
+ # for loop that skip the first row and check if somewhere there is the expected gap 130 to 200
174
+ result = False
175
+ for i in range(0, lenght - 1):
176
+ prev = df.iloc[i][TBC]
177
+ current = df.iloc[i + 1][TBC]
178
+ if prev in range(120, 140) and current in range(190, 210):
179
+ print(f"Found the gap between {prev} and {current}")
180
+ print(f"row {i}: {df.iloc[i][TBC]}")
181
+ print(f"row {i + 1}: {df.iloc[i + 1][TBC]}")
182
+ result = True
183
+ if not result:
183
184
  test.rc = TEST_FAILED
184
- test.add_reason(f"TBC value: {second_tbc}, expected value [196,204]")
185
- print(f"first change of address value is wrong.\n"
186
- f"alpha filter probably is not define well\n"
187
- f"TBC value: {second_tbc}, expected value [196,204]")
185
+ test.add_reason("Didn't find the correct gap according to alpha filter calculation")
188
186
  return test
189
187
 
190
188
 
191
189
  def run(test):
190
+
192
191
  # "Test prolog"
193
192
  datapath_module = test.active_brg.datapath
194
- test = cert_common.test_prolog(test)
195
- if test.rc == TEST_FAILED:
196
- return cert_common.test_epilog(test)
197
193
 
194
+ test = cert_common.test_prolog(test)
198
195
  pacer_interval = 1
199
196
  test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
200
197
  if test.rc == TEST_FAILED:
201
198
  test.add_reason(f"Didn't succeed to config pacer interval {pacer_interval}")
202
- return test
199
+ name = test.phases[0].name
200
+ test.set_phase_rc(name, test.rc)
201
+ test.add_phase_reason(name, test.reason)
202
+
203
+ if test.rc == TEST_FAILED:
204
+ return cert_common.test_epilog(test)
203
205
 
204
206
  RX_RATE_TEST_MAP = {"mid_values": mid_values, "diff_pacer": diff_pacer, "min_value": min_value,
205
207
  "max_value": max_value, "diff_rate": diff_rate}
@@ -210,9 +212,9 @@ def run(test):
210
212
  field_functionality_pass_fail_print(test, param.name)
211
213
  test.set_phase_rc(param.name, test.rc)
212
214
  test.add_phase_reason(param.name, test.reason)
213
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
214
- break
215
- else:
216
- test.reset_result()
215
+ if test.rc == TEST_FAILED:
216
+ if test.exit_on_param_failure:
217
+ break # break the whole for loop and keep the test as failed
218
+ test.reset_result() # reset result and continue to next param
217
219
 
218
220
  return cert_common.test_epilog(test)