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.
- brg_certificate/ag/energous_v0_defines.py +105 -114
- brg_certificate/ag/energous_v1_defines.py +105 -114
- brg_certificate/ag/energous_v2_defines.py +105 -114
- brg_certificate/ag/energous_v3_defines.py +105 -114
- brg_certificate/ag/energous_v4_defines.py +105 -114
- brg_certificate/ag/fanstel_lan_v0_defines.py +105 -114
- brg_certificate/ag/fanstel_lte_v0_defines.py +105 -114
- brg_certificate/ag/fanstel_wifi_v0_defines.py +105 -114
- brg_certificate/ag/minew_lte_v0_defines.py +105 -114
- brg_certificate/ag/wlt_types.html +980 -147
- brg_certificate/ag/wlt_types_ag.py +1318 -240
- brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +69 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +101 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +45 -0
- brg_certificate/ag/wlt_types_ag_jsons/calibration.json +75 -0
- brg_certificate/ag/wlt_types_ag_jsons/custom.json +99 -0
- brg_certificate/ag/wlt_types_ag_jsons/datapath.json +133 -8
- brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +99 -0
- brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +96 -0
- brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +113 -0
- brg_certificate/ag/wlt_types_ag_jsons/interface.json +157 -0
- brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +205 -0
- brg_certificate/certificate_bcc_test_list.txt +0 -2
- brg_certificate/certificate_test_list.txt +2 -2
- brg_certificate/tests/calibration/interval_test/interval_test.json +1 -1
- brg_certificate/tests/calibration/interval_test/interval_test.py +4 -4
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +1 -1
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +4 -4
- brg_certificate/tests/calibration/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +14 -8
- brg_certificate/tests/datapath/aging_test/aging_test.py +9 -8
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +7 -12
- brg_certificate/tests/datapath/output_power_test/output_power_test.json +1 -1
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +4 -4
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +10 -6
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +10 -3
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -9
- brg_certificate/tests/datapath/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +4 -5
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +10 -9
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +10 -9
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +1 -1
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +4 -5
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +38 -36
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +45 -45
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +2 -3
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +20 -16
- brg_certificate/tests/datapath/stress_test/stress_test.json +2 -3
- brg_certificate/tests/datapath/stress_test/stress_test.py +19 -16
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +1 -1
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +11 -9
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +1 -1
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +4 -4
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +4 -4
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +1 -1
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +4 -4
- brg_certificate/tests/energy2400/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +4 -4
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +6 -4
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +4 -4
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +4 -4
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +1 -1
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +4 -4
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +1 -1
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +4 -5
- brg_certificate/wltPb_pb2.py +4 -4
- brg_certificate/wltPb_pb2.pyi +2 -1
- gw_certificate/common/serialization_formatter.py +14 -1
- gw_certificate/common/wltPb_pb2.py +4 -4
- gw_certificate/common/wltPb_pb2.pyi +2 -1
- gw_certificate/interface/{4.4.82_app.zip → 4.4.91_app.zip} +0 -0
- gw_certificate/interface/{4.4.82_sd_bl_app.zip → 4.4.91_sd_bl_app.zip} +0 -0
- gw_certificate/interface/ble_simulator.py +5 -3
- gw_certificate/interface/flash_fw.py +90 -0
- gw_certificate/interface/uart_if.py +6 -4
- gw_certificate/tests/actions.py +1 -1
- gw_certificate/tests/downlink.py +2 -2
- gw_certificate/tests/generic.py +4 -3
- gw_certificate/tests/static/generated_packet_table.py +16 -16
- gw_certificate/tests/static/packet_table.csv +10052 -10052
- gw_certificate/tests/static/uplink_defines.py +1 -1
- gw_certificate/tests/throughput.py +3 -2
- gw_certificate/tests/uplink.py +38 -19
- {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/METADATA +71 -30
- {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/RECORD +99 -98
- {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/WHEEL +1 -1
- {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/licenses/LICENSE +0 -0
- {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/top_level.txt +0 -0
|
@@ -11,7 +11,7 @@ import time
|
|
|
11
11
|
def cal_scan_time(test, delay, pacer_interval):
|
|
12
12
|
# Calculate the scan time to ensure at least 5 packets are captured in data scan
|
|
13
13
|
# define the num of packet that you want to get
|
|
14
|
-
num_of_sending_pkt =
|
|
14
|
+
num_of_sending_pkt = 2 # actually it will be 3 because the first one always send
|
|
15
15
|
delay = delay / 1000
|
|
16
16
|
if delay < pacer_interval:
|
|
17
17
|
scan_time = (pacer_interval * num_of_sending_pkt) + 10
|
|
@@ -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
|
|
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[
|
|
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
|
|
@@ -128,29 +133,28 @@ def max_value(test, datapath_module):
|
|
|
128
133
|
def diff_rate(test, datapath_module):
|
|
129
134
|
# diff rate - a filter: Generate packets with delay 1 and change to 5, according the delay change test the tolerance address value
|
|
130
135
|
pacer_interval = 1
|
|
131
|
-
|
|
132
|
-
first_delay =
|
|
133
|
-
first_duration =
|
|
134
|
-
second_delay =
|
|
135
|
-
|
|
136
|
+
delay_duration = [[500, 5], [3000, 3]]
|
|
137
|
+
first_delay = delay_duration[0][0]
|
|
138
|
+
first_duration = delay_duration[0][1]
|
|
139
|
+
second_delay = delay_duration[1][0]
|
|
136
140
|
test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
|
|
137
141
|
if test.rc == TEST_FAILED:
|
|
138
142
|
test.add_reason(f"Didn't succeed to config pacer interval {pacer_interval}")
|
|
139
143
|
return test
|
|
140
|
-
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=1, duplicates=
|
|
144
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=1, duplicates=2,
|
|
141
145
|
delay=first_delay, pkt_types=[0], pixels_type=GEN3)
|
|
142
146
|
pixel_sim_thread.start()
|
|
143
147
|
time_sleep = first_duration - ((first_delay / 1000) / 2)
|
|
144
148
|
print(f"sleep for {time_sleep} sec\n")
|
|
145
149
|
time.sleep(time_sleep)
|
|
146
150
|
pixel_sim_thread.delay = second_delay
|
|
147
|
-
|
|
148
|
-
scan_time = sum(delay.values()) + 20
|
|
151
|
+
scan_time = sum(duration for _, duration in delay_duration) + 20
|
|
149
152
|
df = cert_common.data_scan(test, scan_time=scan_time, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
150
153
|
pixel_sim_thread.stop()
|
|
151
154
|
df = df[[TAG_ID, TBC]]
|
|
155
|
+
lenght = len(df)
|
|
152
156
|
|
|
153
|
-
if df
|
|
157
|
+
if len(df) <= 1:
|
|
154
158
|
test.add_reason("Df is empty")
|
|
155
159
|
test.rc = TEST_FAILED
|
|
156
160
|
return test
|
|
@@ -158,50 +162,46 @@ def diff_rate(test, datapath_module):
|
|
|
158
162
|
print(f"Df:\n {df}")
|
|
159
163
|
# NOTE: all next rows are specific for the values: delay 0.5 and 3, and in relation address values 128 and 235
|
|
160
164
|
# check if the last tbc value is as we expected for delay 3 sec we need to get 235 according to LUT table
|
|
161
|
-
# we define tolerance of +-
|
|
165
|
+
# we define tolerance of +-10 units for address value
|
|
166
|
+
|
|
167
|
+
# Most important check, verify it converges to the correct value
|
|
162
168
|
if df.iloc[-1][TBC] not in range(232, 237):
|
|
163
169
|
test.rc = TEST_FAILED
|
|
164
170
|
test.add_reason(f"TBC value: {df.iloc[-1][TBC]}, expected value [232,236]")
|
|
165
171
|
print(f"TBC value: {df.iloc[-1][TBC]}, expected value [232,236] according to delay:{second_delay / 1000} sec")
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
# check the first change of tbc value after delay changing which is verify the calculation of alpha filter
|
|
180
|
-
second_tbc = df.iloc[index + 1][TBC]
|
|
181
|
-
expected_address_value = 200
|
|
182
|
-
# 4 is equal to 0.09 sec error
|
|
183
|
-
threshold = 4 # 2 equal to 0.04 sec error
|
|
184
|
-
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:
|
|
185
184
|
test.rc = TEST_FAILED
|
|
186
|
-
test.add_reason(
|
|
187
|
-
print(f"first change of address value is wrong.\n"
|
|
188
|
-
f"alpha filter probably is not define well\n"
|
|
189
|
-
f"TBC value: {second_tbc}, expected value [196,204]")
|
|
185
|
+
test.add_reason("Didn't find the correct gap according to alpha filter calculation")
|
|
190
186
|
return test
|
|
191
187
|
|
|
192
188
|
|
|
193
189
|
def run(test):
|
|
190
|
+
|
|
194
191
|
# "Test prolog"
|
|
195
192
|
datapath_module = test.active_brg.datapath
|
|
196
|
-
test = cert_common.test_prolog(test)
|
|
197
|
-
if test.rc == TEST_FAILED:
|
|
198
|
-
return cert_common.test_epilog(test)
|
|
199
193
|
|
|
194
|
+
test = cert_common.test_prolog(test)
|
|
200
195
|
pacer_interval = 1
|
|
201
196
|
test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
|
|
202
197
|
if test.rc == TEST_FAILED:
|
|
203
198
|
test.add_reason(f"Didn't succeed to config pacer interval {pacer_interval}")
|
|
204
|
-
|
|
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)
|
|
205
205
|
|
|
206
206
|
RX_RATE_TEST_MAP = {"mid_values": mid_values, "diff_pacer": diff_pacer, "min_value": min_value,
|
|
207
207
|
"max_value": max_value, "diff_rate": diff_rate}
|
|
@@ -212,9 +212,9 @@ def run(test):
|
|
|
212
212
|
field_functionality_pass_fail_print(test, param.name)
|
|
213
213
|
test.set_phase_rc(param.name, test.rc)
|
|
214
214
|
test.add_phase_reason(param.name, test.reason)
|
|
215
|
-
if test.rc == TEST_FAILED
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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
|
|
219
219
|
|
|
220
220
|
return cert_common.test_epilog(test)
|
|
@@ -11,12 +11,11 @@
|
|
|
11
11
|
"rep 3 - config pacer interval 22, then check repetition value = 3, pacer increment = 0, num of tags = all tags",
|
|
12
12
|
"rep 2 - config pacer interval 12, then check repetition value = 2, pacer increment = 0, num of tags = all tags",
|
|
13
13
|
"rep 1 - config pacer interval 7, then check repetition value = 1, pacer increment = 0, num of tags = all tags",
|
|
14
|
-
"rep 1 adaptive pacer - config pacer interval 1, then check repetition value = 1, pacer increment = 3 , num of tags = all tags",
|
|
15
14
|
"Test epilog"],
|
|
16
15
|
"expectedOutcome": "all metrics values will be as expected then the bridge is working correctly and the algorithms are working correctly",
|
|
17
|
-
"mandatory":
|
|
16
|
+
"mandatory": 0,
|
|
18
17
|
"multiBridgeTest": 0,
|
|
19
18
|
"gwOnlyTest": 0,
|
|
20
19
|
"internalBridge": 0,
|
|
21
|
-
"allSupportedValues": ["rep3", "rep2", "rep1"
|
|
20
|
+
"allSupportedValues": ["rep3", "rep2", "rep1"]
|
|
22
21
|
}
|
|
@@ -11,8 +11,13 @@ import time
|
|
|
11
11
|
|
|
12
12
|
def metric_checking_HB(test, check, mgmt_type_list, tx_queue_expected, pacer_increment_expected):
|
|
13
13
|
if not mgmt_type_list:
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
if check:
|
|
15
|
+
test.add_reason("\nDidn't find HB pkt, therefore skip all checks\n")
|
|
16
|
+
print("Didn't find HB pkt, therefore will not check tx_queue and pacer increment")
|
|
17
|
+
else:
|
|
18
|
+
test.rc = TEST_PASSED # skip the rc result if we didn't find HB pkt
|
|
19
|
+
print("Didn't find HB pkt, therefore will not check tx_queue and pacer increment")
|
|
20
|
+
|
|
16
21
|
else:
|
|
17
22
|
# check tx queue
|
|
18
23
|
watermarks = [pkt.tx_queue_watermark for pkt in mgmt_type_list]
|
|
@@ -30,7 +35,7 @@ def metric_checking_HB(test, check, mgmt_type_list, tx_queue_expected, pacer_inc
|
|
|
30
35
|
print(f"\npacer_increment value is wrong\nexpected: {pacer_increment_expected}\ngot: {average_pacer_increment_HB}")
|
|
31
36
|
if check:
|
|
32
37
|
test.rc = TEST_FAILED
|
|
33
|
-
test.add_reason(f"pacer_increment:{average_pacer_increment_HB}")
|
|
38
|
+
test.add_reason(f"pacer_increment: {average_pacer_increment_HB} expected: {pacer_increment_expected}")
|
|
34
39
|
else:
|
|
35
40
|
print(f"\naverage pacer_increment from HB: {average_pacer_increment_HB}\n")
|
|
36
41
|
if check:
|
|
@@ -96,7 +101,7 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
|
|
|
96
101
|
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
97
102
|
return test
|
|
98
103
|
else:
|
|
99
|
-
# in case it failed because the repetition value.
|
|
104
|
+
# in case it failed because the repetition value. the reason has been added in the metric_checking_df function
|
|
100
105
|
return test
|
|
101
106
|
|
|
102
107
|
time.sleep(30)
|
|
@@ -107,8 +112,8 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
|
|
|
107
112
|
hbs = [p[MGMT_PKT].pkt for p in hbs]
|
|
108
113
|
print("result of first df\n")
|
|
109
114
|
check = False
|
|
110
|
-
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
111
115
|
test = metric_checking_df(test, check, pacer_interval, df, repetition_value_expected, brg_latency_expected, num_of_sim_tags)
|
|
116
|
+
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
112
117
|
time.sleep(30)
|
|
113
118
|
# second df
|
|
114
119
|
df = cert_common.data_scan(test, scan_time=60, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
@@ -117,8 +122,10 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
|
|
|
117
122
|
hbs = [p[MGMT_PKT].pkt for p in hbs]
|
|
118
123
|
print("result of second df\n")
|
|
119
124
|
check = True
|
|
120
|
-
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
121
125
|
test = metric_checking_df(test, check, pacer_interval, df, repetition_value_expected, brg_latency_expected, num_of_sim_tags)
|
|
126
|
+
if param.name != "rep1":
|
|
127
|
+
check = False
|
|
128
|
+
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
122
129
|
return test
|
|
123
130
|
|
|
124
131
|
|
|
@@ -147,7 +154,7 @@ def rep1(test, param, datapath_module, num_of_sim_tags):
|
|
|
147
154
|
pacer_interval = 7
|
|
148
155
|
test = combination_func(test, param, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags,
|
|
149
156
|
repetition_value_expected=[1, 2], tx_queue_expected=[20, 40],
|
|
150
|
-
pacer_increment_expected=[0,
|
|
157
|
+
pacer_increment_expected=[0, 25], brg_latency_expected=[200, 300])
|
|
151
158
|
time.sleep(5)
|
|
152
159
|
return test
|
|
153
160
|
|
|
@@ -172,10 +179,7 @@ def run(test):
|
|
|
172
179
|
# config GW deduplication pkts = 0
|
|
173
180
|
print("Configuring GW with !deduplication_pkts 0")
|
|
174
181
|
cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 0")
|
|
175
|
-
|
|
176
|
-
return cert_common.test_epilog(test, revert_gws=True)
|
|
177
|
-
|
|
178
|
-
STRESS_TEST_MAP = {"rep3": rep3, "rep2": rep2, "rep1": rep1, "rep1_adaptive_pacer": rep1_adaptive_pacer}
|
|
182
|
+
STRESS_TEST_MAP = {"rep3": rep3, "rep2": rep2, "rep1": rep1}
|
|
179
183
|
num_of_pixels = 300
|
|
180
184
|
pixel_sim_thread = cert_data_sim.DataSimThread(test=test,
|
|
181
185
|
num_of_pixels=num_of_pixels,
|
|
@@ -192,11 +196,11 @@ def run(test):
|
|
|
192
196
|
field_functionality_pass_fail_print(test, param.name)
|
|
193
197
|
test.set_phase_rc(param.name, test.rc)
|
|
194
198
|
test.add_phase_reason(param.name, test.reason)
|
|
195
|
-
if test.rc == TEST_FAILED
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
if test.rc == TEST_FAILED:
|
|
200
|
+
if test.exit_on_param_failure:
|
|
201
|
+
break # break the whole for loop and keep the test as failed
|
|
202
|
+
test.reset_result() # reset result and continue to next param
|
|
203
|
+
|
|
200
204
|
pixel_sim_thread.stop()
|
|
201
205
|
# Re-enable unified packets deduplication
|
|
202
206
|
cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 1")
|
|
@@ -11,12 +11,11 @@
|
|
|
11
11
|
"rep 3 - config pacer interval 22, then check repetition value = 3, pacer increment = 0, num of tags = all tags",
|
|
12
12
|
"rep 2 - config pacer interval 12, then check repetition value = 2, pacer increment = 0, num of tags = all tags",
|
|
13
13
|
"rep 1 - config pacer interval 7, then check repetition value = 1, pacer increment = 0, num of tags = all tags",
|
|
14
|
-
"rep 1 adaptive pacer - config pacer interval 1, then check repetition value = 1, pacer increment = 3 , num of tags = all tags",
|
|
15
14
|
"Test epilog"],
|
|
16
15
|
"expectedOutcome": "all metrics values will be as expected then the bridge is working correctly and the algorithms are working correctly",
|
|
17
|
-
"mandatory":
|
|
16
|
+
"mandatory": 0,
|
|
18
17
|
"multiBridgeTest": 0,
|
|
19
18
|
"gwOnlyTest": 0,
|
|
20
19
|
"internalBridge": 0,
|
|
21
|
-
"allSupportedValues": ["rep3", "rep2", "rep1"
|
|
20
|
+
"allSupportedValues": ["rep3", "rep2", "rep1"]
|
|
22
21
|
}
|
|
@@ -11,8 +11,12 @@ import time
|
|
|
11
11
|
|
|
12
12
|
def metric_checking_HB(test, check, mgmt_type_list, tx_queue_expected, pacer_increment_expected):
|
|
13
13
|
if not mgmt_type_list:
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
if check:
|
|
15
|
+
test.add_reason("\nDidn't find HB pkt, therefore skip all checks\n")
|
|
16
|
+
print("Didn't find HB pkt, therefore will not check tx_queue and pacer increment")
|
|
17
|
+
else:
|
|
18
|
+
test.rc = TEST_PASSED # skip the rc result if we didn't find HB pkt
|
|
19
|
+
print("Didn't find HB pkt, therefore will not check tx_queue and pacer increment")
|
|
16
20
|
else:
|
|
17
21
|
# check tx queue
|
|
18
22
|
watermarks = [pkt.tx_queue_watermark for pkt in mgmt_type_list]
|
|
@@ -30,7 +34,7 @@ def metric_checking_HB(test, check, mgmt_type_list, tx_queue_expected, pacer_inc
|
|
|
30
34
|
print(f"\npacer_increment value is wrong\nexpected: {pacer_increment_expected}\ngot: {average_pacer_increment_HB}")
|
|
31
35
|
if check:
|
|
32
36
|
test.rc = TEST_FAILED
|
|
33
|
-
test.add_reason(f"pacer_increment:{average_pacer_increment_HB}")
|
|
37
|
+
test.add_reason(f"pacer_increment: {average_pacer_increment_HB} expected: {pacer_increment_expected}")
|
|
34
38
|
else:
|
|
35
39
|
print(f"\naverage pacer_increment from HB: {average_pacer_increment_HB}\n")
|
|
36
40
|
if check:
|
|
@@ -96,7 +100,7 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
|
|
|
96
100
|
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
97
101
|
return test
|
|
98
102
|
else:
|
|
99
|
-
# in case it failed because the repetition value.
|
|
103
|
+
# in case it failed because the repetition value. the reason has been added in the metric_checking_df function
|
|
100
104
|
return test
|
|
101
105
|
|
|
102
106
|
time.sleep(30)
|
|
@@ -107,8 +111,8 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
|
|
|
107
111
|
hbs = [p[MGMT_PKT].pkt for p in hbs]
|
|
108
112
|
print("result of first df\n")
|
|
109
113
|
check = False
|
|
110
|
-
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
111
114
|
test = metric_checking_df(test, check, pacer_interval, df, repetition_value_expected, brg_latency_expected, num_of_sim_tags)
|
|
115
|
+
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
112
116
|
time.sleep(30)
|
|
113
117
|
# second df
|
|
114
118
|
df = cert_common.data_scan(test, scan_time=60, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
@@ -117,8 +121,10 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
|
|
|
117
121
|
hbs = [p[MGMT_PKT].pkt for p in hbs]
|
|
118
122
|
print("result of second df\n")
|
|
119
123
|
check = True
|
|
120
|
-
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
121
124
|
test = metric_checking_df(test, check, pacer_interval, df, repetition_value_expected, brg_latency_expected, num_of_sim_tags)
|
|
125
|
+
if param.name != "rep1":
|
|
126
|
+
check = False
|
|
127
|
+
test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
|
|
122
128
|
return test
|
|
123
129
|
|
|
124
130
|
|
|
@@ -147,7 +153,7 @@ def rep1(test, param, datapath_module, num_of_sim_tags):
|
|
|
147
153
|
pacer_interval = 7
|
|
148
154
|
test = combination_func(test, param, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags,
|
|
149
155
|
repetition_value_expected=[1, 2], tx_queue_expected=[20, 40],
|
|
150
|
-
pacer_increment_expected=[0,
|
|
156
|
+
pacer_increment_expected=[0, 25], brg_latency_expected=[200, 300])
|
|
151
157
|
time.sleep(5)
|
|
152
158
|
return test
|
|
153
159
|
|
|
@@ -172,10 +178,7 @@ def run(test):
|
|
|
172
178
|
# config GW deduplication pkts = 0
|
|
173
179
|
print("Configuring GW with !deduplication_pkts 0")
|
|
174
180
|
cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 0")
|
|
175
|
-
|
|
176
|
-
return cert_common.test_epilog(test, revert_gws=True)
|
|
177
|
-
|
|
178
|
-
STRESS_TEST_MAP = {"rep3": rep3, "rep2": rep2, "rep1": rep1, "rep1_adaptive_pacer": rep1_adaptive_pacer}
|
|
181
|
+
STRESS_TEST_MAP = {"rep3": rep3, "rep2": rep2, "rep1": rep1}
|
|
179
182
|
num_of_pixels = 300
|
|
180
183
|
pixel_sim_thread = cert_data_sim.DataSimThread(test=test,
|
|
181
184
|
num_of_pixels=num_of_pixels,
|
|
@@ -192,11 +195,11 @@ def run(test):
|
|
|
192
195
|
field_functionality_pass_fail_print(test, param.name)
|
|
193
196
|
test.set_phase_rc(param.name, test.rc)
|
|
194
197
|
test.add_phase_reason(param.name, test.reason)
|
|
195
|
-
if test.rc == TEST_FAILED
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
if test.rc == TEST_FAILED:
|
|
199
|
+
if test.exit_on_param_failure:
|
|
200
|
+
break # break the whole for loop and keep the test as failed
|
|
201
|
+
test.reset_result() # reset result and continue to next param
|
|
202
|
+
|
|
200
203
|
pixel_sim_thread.stop()
|
|
201
204
|
# Re-enable unified packets deduplication
|
|
202
205
|
cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 1")
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"For each supported value - Configure TX repetitions, Generate pixels packets & scan for packets in the bridge, Compare repetitions mean per packet to the configured value",
|
|
10
10
|
"Test epilog and revert to defaults"],
|
|
11
11
|
"expectedOutcome": "All values configured successfully and actual repetitions found matching to the configured values",
|
|
12
|
-
"mandatory":
|
|
12
|
+
"mandatory": 0,
|
|
13
13
|
"multiBridgeTest": 0,
|
|
14
14
|
"gwOnlyTest": 0,
|
|
15
15
|
"internalBridge": 0,
|
|
@@ -58,24 +58,26 @@ def run(test):
|
|
|
58
58
|
|
|
59
59
|
print("Configuring GW with !deduplication_pkts 0")
|
|
60
60
|
cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 0")
|
|
61
|
-
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
62
|
-
return cert_common.test_epilog(test, revert_gws=True)
|
|
63
61
|
|
|
64
62
|
for param in test.params:
|
|
65
63
|
test = cert_config.brg_configure(test, fields=fields,
|
|
66
64
|
values=[param.value, ag.PKT_FILTER_RANDOM_FIRST_ARRIVING_PKT, ag.RX_CHANNEL_37],
|
|
67
65
|
module=datapath_module)[0]
|
|
68
|
-
if test.rc == TEST_FAILED
|
|
69
|
-
|
|
66
|
+
if test.rc == TEST_FAILED:
|
|
67
|
+
if test.exit_on_param_failure:
|
|
68
|
+
break # break the whole for loop and keep the test as failed
|
|
69
|
+
else:
|
|
70
|
+
test.reset_result() # reset result and continue to next param
|
|
71
|
+
continue
|
|
70
72
|
tx_repetitions_analysis(test, param.name)
|
|
71
73
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
72
74
|
test.set_phase_rc(param.name, test.rc)
|
|
73
75
|
test.add_phase_reason(param.name, test.reason)
|
|
74
|
-
if test.rc == TEST_FAILED
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
if test.rc == TEST_FAILED:
|
|
77
|
+
if test.exit_on_param_failure:
|
|
78
|
+
break # break the whole for loop and keep the test as failed
|
|
79
|
+
test.reset_result() # reset result and continue to next param
|
|
78
80
|
|
|
79
81
|
# Re-enable unified packets deduplication
|
|
80
82
|
cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 1")
|
|
81
|
-
return cert_common.test_epilog(test, revert_brgs=True,
|
|
83
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"initialCondition": "Bridge configured to defaults",
|
|
7
7
|
"procedure": ["Test prolog", "Run all actions and test bridge's response accordingly", "Test epilog"],
|
|
8
8
|
"expectedOutcome": "Bridge responded as expected to all sent actions",
|
|
9
|
-
"mandatory":
|
|
9
|
+
"mandatory": 0,
|
|
10
10
|
"multiBridgeTest": 0,
|
|
11
11
|
"gwOnlyTest": 0,
|
|
12
12
|
"internalBridge": 1,
|
|
@@ -388,9 +388,9 @@ def run(test):
|
|
|
388
388
|
field_functionality_pass_fail_print(test, param.name)
|
|
389
389
|
test.set_phase_rc(param.name, test.rc)
|
|
390
390
|
test.add_phase_reason(param.name, test.reason)
|
|
391
|
-
if test.rc == TEST_FAILED
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
391
|
+
if test.rc == TEST_FAILED:
|
|
392
|
+
if test.exit_on_param_failure:
|
|
393
|
+
break # break the whole for loop and keep the test as failed
|
|
394
|
+
test.reset_result() # reset result and continue to next param
|
|
395
395
|
|
|
396
396
|
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":
|
|
11
|
+
"mandatory": 0,
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"internalBridge": 1,
|
|
@@ -19,9 +19,9 @@ def run(test):
|
|
|
19
19
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
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
|
+
test.reset_result() # reset result and continue to next param
|
|
26
26
|
|
|
27
27
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_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":
|
|
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
|
|
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
|
+
test.reset_result() # reset result and continue to next param
|
|
27
27
|
|
|
28
28
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_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":
|
|
11
|
+
"mandatory": 0,
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"internalBridge": 1,
|
|
@@ -21,9 +21,9 @@ 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
|
-
|
|
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
|
|
28
28
|
|
|
29
29
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_module])
|
|
@@ -249,10 +249,12 @@ def run(test):
|
|
|
249
249
|
field_functionality_pass_fail_print(test, param.name)
|
|
250
250
|
test.set_phase_rc(param.name, test.rc)
|
|
251
251
|
test.add_phase_reason(param.name, test.reason)
|
|
252
|
-
if test.rc == TEST_FAILED
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
if test.rc == TEST_FAILED:
|
|
253
|
+
if test.exit_on_param_failure:
|
|
254
|
+
break # break the whole for loop and keep the test as failed
|
|
255
|
+
else:
|
|
256
|
+
test.reset_result() # reset result and continue to next param
|
|
257
|
+
continue
|
|
256
258
|
|
|
257
259
|
# Reset to defaults after every phase (don't fail the phase on that)
|
|
258
260
|
test = cert_config.config_brg_defaults(test, modules=[test.brg0.energy2400, test.brg0.sensors])[0]
|
|
@@ -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":
|
|
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, 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
|
+
test.reset_result() # reset result and continue to next param
|
|
27
27
|
|
|
28
28
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_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":
|
|
11
|
+
"mandatory": 0,
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"internalBridge": 1,
|
|
@@ -19,9 +19,9 @@ def run(test):
|
|
|
19
19
|
field_functionality_pass_fail_print(test, fields, value=param.name)
|
|
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
|
+
test.reset_result() # reset result and continue to next param
|
|
26
26
|
|
|
27
27
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_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":
|
|
11
|
+
"mandatory": 0,
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"internalBridge": 1,
|
|
@@ -20,9 +20,9 @@ def run(test):
|
|
|
20
20
|
generate_log_file(test, 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
|
+
test.reset_result() # reset result and continue to next param
|
|
27
27
|
|
|
28
28
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "External Sensors",
|
|
3
3
|
"module": "BLE Sensor",
|
|
4
4
|
"purpose": "Verify the external_sensor module functionality - configuration, data collection and data transmission.",
|
|
5
|
-
"documentation": "<
|
|
5
|
+
"documentation": "<https://community.wiliot.com/customers/s/article/Wiliot-Network-Bridge-Modular-Architecture>",
|
|
6
6
|
"initialCondition": "Bridge configured to defaults",
|
|
7
7
|
"procedure": ["Test prolog",
|
|
8
8
|
"tag_data_only - No external sensor configured, only tag data is expected.",
|