wiliot-certificate 1.4.0a2__py3-none-any.whl → 1.5.1a1__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 +28 -28
- brg_certificate/ag/energous_v1_defines.py +28 -28
- brg_certificate/ag/energous_v2_defines.py +28 -28
- brg_certificate/ag/energous_v3_defines.py +28 -28
- brg_certificate/ag/energous_v4_defines.py +28 -28
- brg_certificate/ag/fanstel_lan_v0_defines.py +28 -28
- brg_certificate/ag/fanstel_lte_v0_defines.py +28 -28
- brg_certificate/ag/fanstel_wifi_v0_defines.py +28 -28
- brg_certificate/ag/minew_lte_v0_defines.py +28 -28
- brg_certificate/ag/wlt_cmd_if.html +1 -1
- brg_certificate/ag/wlt_types.html +3 -4
- brg_certificate/ag/wlt_types_ag.py +162 -163
- brg_certificate/brg_certificate.py +46 -12
- brg_certificate/brg_certificate_cli.py +1 -0
- brg_certificate/cert_common.py +31 -42
- brg_certificate/cert_config.py +7 -5
- brg_certificate/cert_data_sim.py +26 -4
- brg_certificate/cert_defines.py +30 -3
- brg_certificate/cert_gw_sim.py +12 -8
- brg_certificate/cert_mqtt.py +10 -2
- brg_certificate/cert_prints.py +7 -5
- brg_certificate/cert_protobuf.py +5 -1
- brg_certificate/cert_results.py +134 -84
- brg_certificate/cert_utils.py +14 -17
- brg_certificate/certificate_bcc_sanity_test_list.txt +35 -0
- brg_certificate/certificate_bcc_test_list.txt +45 -0
- brg_certificate/certificate_sanity_test_list.txt +2 -1
- brg_certificate/certificate_test_list.txt +10 -4
- brg_certificate/restore_brg.py +2 -0
- brg_certificate/tests/calibration/interval_test/interval_test.json +2 -1
- brg_certificate/tests/calibration/interval_test/interval_test.py +1 -1
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +5 -3
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +1 -1
- brg_certificate/tests/calibration/pattern_test/pattern_test.json +5 -2
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +1 -1
- brg_certificate/tests/datapath/aging_test/aging_test.json +20 -0
- brg_certificate/tests/datapath/aging_test/aging_test.py +135 -0
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.json +8 -3
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +2 -2
- brg_certificate/tests/datapath/output_power_test/output_power_test.json +5 -2
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +1 -1
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +5 -2
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +1 -1
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +5 -2
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +2 -2
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.json +5 -2
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +1 -1
- brg_certificate/tests/datapath/pattern_test/pattern_test.json +6 -3
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +1 -1
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +8 -2
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +1 -1
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +8 -2
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +1 -1
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +8 -2
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +1 -1
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +6 -2
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +1 -1
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +5 -2
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +1 -1
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +3 -4
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +1 -1
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +3 -4
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +1 -1
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +14 -22
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +24 -24
- brg_certificate/tests/datapath/stress_test/stress_test.json +11 -18
- brg_certificate/tests/datapath/stress_test/stress_test.py +20 -27
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +6 -2
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +1 -1
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +6 -2
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +1 -1
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +2 -1
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +4 -24
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +2 -1
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +1 -1
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +2 -1
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +1 -1
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +9 -5
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +4 -4
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +9 -5
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +45 -1
- brg_certificate/tests/edge_mgmt/stat_test/stat_test.json +2 -1
- brg_certificate/tests/edge_mgmt/stat_test/stat_test.py +1 -1
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +5 -2
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +1 -1
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +5 -3
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +1 -1
- brg_certificate/tests/energy2400/pattern_test/pattern_test.json +5 -2
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +1 -1
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +20 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +346 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +20 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +346 -0
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +2 -1
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +1 -1
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +12 -5
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +130 -43
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +5 -2
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +1 -1
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +9 -3
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +1 -1
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +2 -1
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +1 -1
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +5 -2
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +1 -1
- brg_certificate/wltPb_pb2.py +50 -38
- brg_certificate/wltPb_pb2.pyi +40 -34
- brg_certificate/wlt_types.py +4 -6
- common/wlt_logo.png +0 -0
- gw_certificate/ag/ut_defines.py +4 -1
- gw_certificate/cert_results.py +145 -0
- gw_certificate/gw_certificate.py +18 -6
- gw_certificate/gw_certificate_cli.py +3 -3
- gw_certificate/interface/mqtt.py +1 -0
- gw_certificate/interface/uart_if.py +1 -1
- gw_certificate/tests/actions.py +7 -2
- gw_certificate/tests/connection.py +1 -1
- gw_certificate/tests/generic.py +43 -17
- gw_certificate/tests/registration.py +2 -1
- gw_certificate/tests/uplink.py +26 -35
- {wiliot_certificate-1.4.0a2.dist-info → wiliot_certificate-1.5.1a1.dist-info}/METADATA +16 -10
- {wiliot_certificate-1.4.0a2.dist-info → wiliot_certificate-1.5.1a1.dist-info}/RECORD +126 -120
- {wiliot_certificate-1.4.0a2.dist-info → wiliot_certificate-1.5.1a1.dist-info}/WHEEL +1 -1
- {wiliot_certificate-1.4.0a2.dist-info → wiliot_certificate-1.5.1a1.dist-info}/top_level.txt +1 -0
- brg_certificate/tests/datapath/adaptive_pacer_algo_test/adaptive_pacer_algo_test.json +0 -13
- brg_certificate/tests/datapath/adaptive_pacer_algo_test/adaptive_pacer_algo_test.py +0 -76
- brg_certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +0 -13
- brg_certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +0 -398
- {wiliot_certificate-1.4.0a2.dist-info → wiliot_certificate-1.5.1a1.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-1.4.0a2.dist-info → wiliot_certificate-1.5.1a1.dist-info/licenses}/LICENSE +0 -0
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rx_rate_gen3",
|
|
3
|
-
"module": "
|
|
4
|
-
"purpose": [
|
|
5
|
-
"Verify the accuracy of the RX rate value"
|
|
6
|
-
],
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": ["Verify the accuracy of the RX rate value"],
|
|
7
5
|
"documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing",
|
|
8
6
|
"initialCondition": "Bridge set to default configuration",
|
|
9
7
|
"procedure": [
|
|
@@ -17,5 +15,6 @@
|
|
|
17
15
|
"mandatory": 1,
|
|
18
16
|
"multiBridgeTest": 0,
|
|
19
17
|
"gwOnlyTest": 0,
|
|
18
|
+
"internalBridge": 1,
|
|
20
19
|
"allSupportedValues": ["mid_values", "diff_pacer", "min_value", "max_value", "diff_rate"]
|
|
21
20
|
}
|
|
@@ -184,7 +184,7 @@ def run(test):
|
|
|
184
184
|
# "Test prolog"
|
|
185
185
|
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
186
186
|
test = cert_common.test_prolog(test)
|
|
187
|
-
if test.rc == TEST_FAILED
|
|
187
|
+
if test.rc == TEST_FAILED:
|
|
188
188
|
return cert_common.test_epilog(test)
|
|
189
189
|
|
|
190
190
|
fields = [BRG_PACER_INTERVAL]
|
|
@@ -1,30 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stress test",
|
|
3
|
-
"module": "
|
|
4
|
-
"purpose": [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
],
|
|
9
|
-
"documentation": [
|
|
10
|
-
"https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Relaying-data",
|
|
11
|
-
"add more links here - about adaptive repetition, adaptive pacer"
|
|
12
|
-
],
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": ["verify the functionality of the bridge under stress conditions",
|
|
5
|
+
"verify that the algorithms 'adaptive repetition' and 'adaptive pacer' are working correctly"],
|
|
6
|
+
"documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Relaying-data",
|
|
7
|
+
"add more links here - about adaptive repetition, adaptive pacer"],
|
|
13
8
|
"initialCondition": "Bridge configured to defaults",
|
|
14
|
-
"procedure": [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"pixels burst - config pacer interval 15, then add more 200 packets with 0 delay(0.02 sec), then check repetition value = 1 and not 2",
|
|
22
|
-
"Test epilog"
|
|
23
|
-
],
|
|
9
|
+
"procedure": ["Test prolog",
|
|
10
|
+
"define simulation with 200 packets with 0 delay(0.02 sec) ",
|
|
11
|
+
"rep 3 - config pacer interval 15, then check repetition value = 3, pacer increment = 0, num of tags = all tags",
|
|
12
|
+
"rep 2 - config pacer interval 9, then check repetition value = 2, pacer increment = 0, num of tags = all tags",
|
|
13
|
+
"rep 1 - config pacer interval 6, 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
|
+
"Test epilog"],
|
|
24
16
|
"expectedOutcome": "all metrics values will be as expected then the bridge is working correctly and the algorithms are working correctly",
|
|
25
17
|
"mandatory": 1,
|
|
26
18
|
"multiBridgeTest": 0,
|
|
27
19
|
"gwOnlyTest": 0,
|
|
28
|
-
"
|
|
29
|
-
|
|
20
|
+
"internalBridge": 0,
|
|
21
|
+
"allSupportedValues": ["rep3", "rep2", "rep1", "rep1_adaptive_pacer"]
|
|
30
22
|
}
|
|
@@ -6,13 +6,11 @@ import brg_certificate.cert_config as cert_config
|
|
|
6
6
|
import brg_certificate.cert_data_sim as cert_data_sim
|
|
7
7
|
from brg_certificate.cert_gw_sim import DEDUPLICATION_PKTS
|
|
8
8
|
import statistics
|
|
9
|
-
import datetime
|
|
10
|
-
import sys
|
|
11
9
|
import time
|
|
12
10
|
|
|
13
11
|
def configure_pacer_n_times(test, num_of_times, pacer_interval, datapath_module):
|
|
14
12
|
test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
|
|
15
|
-
if test.rc == TEST_FAILED
|
|
13
|
+
if test.rc == TEST_FAILED:
|
|
16
14
|
for i in range(num_of_times):
|
|
17
15
|
if test.rc == TEST_PASSED:
|
|
18
16
|
return test
|
|
@@ -32,16 +30,15 @@ def metric_checking_HB(test, mgmt_type_list, tx_queue_expected, pacer_increment_
|
|
|
32
30
|
half_index = len(watermarks) // 2
|
|
33
31
|
tx_queue_HB = statistics.mean(watermarks[half_index:])
|
|
34
32
|
if not (tx_queue_expected[0] <= tx_queue_HB <= tx_queue_expected[1]):
|
|
35
|
-
|
|
36
|
-
print(f"\ntx_queue value is wrong!\nexpected: {tx_queue_expected}, got: {tx_queue_HB}")
|
|
33
|
+
print(f"\ntx_queue value is wrong! expected: {tx_queue_expected}, got: {tx_queue_HB}")
|
|
37
34
|
else:
|
|
38
|
-
|
|
39
|
-
print(f"\ntx_queue from HB : {tx_queue_HB}\n")
|
|
35
|
+
print(f"\ntx_queue from HB: {tx_queue_HB}\n")
|
|
40
36
|
|
|
41
37
|
# check pacer increment
|
|
42
38
|
pacer_increment_HB = [pkt.effective_pacer_increment for pkt in mgmt_type_list]
|
|
43
39
|
average_pacer_increment_HB = statistics.mean(pacer_increment_HB)
|
|
44
40
|
if not (pacer_increment_expected[0] <= average_pacer_increment_HB <= pacer_increment_expected[1]):
|
|
41
|
+
test.rc = TEST_FAILED
|
|
45
42
|
test.add_reason(f"pacer_increment:{average_pacer_increment_HB}")
|
|
46
43
|
print(f"\npacer_increment value is wrong\nexpected: {pacer_increment_expected}\ngot: {average_pacer_increment_HB}")
|
|
47
44
|
else:
|
|
@@ -65,32 +62,30 @@ def metric_checking_df(test, check, pacer_interval, df, repetition_value_expect
|
|
|
65
62
|
test.add_reason(f"Repetition:{average_payload_count}, expected: {repetition_value_expected},")
|
|
66
63
|
print(f"Repetition value is wrong! \nexpected:{repetition_value_expected}\ngot: {average_payload_count}")
|
|
67
64
|
else:
|
|
68
|
-
test.add_reason(f"Repetition:{average_payload_count}, expected: {repetition_value_expected},")
|
|
69
65
|
print(f"Repetition value is wrong! \nexpected:{repetition_value_expected}\ngot: {average_payload_count}")
|
|
70
66
|
else:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
if check:
|
|
68
|
+
test.add_reason(f"Repetition value: {average_payload_count}")
|
|
69
|
+
print(f"Repetition value is correct! got: {average_payload_count}")
|
|
70
|
+
else:
|
|
71
|
+
print(f"Repetition value is correct! got: {average_payload_count}")
|
|
72
|
+
|
|
74
73
|
# check num of tags, with tolerance of 5%
|
|
75
74
|
num_of_tags = len(df[TAG_ID].unique())
|
|
76
75
|
if not num_of_pixels_expected*0.95 <= num_of_tags <= num_of_pixels_expected*1.05:
|
|
77
76
|
test.add_reason(f"num of tags: {num_of_tags}")
|
|
78
77
|
print(f"\n num of tags is not as expected\nexpected: {num_of_pixels_expected}, got: {num_of_tags}")
|
|
79
78
|
else:
|
|
80
|
-
test.add_reason(f"num of tags: {num_of_tags}")
|
|
81
79
|
print(f"\nnum of tags from df: {num_of_tags}\n")
|
|
82
80
|
|
|
83
81
|
#check brg_latency
|
|
82
|
+
brg_latency_avg = round(df[BRG_LATENCY].mean(),2)
|
|
84
83
|
if check:
|
|
85
|
-
brg_latency_avg = round(df[BRG_LATENCY].mean(),2)
|
|
86
84
|
if not (brg_latency_expected[0] <= brg_latency_avg <= brg_latency_expected[1]):
|
|
87
|
-
test.add_reason(f"brg_latency:{brg_latency_avg}")
|
|
88
85
|
print(f"Average brg_latency: {brg_latency_avg}")
|
|
89
86
|
else:
|
|
90
|
-
test.add_reason(f"brg_latency: {brg_latency_avg}")
|
|
91
87
|
print(f"Average brg_latency: {brg_latency_avg}")
|
|
92
88
|
else:
|
|
93
|
-
brg_latency_avg = round(df[BRG_LATENCY].mean(),2)
|
|
94
89
|
print(f"Average brg_latency: {brg_latency_avg}")
|
|
95
90
|
return test
|
|
96
91
|
|
|
@@ -117,32 +112,37 @@ def combination_func(test, datapath_module, pacer_interval, num_of_sim_tags, rep
|
|
|
117
112
|
test = metric_checking_HB(test, hbs, tx_queue_expected, pacer_increment_expected)
|
|
118
113
|
return test
|
|
119
114
|
|
|
120
|
-
def rep3(test, datapath_module, num_of_sim_tags
|
|
115
|
+
def rep3(test, datapath_module, num_of_sim_tags):
|
|
116
|
+
# step 1 - config pacer interval=15 , then check repetition value = 3, tx_queue ~ 0, pacer increment ~ 0, brg latency ~ 0 , num of tags = all tags.
|
|
121
117
|
pacer_interval = 20
|
|
122
118
|
test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, repetition_value_expected=[2,3], tx_queue_expected=[20,40], pacer_increment_expected=[0,2], brg_latency_expected=[0,10])
|
|
123
119
|
time.sleep(5)
|
|
124
120
|
return test
|
|
125
121
|
|
|
126
|
-
def rep2(test, datapath_module, num_of_sim_tags
|
|
122
|
+
def rep2(test, datapath_module, num_of_sim_tags):
|
|
123
|
+
#"step 2 - config pacer interval 9, then check repetition value = 2, tx_queue = 20-40, pacer increment = 0, brg latency = 0-200, num of tags = all tags"
|
|
127
124
|
pacer_interval = 15
|
|
128
125
|
test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, repetition_value_expected=[1.5,2.5], tx_queue_expected=[20,40], pacer_increment_expected=[0,2], brg_latency_expected=[10,200])
|
|
129
126
|
time.sleep(5)
|
|
130
127
|
return test
|
|
131
128
|
|
|
132
|
-
def rep1(test, datapath_module, num_of_sim_tags
|
|
129
|
+
def rep1(test, datapath_module, num_of_sim_tags):
|
|
130
|
+
# "step 3 - config pacer interval 6 , then check repetition value = 1, tx_queue 40-60, pacer increment ~ 0, brg latency 200-300 , num of tags = all tags"
|
|
133
131
|
pacer_interval = 9
|
|
134
132
|
test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, repetition_value_expected=[1,2], tx_queue_expected=[20,40], pacer_increment_expected=[0,2], brg_latency_expected=[200,300])
|
|
135
133
|
time.sleep(5)
|
|
136
134
|
return test
|
|
137
135
|
|
|
138
|
-
def rep1_adaptive_pacer(test, datapath_module, num_of_sim_tags
|
|
136
|
+
def rep1_adaptive_pacer(test, datapath_module, num_of_sim_tags):
|
|
137
|
+
# "step 4 - config pacer interval 1 , then check repetition value = 1, tx_queue > 60, pacer increment = 3 , brg latency > 300 , num of tags = all tags"
|
|
139
138
|
pacer_interval = 1
|
|
140
139
|
test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, repetition_value_expected=[1,2], tx_queue_expected=[20,40], pacer_increment_expected=[2,20], brg_latency_expected=[300,1000])
|
|
141
140
|
time.sleep(5)
|
|
142
141
|
return test
|
|
143
142
|
|
|
144
143
|
def pixels_burst(test, datapath_module, num_of_sim_tags, pixel_sim_thread):
|
|
145
|
-
#NOTE: I
|
|
144
|
+
#NOTE: I skipped this phase
|
|
145
|
+
# "pixel_burst - config pacer interval 15 , then add more 200 packets with 0 delay(0.02 sec) , then check repetition value = 1 and not 2 "
|
|
146
146
|
pixel_sim_thread.stop()
|
|
147
147
|
pacer_interval = 15
|
|
148
148
|
test = configure_pacer_n_times(test, 2, pacer_interval, datapath_module)
|
|
@@ -171,7 +171,7 @@ def run(test):
|
|
|
171
171
|
# Test prolog
|
|
172
172
|
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
173
173
|
test = cert_common.test_prolog(test)
|
|
174
|
-
if test.rc == TEST_FAILED
|
|
174
|
+
if test.rc == TEST_FAILED:
|
|
175
175
|
return cert_common.test_epilog(test)
|
|
176
176
|
#config GW deduplication pkts = 0 "
|
|
177
177
|
print("Configuring GW with !deduplication_pkts 0")
|
|
@@ -179,14 +179,14 @@ def run(test):
|
|
|
179
179
|
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
180
180
|
return cert_common.test_epilog(test, revert_gws=True)
|
|
181
181
|
|
|
182
|
-
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, "rep1_adaptive_pacer":rep1_adaptive_pacer}
|
|
183
183
|
num_of_pixels = 300
|
|
184
184
|
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=1, delay=0, pkt_types=[0],pixels_type=GEN3)
|
|
185
185
|
pixel_sim_thread.start()
|
|
186
186
|
time.sleep(30)
|
|
187
187
|
for param in test.params:
|
|
188
188
|
functionality_run_print(param.name)
|
|
189
|
-
test = STRESS_TEST_MAP[param.value](test, datapath_module, num_of_pixels
|
|
189
|
+
test = STRESS_TEST_MAP[param.value](test, datapath_module, num_of_pixels)
|
|
190
190
|
generate_log_file(test, param.name)
|
|
191
191
|
field_functionality_pass_fail_print(test, param.name)
|
|
192
192
|
test.set_phase_rc(param.name, test.rc)
|
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stress test",
|
|
3
|
-
"module": "
|
|
4
|
-
"purpose": [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"verify an edge case where the repetition stable and we got a lot of packets in short time"
|
|
8
|
-
],
|
|
9
|
-
"documentation": [
|
|
10
|
-
"https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Relaying-data",
|
|
11
|
-
"add more links here - about adaptive repetition, adaptive pacer"
|
|
12
|
-
],
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": ["verify the functionality of the bridge under stress conditions",
|
|
5
|
+
"verify that the algorithms 'adaptive repetition' and 'adaptive pacer' are working correctly"],
|
|
6
|
+
"documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Relaying-data"],
|
|
13
7
|
"initialCondition": "Bridge configured to defaults",
|
|
14
8
|
"procedure": [
|
|
15
9
|
"Test prolog",
|
|
16
10
|
"define simulation with 200 packets with 0 delay(0.02 sec) ",
|
|
17
|
-
"rep 3 - config pacer interval 15, then check repetition value = 3,
|
|
18
|
-
"rep 2 - config pacer interval 9, then check repetition value = 2,
|
|
19
|
-
"rep 1
|
|
20
|
-
"rep 1 adaptive pacer - config pacer interval 1
|
|
21
|
-
"
|
|
22
|
-
"Test epilog"
|
|
23
|
-
],
|
|
11
|
+
"rep 3 - config pacer interval 15, then check repetition value = 3, pacer increment = 0, num of tags = all tags ",
|
|
12
|
+
"rep 2 - config pacer interval 9, then check repetition value = 2, pacer increment = 0, num of tags = all tags",
|
|
13
|
+
"rep 1 - config pacer interval 6, 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
|
+
"Test epilog"],
|
|
24
16
|
"expectedOutcome": "all metrics values will be as expected then the bridge is working correctly and the algorithms are working correctly",
|
|
25
17
|
"mandatory": 1,
|
|
26
18
|
"multiBridgeTest": 0,
|
|
27
19
|
"gwOnlyTest": 0,
|
|
28
|
-
"
|
|
20
|
+
"internalBridge": 1,
|
|
21
|
+
"allSupportedValues": ["rep3", "rep2", "rep1", "rep1_adaptive_pacer"]
|
|
29
22
|
|
|
30
23
|
}
|
|
@@ -10,7 +10,7 @@ import time
|
|
|
10
10
|
|
|
11
11
|
def configure_pacer_n_times(test, num_of_times, pacer_interval, datapath_module):
|
|
12
12
|
test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
|
|
13
|
-
if test.rc == TEST_FAILED
|
|
13
|
+
if test.rc == TEST_FAILED:
|
|
14
14
|
for i in range(num_of_times):
|
|
15
15
|
if test.rc == TEST_PASSED:
|
|
16
16
|
return test
|
|
@@ -30,16 +30,15 @@ def metric_checking_HB(test, mgmt_type_list, tx_queue_expected, pacer_increment_
|
|
|
30
30
|
half_index = len(watermarks) // 2
|
|
31
31
|
tx_queue_HB = statistics.mean(watermarks[half_index:])
|
|
32
32
|
if not (tx_queue_expected[0] <= tx_queue_HB <= tx_queue_expected[1]):
|
|
33
|
-
|
|
34
|
-
print(f"\ntx_queue value is wrong!\nexpected: {tx_queue_expected}, got: {tx_queue_HB}")
|
|
33
|
+
print(f"\ntx_queue value is wrong! expected: {tx_queue_expected}, got: {tx_queue_HB}")
|
|
35
34
|
else:
|
|
36
|
-
|
|
37
|
-
print(f"\ntx_queue from HB : {tx_queue_HB}\n")
|
|
35
|
+
print(f"\ntx_queue from HB: {tx_queue_HB}\n")
|
|
38
36
|
|
|
39
37
|
# check pacer increment
|
|
40
38
|
pacer_increment_HB = [pkt.effective_pacer_increment for pkt in mgmt_type_list]
|
|
41
39
|
average_pacer_increment_HB = statistics.mean(pacer_increment_HB)
|
|
42
40
|
if not (pacer_increment_expected[0] <= average_pacer_increment_HB <= pacer_increment_expected[1]):
|
|
41
|
+
test.rc = TEST_FAILED
|
|
43
42
|
test.add_reason(f"pacer_increment:{average_pacer_increment_HB}")
|
|
44
43
|
print(f"\npacer_increment value is wrong\nexpected: {pacer_increment_expected}\ngot: {average_pacer_increment_HB}")
|
|
45
44
|
else:
|
|
@@ -63,32 +62,30 @@ def metric_checking_df(test, check, pacer_interval, df, repetition_value_expect
|
|
|
63
62
|
test.add_reason(f"Repetition:{average_payload_count}, expected: {repetition_value_expected},")
|
|
64
63
|
print(f"Repetition value is wrong! \nexpected:{repetition_value_expected}\ngot: {average_payload_count}")
|
|
65
64
|
else:
|
|
66
|
-
test.add_reason(f"Repetition:{average_payload_count}, expected: {repetition_value_expected},")
|
|
67
65
|
print(f"Repetition value is wrong! \nexpected:{repetition_value_expected}\ngot: {average_payload_count}")
|
|
68
66
|
else:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
if check:
|
|
68
|
+
test.add_reason(f"Repetition value: {average_payload_count}")
|
|
69
|
+
print(f"Repetition value is correct! got: {average_payload_count}")
|
|
70
|
+
else:
|
|
71
|
+
print(f"Repetition value is correct! got: {average_payload_count}")
|
|
72
|
+
|
|
72
73
|
# check num of tags, with tolerance of 5%
|
|
73
74
|
num_of_tags = len(df[TAG_ID].unique())
|
|
74
75
|
if not num_of_pixels_expected*0.95 <= num_of_tags <= num_of_pixels_expected*1.05:
|
|
75
76
|
test.add_reason(f"num of tags: {num_of_tags}")
|
|
76
77
|
print(f"\n num of tags is not as expected\nexpected: {num_of_pixels_expected}, got: {num_of_tags}")
|
|
77
78
|
else:
|
|
78
|
-
test.add_reason(f"num of tags: {num_of_tags}")
|
|
79
79
|
print(f"\nnum of tags from df: {num_of_tags}\n")
|
|
80
80
|
|
|
81
81
|
#check brg_latency
|
|
82
|
+
brg_latency_avg = round(df[BRG_LATENCY].mean(),2)
|
|
82
83
|
if check:
|
|
83
|
-
brg_latency_avg = round(df[BRG_LATENCY].mean(),2)
|
|
84
84
|
if not (brg_latency_expected[0] <= brg_latency_avg <= brg_latency_expected[1]):
|
|
85
|
-
test.add_reason(f"brg_latency:{brg_latency_avg}")
|
|
86
85
|
print(f"Average brg_latency: {brg_latency_avg}")
|
|
87
86
|
else:
|
|
88
|
-
test.add_reason(f"brg_latency: {brg_latency_avg}")
|
|
89
87
|
print(f"Average brg_latency: {brg_latency_avg}")
|
|
90
88
|
else:
|
|
91
|
-
brg_latency_avg = round(df[BRG_LATENCY].mean(),2)
|
|
92
89
|
print(f"Average brg_latency: {brg_latency_avg}")
|
|
93
90
|
return test
|
|
94
91
|
|
|
@@ -99,9 +96,6 @@ def combination_func(test, datapath_module, pacer_interval, num_of_sim_tags, rep
|
|
|
99
96
|
df = cert_common.data_scan(test, scan_time=30, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
100
97
|
cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
|
|
101
98
|
test, hbs = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
|
|
102
|
-
print(f"number of HB packets: {len(hbs)}") # TODO remove
|
|
103
|
-
for p in hbs: # TODO remove
|
|
104
|
-
print(f"WATERMARK:{p[MGMT_PKT].pkt.tx_queue_watermark}, pacer increment:{p[MGMT_PKT].pkt.effective_pacer_increment} ") # TODO remove
|
|
105
99
|
hbs = [p[MGMT_PKT].pkt for p in hbs]
|
|
106
100
|
print(f"result of first df\n")
|
|
107
101
|
check = False
|
|
@@ -118,29 +112,28 @@ def combination_func(test, datapath_module, pacer_interval, num_of_sim_tags, rep
|
|
|
118
112
|
test = metric_checking_HB(test, hbs, tx_queue_expected, pacer_increment_expected)
|
|
119
113
|
return test
|
|
120
114
|
|
|
121
|
-
def rep3(test, datapath_module, num_of_sim_tags
|
|
115
|
+
def rep3(test, datapath_module, num_of_sim_tags):
|
|
122
116
|
# step 1 - config pacer interval=15 , then check repetition value = 3, tx_queue ~ 0, pacer increment ~ 0, brg latency ~ 0 , num of tags = all tags.
|
|
123
117
|
pacer_interval = 20
|
|
124
118
|
test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, repetition_value_expected=[2,3], tx_queue_expected=[20,40], pacer_increment_expected=[0,2], brg_latency_expected=[0,10])
|
|
125
119
|
time.sleep(5)
|
|
126
120
|
return test
|
|
127
121
|
|
|
128
|
-
def rep2(test, datapath_module, num_of_sim_tags
|
|
122
|
+
def rep2(test, datapath_module, num_of_sim_tags):
|
|
129
123
|
#"step 2 - config pacer interval 9, then check repetition value = 2, tx_queue = 20-40, pacer increment = 0, brg latency = 0-200, num of tags = all tags"
|
|
130
124
|
pacer_interval = 15
|
|
131
125
|
test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, repetition_value_expected=[1.5,2.5], tx_queue_expected=[20,40], pacer_increment_expected=[0,2], brg_latency_expected=[10,200])
|
|
132
|
-
# for checking if it's affect of the running that df is empty.
|
|
133
126
|
time.sleep(5)
|
|
134
127
|
return test
|
|
135
128
|
|
|
136
|
-
def rep1(test, datapath_module, num_of_sim_tags
|
|
129
|
+
def rep1(test, datapath_module, num_of_sim_tags):
|
|
137
130
|
# "step 3 - config pacer interval 6 , then check repetition value = 1, tx_queue 40-60, pacer increment ~ 0, brg latency 200-300 , num of tags = all tags"
|
|
138
131
|
pacer_interval = 9
|
|
139
132
|
test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, repetition_value_expected=[1,2], tx_queue_expected=[20,40], pacer_increment_expected=[0,2], brg_latency_expected=[200,300])
|
|
140
133
|
time.sleep(5)
|
|
141
134
|
return test
|
|
142
135
|
|
|
143
|
-
def rep1_adaptive_pacer(test, datapath_module, num_of_sim_tags
|
|
136
|
+
def rep1_adaptive_pacer(test, datapath_module, num_of_sim_tags):
|
|
144
137
|
# "step 4 - config pacer interval 1 , then check repetition value = 1, tx_queue > 60, pacer increment = 3 , brg latency > 300 , num of tags = all tags"
|
|
145
138
|
pacer_interval = 1
|
|
146
139
|
test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, repetition_value_expected=[1,2], tx_queue_expected=[20,40], pacer_increment_expected=[2,20], brg_latency_expected=[300,1000])
|
|
@@ -148,8 +141,8 @@ def rep1_adaptive_pacer(test, datapath_module, num_of_sim_tags, pixel_sim_thread
|
|
|
148
141
|
return test
|
|
149
142
|
|
|
150
143
|
def pixels_burst(test, datapath_module, num_of_sim_tags, pixel_sim_thread):
|
|
151
|
-
#NOTE: I
|
|
152
|
-
# "
|
|
144
|
+
#NOTE: I skipped this phase
|
|
145
|
+
# "pixel_burst - config pacer interval 15 , then add more 200 packets with 0 delay(0.02 sec) , then check repetition value = 1 and not 2 "
|
|
153
146
|
pixel_sim_thread.stop()
|
|
154
147
|
pacer_interval = 15
|
|
155
148
|
test = configure_pacer_n_times(test, 2, pacer_interval, datapath_module)
|
|
@@ -178,7 +171,7 @@ def run(test):
|
|
|
178
171
|
# Test prolog
|
|
179
172
|
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
180
173
|
test = cert_common.test_prolog(test)
|
|
181
|
-
if test.rc == TEST_FAILED
|
|
174
|
+
if test.rc == TEST_FAILED:
|
|
182
175
|
return cert_common.test_epilog(test)
|
|
183
176
|
#config GW deduplication pkts = 0 "
|
|
184
177
|
print("Configuring GW with !deduplication_pkts 0")
|
|
@@ -186,14 +179,14 @@ def run(test):
|
|
|
186
179
|
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
187
180
|
return cert_common.test_epilog(test, revert_gws=True)
|
|
188
181
|
|
|
189
|
-
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, "rep1_adaptive_pacer":rep1_adaptive_pacer}
|
|
190
183
|
num_of_pixels = 300
|
|
191
184
|
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=1, delay=0, pkt_types=[0],pixels_type=GEN2)
|
|
192
185
|
pixel_sim_thread.start()
|
|
193
186
|
time.sleep(30)
|
|
194
187
|
for param in test.params:
|
|
195
188
|
functionality_run_print(param.name)
|
|
196
|
-
test = STRESS_TEST_MAP[param.value](test, datapath_module, num_of_pixels
|
|
189
|
+
test = STRESS_TEST_MAP[param.value](test, datapath_module, num_of_pixels)
|
|
197
190
|
generate_log_file(test, param.name)
|
|
198
191
|
field_functionality_pass_fail_print(test, param.name)
|
|
199
192
|
test.set_phase_rc(param.name, test.rc)
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
"name": "tx_repetition_algo_test",
|
|
3
3
|
"module": "datapath",
|
|
4
4
|
"purpose": "Test the tx repetition adjustment algorithm",
|
|
5
|
-
"
|
|
5
|
+
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
6
|
"initialCondition": "Bridge configured to defaults",
|
|
7
|
-
"procedure": ["Test prolog",
|
|
7
|
+
"procedure": ["Test prolog",
|
|
8
|
+
"Configure bridge tx repetition to 0 to activate tx repetition adjustment algorithm, and packets de-dupliction to 0 to enable analysis",
|
|
9
|
+
"Scan for packets and examine tx repetitions auto adjustment over time",
|
|
10
|
+
"Test epilog and revert to defaults"],
|
|
8
11
|
"expectedOutcome": "All configurations completed successfully and tx repetition algorithm works as expected",
|
|
9
12
|
"mandatory": 0,
|
|
10
13
|
"multiBridgeTest": 0,
|
|
11
14
|
"gwOnlyTest": 0,
|
|
15
|
+
"internalBridge": 1,
|
|
12
16
|
"allSupportedValues": []
|
|
13
17
|
}
|
|
@@ -92,7 +92,7 @@ def tx_rep_analysis(test):
|
|
|
92
92
|
def run(test):
|
|
93
93
|
|
|
94
94
|
test = cert_common.test_prolog(test)
|
|
95
|
-
if test.rc == TEST_FAILED
|
|
95
|
+
if test.rc == TEST_FAILED:
|
|
96
96
|
return cert_common.test_epilog(test)
|
|
97
97
|
|
|
98
98
|
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
"name": "tx_repetition_test",
|
|
3
3
|
"module": "datapath",
|
|
4
4
|
"purpose": "Test tx repetition feature configuration and functionality in the bridge for different tx repetition values",
|
|
5
|
-
"
|
|
5
|
+
"documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Configuration",
|
|
6
6
|
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
|
-
"procedure": ["Test prolog",
|
|
7
|
+
"procedure": ["Test prolog",
|
|
8
|
+
"Disabling GW deduplication",
|
|
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
|
+
"Test epilog and revert to defaults"],
|
|
8
11
|
"expectedOutcome": "All values configured successfully and actual repetitions found matching to the configured values",
|
|
9
12
|
"mandatory": 1,
|
|
10
13
|
"multiBridgeTest": 0,
|
|
11
14
|
"gwOnlyTest": 0,
|
|
15
|
+
"internalBridge": 0,
|
|
12
16
|
"allSupportedValues": [1, 2, 3, 4, 5, 6]
|
|
13
17
|
}
|
|
@@ -52,7 +52,7 @@ def run(test):
|
|
|
52
52
|
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
53
53
|
|
|
54
54
|
test = cert_common.test_prolog(test)
|
|
55
|
-
if test.rc == TEST_FAILED
|
|
55
|
+
if test.rc == TEST_FAILED:
|
|
56
56
|
return cert_common.test_epilog(test)
|
|
57
57
|
|
|
58
58
|
print("Configuring GW with !deduplication_pkts 0")
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
"name": "actions_test",
|
|
3
3
|
"module": "edge_mgmt",
|
|
4
4
|
"purpose": "Test bridge actions functionality",
|
|
5
|
-
"
|
|
5
|
+
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
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
9
|
"mandatory": 1,
|
|
10
10
|
"multiBridgeTest": 0,
|
|
11
11
|
"gwOnlyTest": 0,
|
|
12
|
+
"internalBridge": 1,
|
|
12
13
|
"allSupportedValues": ["ACTION_GW_HB", "ACTION_BLINK", "ACTION_SEND_HB", "ACTION_GET_BATTERY_SENSOR" , "ACTION_GET_POF_DATA", "ACTION_PL_STATUS", "ACTION_GET_MODULE", "ACTION_REBOOT", "ACTION_RESTORE_DEFAULTS"]
|
|
13
14
|
}
|
|
@@ -51,9 +51,9 @@ def get_brg_non_default_module_pkt(test, module):
|
|
|
51
51
|
dynamic_keep_alive_scan=BRG_NON_DEFAULT_PWR_MGMT_KEEP_ALIVE_SCAN)
|
|
52
52
|
elif 'Custom' in module.__name__:
|
|
53
53
|
return cert_config.get_default_brg_pkt(test, pkt_type=eval_pkt(f'ModuleCustomV{test.active_brg.api_version}'),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
motion_sensitivity_threshold=LIS2DW12_NON_DEFAULT_STATE_THRESHOLD,
|
|
55
|
+
s2d_transition_time=LIS2DW12_NON_DEFAULT_WAKE_UP_DURATION,
|
|
56
|
+
d2s_transition_time=LIS2DW12_NON_DEFAULT_SLEEP_DURATION)
|
|
57
57
|
elif 'Datapath' in module.__name__:
|
|
58
58
|
return cert_config.get_default_brg_pkt(test, pkt_type=eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}'),
|
|
59
59
|
tx_repetition=BRG_NON_DEFAULT_TX_REPETITION,
|
|
@@ -183,26 +183,6 @@ def test_action_send_hb(test):
|
|
|
183
183
|
if not mgmt_pkts:
|
|
184
184
|
test.add_reason("Didn't find ACTION HB pkt")
|
|
185
185
|
test.rc = TEST_FAILED
|
|
186
|
-
else:
|
|
187
|
-
for p in mgmt_pkts:
|
|
188
|
-
found = {WATERMARK: False, PACER_INC: False}
|
|
189
|
-
# effective_pacer_increment should be 0 when the default value for adaptice_pacer is set (OFF)
|
|
190
|
-
if not p[MGMT_PKT].pkt.effective_pacer_increment:
|
|
191
|
-
found[PACER_INC] = True
|
|
192
|
-
# Skip check for internal brg
|
|
193
|
-
if test.internal_brg:
|
|
194
|
-
found[WATERMARK] = True
|
|
195
|
-
break
|
|
196
|
-
# tx_queue_watermark should not be 0 when brg queue is under stress
|
|
197
|
-
elif p[MGMT_PKT].pkt.tx_queue_watermark:
|
|
198
|
-
found[WATERMARK] = True
|
|
199
|
-
break
|
|
200
|
-
if not found[WATERMARK]:
|
|
201
|
-
test.rc = TEST_FAILED
|
|
202
|
-
test.add_reason(f"tx_queue_watermark ({p[MGMT_PKT].pkt.tx_queue_watermark}) at the BRG HB pkt is zero")
|
|
203
|
-
if not found[PACER_INC]:
|
|
204
|
-
test.rc = TEST_FAILED
|
|
205
|
-
test.add_reason(f"effective_pacer_increment ({p[MGMT_PKT].pkt.effective_pacer_increment}) at the BRG HB pkt is not zero")
|
|
206
186
|
test = cert_config.config_brg_defaults(test=test, modules=[datapath_module])[0]
|
|
207
187
|
# queue can be full so need to wait a few seconds
|
|
208
188
|
if not test.internal_brg:
|
|
@@ -412,7 +392,7 @@ ACTIONS_TEST_MAP = {ag.ACTION_GW_HB: test_action_gw_hb, ag.ACTION_BLINK: test_ac
|
|
|
412
392
|
|
|
413
393
|
def run(test):
|
|
414
394
|
test = cert_common.test_prolog(test)
|
|
415
|
-
if test.rc == TEST_FAILED
|
|
395
|
+
if test.rc == TEST_FAILED:
|
|
416
396
|
return cert_common.test_epilog(test)
|
|
417
397
|
|
|
418
398
|
for param in test.params:
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
"name": "brg2brg_ota_test",
|
|
3
3
|
"module": "edge_mgmt",
|
|
4
4
|
"purpose": "TODO",
|
|
5
|
-
"
|
|
5
|
+
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
6
|
"initialCondition": "TODO",
|
|
7
7
|
"procedure": ["Test prolog", "TODO", "Test epilog"],
|
|
8
8
|
"expectedOutcome": "TODO",
|
|
9
9
|
"mandatory": 0,
|
|
10
10
|
"multiBridgeTest": 0,
|
|
11
11
|
"gwOnlyTest": 0,
|
|
12
|
+
"internalBridge": 1,
|
|
12
13
|
"allSupportedValues": ["BOOTLOADER", "APP"]
|
|
13
14
|
}
|
|
@@ -42,7 +42,7 @@ def run(test):
|
|
|
42
42
|
test.add_reason(BOARDS_MISMATCH)
|
|
43
43
|
test.rc = TEST_FAILED
|
|
44
44
|
|
|
45
|
-
if test.rc == TEST_FAILED
|
|
45
|
+
if test.rc == TEST_FAILED:
|
|
46
46
|
return cert_common.test_epilog(test, revert_brgs=True)
|
|
47
47
|
|
|
48
48
|
# Decide on source and destination bridges
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
"name": "brg2brg_ota_test",
|
|
3
3
|
"module": "edge_mgmt",
|
|
4
4
|
"purpose": "TODO",
|
|
5
|
-
"
|
|
5
|
+
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
6
|
"initialCondition": "TODO",
|
|
7
7
|
"procedure": ["Test prolog", "TODO", "Test epilog"],
|
|
8
8
|
"expectedOutcome": "TODO",
|
|
9
9
|
"mandatory": 0,
|
|
10
10
|
"multiBridgeTest": 0,
|
|
11
11
|
"gwOnlyTest": 0,
|
|
12
|
+
"internalBridge": 1,
|
|
12
13
|
"allSupportedValues": ["BOOTLOADER", "APP"]
|
|
13
14
|
}
|
|
@@ -42,7 +42,7 @@ def run(test):
|
|
|
42
42
|
test.add_reason(BOARDS_MISMATCH)
|
|
43
43
|
test.rc = TEST_FAILED
|
|
44
44
|
|
|
45
|
-
if test.rc == TEST_FAILED
|
|
45
|
+
if test.rc == TEST_FAILED:
|
|
46
46
|
return cert_common.test_epilog(test, revert_brgs=True)
|
|
47
47
|
|
|
48
48
|
# Decide on source and destination bridges
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "leds_test",
|
|
3
3
|
"module": "edge_mgmt",
|
|
4
|
-
"purpose": "
|
|
5
|
-
"
|
|
6
|
-
"initialCondition": "
|
|
7
|
-
"procedure": ["Test prolog",
|
|
8
|
-
|
|
4
|
+
"purpose": "Test the behavior and indications of LEDs during different operational states.",
|
|
5
|
+
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog",
|
|
8
|
+
"pre-stage to verify connection to a GW and associate LED color with capability",
|
|
9
|
+
"Test LED behavior during different operational states and behaviors - Advertising, Energizing, Echoing, KEEP_ALIVE, blink action & power management",
|
|
10
|
+
"Test epilog"],
|
|
11
|
+
"expectedOutcome": "LEDs behave as expected during all operational states and behaviors",
|
|
9
12
|
"mandatory": 0,
|
|
10
13
|
"multiBridgeTest": 0,
|
|
11
14
|
"gwOnlyTest": 0,
|
|
15
|
+
"internalBridge": 1,
|
|
12
16
|
"allSupportedValues": []
|
|
13
17
|
}
|