wiliot-certificate 4.5.0a3__py3-none-any.whl → 4.5.0a4__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.
- certificate/cert_common.py +33 -16
- certificate/cert_config.py +3 -3
- certificate/cert_data_sim.py +12 -9
- certificate/cert_defines.py +6 -0
- certificate/cert_gw_sim.py +3 -3
- certificate/cert_mqtt.py +5 -4
- certificate/cert_results.py +42 -32
- certificate/cert_utils.py +9 -10
- certificate/certificate.py +7 -5
- certificate/certificate_cli.py +9 -12
- certificate/tests/cloud_connectivity/acl_test/acl_test.py +13 -15
- certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +1 -1
- certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +2 -2
- certificate/tests/cloud_connectivity/connection_test/connection_test.py +4 -13
- certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.py +1 -2
- certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +12 -6
- certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +1 -1
- certificate/tests/cloud_connectivity/stress_test/stress_test.py +12 -7
- certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +1 -2
- certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +26 -20
- certificate/tests/datapath/event_ble5_test/event_ble5_test.json +1 -1
- certificate/tests/datapath/event_ble5_test/event_ble5_test.py +1 -9
- certificate/tests/datapath/event_test/event_test.json +1 -1
- certificate/tests/datapath/event_test/event_test.py +1 -7
- certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +1 -1
- certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +3 -1
- certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +2 -0
- certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +1 -1
- common/api_if/api_validation.py +6 -0
- gui_certificate/server.py +151 -58
- gui_certificate/templates/cert_run.html +86 -93
- {wiliot_certificate-4.5.0a3.dist-info → wiliot_certificate-4.5.0a4.dist-info}/METADATA +3 -3
- {wiliot_certificate-4.5.0a3.dist-info → wiliot_certificate-4.5.0a4.dist-info}/RECORD +37 -53
- certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +0 -211
- certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +0 -894
- certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +0 -184
- certificate/ag/wlt_types_ag_jsons/calibration.json +0 -490
- certificate/ag/wlt_types_ag_jsons/custom.json +0 -614
- certificate/ag/wlt_types_ag_jsons/datapath.json +0 -900
- certificate/ag/wlt_types_ag_jsons/energy2400.json +0 -670
- certificate/ag/wlt_types_ag_jsons/energySub1g.json +0 -691
- certificate/ag/wlt_types_ag_jsons/externalSensor.json +0 -727
- certificate/ag/wlt_types_ag_jsons/interface.json +0 -1095
- certificate/ag/wlt_types_ag_jsons/powerManagement.json +0 -1439
- certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -105
- certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -77
- certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -126
- certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +0 -175
- certificate/ag/wlt_types_ag_jsons/unified_sensor_pkt.json +0 -65
- {wiliot_certificate-4.5.0a3.dist-info → wiliot_certificate-4.5.0a4.dist-info}/WHEEL +0 -0
- {wiliot_certificate-4.5.0a3.dist-info → wiliot_certificate-4.5.0a4.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-4.5.0a3.dist-info → wiliot_certificate-4.5.0a4.dist-info}/licenses/LICENSE +0 -0
- {wiliot_certificate-4.5.0a3.dist-info → wiliot_certificate-4.5.0a4.dist-info}/top_level.txt +0 -0
|
@@ -25,19 +25,10 @@ def run(test):
|
|
|
25
25
|
if not cert_common.pipeline_running():
|
|
26
26
|
warning_prefix = COLORS["WARNING"]
|
|
27
27
|
warning_suffix = COLORS["ENDC"]
|
|
28
|
-
input(
|
|
29
|
-
(
|
|
30
|
-
f"{warning_prefix}The GW is expected to publish a configuration "
|
|
31
|
-
"JSON/Protobuf message through the status topic upon connecting "
|
|
32
|
-
"to mqtt:\nPlease unplug GW from power. Press enter when unplugged"
|
|
33
|
-
f"{warning_suffix}"
|
|
34
|
-
)
|
|
35
|
-
)
|
|
36
28
|
dut_mqttc.flush_pkts()
|
|
37
|
-
input(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
29
|
+
input((f'{warning_prefix}TESTING CONNECTION RECOVERY AFTER POWER CYCLE OF THE GATEWAY\n'
|
|
30
|
+
"Please unplug and then plug GW back into power. Press enter when finished"
|
|
31
|
+
f"{warning_suffix}"))
|
|
41
32
|
else:
|
|
42
33
|
# If this test runs as part of a pipeline, act like the reboot test and don't demand a manual disconnect & connect
|
|
43
34
|
utPrint(f"Publishing reboot action to {dut_mqttc.update_topic}. Awaiting reconnect.. (timeout is {TIMEOUT_IN_MINUTES} minutes)")
|
|
@@ -55,7 +46,7 @@ def run(test):
|
|
|
55
46
|
print_update_wait(5)
|
|
56
47
|
|
|
57
48
|
# generate logs
|
|
58
|
-
cert_mqtt.generate_log_file(test, "
|
|
49
|
+
cert_mqtt.generate_log_file(test, "connection")
|
|
59
50
|
|
|
60
51
|
# Analyze results
|
|
61
52
|
if gw_type is None:
|
|
@@ -3,14 +3,13 @@ from certificate.cert_prints import *
|
|
|
3
3
|
from certificate.cert_defines import *
|
|
4
4
|
from certificate.wlt_types import *
|
|
5
5
|
import certificate.cert_common as cert_common
|
|
6
|
-
import certificate.cert_utils as cert_utils
|
|
7
6
|
import certificate.cert_mqtt as cert_mqtt
|
|
8
7
|
import certificate.cert_data_sim as cert_data_sim
|
|
9
8
|
import pandas as pd
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
# DEFINES
|
|
13
|
-
UPLINK_TEST_INDICATOR =
|
|
12
|
+
UPLINK_TEST_INDICATOR = get_random_hex_str(6)
|
|
14
13
|
NUM_OF_BRGS = 3
|
|
15
14
|
|
|
16
15
|
|
|
@@ -12,7 +12,7 @@ import math
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
# DEFINES
|
|
15
|
-
STRESS_TEST_INDICATOR =
|
|
15
|
+
STRESS_TEST_INDICATOR = get_random_hex_str(6)
|
|
16
16
|
|
|
17
17
|
DUPLICATES = 1
|
|
18
18
|
ADVA_ASCII_LEN = 12
|
|
@@ -76,16 +76,19 @@ def run(test):
|
|
|
76
76
|
|
|
77
77
|
cert_mqtt.dump_pkts(test, log=str(pps))
|
|
78
78
|
phase_pkts_received = cert_mqtt.get_all_aggregated_data_pkts(test.get_mqttc_by_target(DUT), indicator=STRESS_TEST_INDICATOR)
|
|
79
|
-
|
|
79
|
+
valid, reason = cert_common.validate_received_packets(phase_pkts_received)
|
|
80
|
+
test.add_phase(cert_utils.Phase(pps))
|
|
81
|
+
if valid is False:
|
|
82
|
+
test.set_phase_rc(str(pps), TEST_FAILED)
|
|
83
|
+
test.add_phase_reason(str(pps), reason)
|
|
84
|
+
utPrint(f"Phase {pps} failed validation: {reason}", "RED")
|
|
85
|
+
continue
|
|
80
86
|
test, received_pps = cert_common.stress_analysis(
|
|
81
87
|
test, pps, generated_payloads,
|
|
82
88
|
[(p[ALIAS_BRIDGE_ID] + p[AGGREGATED_PAYLOAD]) for p in phase_pkts_received])
|
|
83
89
|
results.extend([pps, received_pps])
|
|
84
90
|
cert_mqtt.generate_log_file(test, str(pps))
|
|
85
91
|
|
|
86
|
-
test.add_phase(cert_utils.Phase(pps))
|
|
87
|
-
test.set_phase_rc(str(pps), test.rc)
|
|
88
|
-
test.add_phase_reason(str(pps), test.reason)
|
|
89
92
|
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
90
93
|
break # break the whole for loop and keep the test as failed
|
|
91
94
|
test.reset_result() # reset result and continue to next param
|
|
@@ -94,6 +97,9 @@ def run(test):
|
|
|
94
97
|
cert_config.gw_action(test, f'{cert_gw_sim.BLE_SIM_INIT} 0', TESTER)
|
|
95
98
|
|
|
96
99
|
# Generate stress test graphs
|
|
97
|
-
|
|
100
|
+
if len(data_pkts_received) > 0:
|
|
101
|
+
cert_common.generate_graph_stress_test(test, results, data_pkts_received)
|
|
102
|
+
else:
|
|
103
|
+
utPrint("No data packets received - skipping graph generation", "RED")
|
|
98
104
|
|
|
99
105
|
return cert_common.test_epilog(test)
|
|
@@ -77,7 +77,7 @@ def main():
|
|
|
77
77
|
cert_common.wait_time_n_print(2)
|
|
78
78
|
|
|
79
79
|
# Print results
|
|
80
|
-
cert_results.generate_results_files(
|
|
80
|
+
cert_results.generate_results_files(html=True, pdf=True, failures=failures,
|
|
81
81
|
skipped=skipped, start_time=start_time, tests=tests)
|
|
82
82
|
if not pipeline_running():
|
|
83
83
|
webbrowser.open('file://' + os.path.realpath(os.path.join(ARTIFACTS_DIR, UT_RESULT_FILE_PDF)))
|
|
@@ -12,7 +12,7 @@ import math
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
# DEFINES
|
|
15
|
-
STRESS_TEST_INDICATOR =
|
|
15
|
+
STRESS_TEST_INDICATOR = get_random_hex_str(6)
|
|
16
16
|
|
|
17
17
|
DUPLICATES = 1
|
|
18
18
|
ADVA_ASCII_LEN = 12
|
|
@@ -74,16 +74,19 @@ def run(test):
|
|
|
74
74
|
|
|
75
75
|
cert_mqtt.dump_pkts(test, log=str(pps))
|
|
76
76
|
phase_pkts_received = cert_mqtt.get_all_data_pkts(test.get_mqttc_by_target(DUT), indicator=STRESS_TEST_INDICATOR)
|
|
77
|
-
|
|
77
|
+
test.add_phase(cert_utils.Phase(pps))
|
|
78
|
+
valid, reason = cert_common.validate_received_packets(phase_pkts_received)
|
|
79
|
+
if valid is False:
|
|
80
|
+
test.set_phase_rc(str(pps), TEST_FAILED)
|
|
81
|
+
test.add_phase_reason(str(pps), reason)
|
|
82
|
+
utPrint(f"Phase {pps} failed validation: {reason}", "RED")
|
|
83
|
+
continue
|
|
78
84
|
test, received_pps = cert_common.stress_analysis(
|
|
79
85
|
test, pps, generated_payloads,
|
|
80
86
|
[(p[ALIAS_BRIDGE_ID] + p[PAYLOAD]) for p in phase_pkts_received])
|
|
81
87
|
results.extend([pps, received_pps])
|
|
82
88
|
cert_mqtt.generate_log_file(test, str(pps))
|
|
83
89
|
|
|
84
|
-
test.add_phase(cert_utils.Phase(pps))
|
|
85
|
-
test.set_phase_rc(str(pps), test.rc)
|
|
86
|
-
test.add_phase_reason(str(pps), test.reason)
|
|
87
90
|
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
88
91
|
break # break the whole for loop and keep the test as failed
|
|
89
92
|
test.reset_result() # reset result and continue to next param
|
|
@@ -91,7 +94,9 @@ def run(test):
|
|
|
91
94
|
test_pkts_received.extend(test.get_mqttc_by_target(DUT)._userdata[PKTS].data)
|
|
92
95
|
cert_config.gw_action(test, f'{cert_gw_sim.BLE_SIM_INIT} 0', TESTER)
|
|
93
96
|
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
if len(data_pkts_received) > 0:
|
|
98
|
+
cert_common.generate_graph_stress_test(test, results, data_pkts_received)
|
|
99
|
+
else:
|
|
100
|
+
utPrint("No data packets received - skipping graph generation", "RED")
|
|
96
101
|
|
|
97
102
|
return cert_common.test_epilog(test)
|
|
@@ -4,14 +4,13 @@ from certificate.cert_prints import *
|
|
|
4
4
|
from certificate.cert_defines import *
|
|
5
5
|
from certificate.wlt_types import *
|
|
6
6
|
import certificate.cert_common as cert_common
|
|
7
|
-
import certificate.cert_utils as cert_utils
|
|
8
7
|
import certificate.cert_mqtt as cert_mqtt
|
|
9
8
|
import certificate.cert_config as cert_config
|
|
10
9
|
import certificate.cert_data_sim as cert_data_sim
|
|
11
10
|
from certificate.cert_gw_sim import GW_CERT_TESTER
|
|
12
11
|
|
|
13
12
|
# DEFINES
|
|
14
|
-
EXT_ADV_TEST_INDICATOR =
|
|
13
|
+
EXT_ADV_TEST_INDICATOR = get_random_hex_str(6)
|
|
15
14
|
EXPECTED_REPEAT_COUNT = 7
|
|
16
15
|
|
|
17
16
|
|
|
@@ -4,7 +4,6 @@ from certificate.cert_defines import *
|
|
|
4
4
|
from certificate.wlt_types import *
|
|
5
5
|
from common.api_if.api_validation import api_validation
|
|
6
6
|
import certificate.cert_common as cert_common
|
|
7
|
-
import certificate.cert_utils as cert_utils
|
|
8
7
|
import certificate.cert_mqtt as cert_mqtt
|
|
9
8
|
import certificate.cert_data_sim as cert_data_sim
|
|
10
9
|
import pandas as pd
|
|
@@ -13,24 +12,27 @@ import pandas as pd
|
|
|
13
12
|
# DEFINES
|
|
14
13
|
|
|
15
14
|
API_VALIDATION = "API Validation"
|
|
16
|
-
UPLINK_TEST_INDICATOR =
|
|
15
|
+
UPLINK_TEST_INDICATOR = get_random_hex_str(6)
|
|
17
16
|
NUM_OF_BRGS = 3
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
# HELPER FUNCTIONS
|
|
21
|
-
def uplink_analysis(test,
|
|
20
|
+
def uplink_analysis(test, sent_pkts, received_pkts, pkt_type):
|
|
22
21
|
if len(received_pkts) == 0:
|
|
23
22
|
test.set_phase_rc(pkt_type, TEST_FAILED)
|
|
24
23
|
test.add_phase_reason(pkt_type, "No packets were received!")
|
|
25
|
-
return test
|
|
24
|
+
return test
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
for
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
# Verify packets were received from NUM_OF_BRGS bridges
|
|
27
|
+
received_brgs = len(set([p[ALIAS_BRIDGE_ID] for p in received_pkts]))
|
|
28
|
+
if received_brgs != NUM_OF_BRGS:
|
|
29
|
+
test.set_phase_rc(pkt_type, TEST_FAILED)
|
|
30
|
+
test.add_phase_reason(pkt_type, f"Received packets from {received_brgs} bridges instead of {NUM_OF_BRGS} bridges!")
|
|
31
|
+
return test
|
|
32
32
|
|
|
33
|
+
_sent_pkts = [p.get_pkt()[12:] for p in sent_pkts]
|
|
33
34
|
sent_df = pd.DataFrame(_sent_pkts, columns=[PACKETS])
|
|
35
|
+
received_pkts = [p[PAYLOAD] for p in received_pkts]
|
|
34
36
|
received_df = pd.DataFrame(received_pkts, columns=[PACKETS])
|
|
35
37
|
|
|
36
38
|
merged_df = pd.merge(sent_df, received_df, on=PACKETS, how='inner')
|
|
@@ -47,16 +49,17 @@ def uplink_analysis(test, pkts, received_pkts, pkt_type):
|
|
|
47
49
|
if pkts_sent_count == 0:
|
|
48
50
|
test.set_phase_rc(pkt_type, TEST_FAILED)
|
|
49
51
|
test.add_phase_reason(pkt_type, "No packets were sent!")
|
|
50
|
-
return test
|
|
52
|
+
return test
|
|
51
53
|
|
|
52
54
|
percentage_received = round(pkts_received_count * 100 / pkts_sent_count)
|
|
53
55
|
|
|
54
56
|
# PASS/FAIL logic
|
|
55
57
|
if percentage_received < 80:
|
|
56
|
-
test.
|
|
57
|
-
test.
|
|
58
|
+
test.set_phase_rc(pkt_type, TEST_FAILED)
|
|
59
|
+
test.add_phase_reason(pkt_type, f'{percentage_received}% of {pkt_type} packets received')
|
|
58
60
|
else:
|
|
59
|
-
test.
|
|
61
|
+
test.set_phase_rc(pkt_type, TEST_PASSED)
|
|
62
|
+
test.add_phase_reason(pkt_type, f'{percentage_received}% of {pkt_type} packets received')
|
|
60
63
|
|
|
61
64
|
return test
|
|
62
65
|
|
|
@@ -134,22 +137,25 @@ def run(test):
|
|
|
134
137
|
all_data_messages_in_test.extend(dut_mqttc._userdata[PKTS].data)
|
|
135
138
|
all_data_pkts.extend(cert_mqtt.get_all_data_pkts(dut_mqttc))
|
|
136
139
|
recieved_pkts = cert_mqtt.get_all_data_pkts(dut_mqttc, indicator=UPLINK_TEST_INDICATOR)
|
|
140
|
+
valid, reason = cert_common.validate_received_packets(recieved_pkts)
|
|
141
|
+
if valid is False:
|
|
142
|
+
test.set_phase_rc(param.name, TEST_FAILED)
|
|
143
|
+
test.add_phase_reason(param.name, reason)
|
|
144
|
+
utPrint(f"Phase {param.name} failed validation: {reason}", "RED")
|
|
145
|
+
continue
|
|
137
146
|
|
|
138
|
-
test = uplink_analysis(test, pkts,
|
|
147
|
+
test = uplink_analysis(test, pkts, recieved_pkts, param.name)
|
|
139
148
|
|
|
140
149
|
cert_mqtt.generate_log_file(test, param.name)
|
|
141
|
-
field_functionality_pass_fail_print(test, 'pkt_type', value=param.name)
|
|
142
|
-
test.
|
|
143
|
-
test.add_phase_reason(param.name, test.reason)
|
|
144
|
-
if test.rc == TEST_FAILED:
|
|
150
|
+
field_functionality_pass_fail_print(test.get_phase_by_name(param.name), 'pkt_type', value=param.name)
|
|
151
|
+
if test.get_phase_by_name(param.name).rc == TEST_FAILED:
|
|
145
152
|
if test.exit_on_param_failure:
|
|
146
153
|
break # break the whole for loop and keep the test as failed
|
|
147
154
|
test.reset_result() # reset result and continue to next param
|
|
148
155
|
|
|
149
156
|
# Other Validations
|
|
150
157
|
# Api Validation
|
|
151
|
-
|
|
152
|
-
test = api_validation(test)
|
|
158
|
+
test = api_validation(test)
|
|
153
159
|
test = cert_common.wiliot_pkts_validation(test, all_data_messages_in_test, all_data_pkts)
|
|
154
160
|
|
|
155
161
|
# Geolocation phase
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"dataSimOnlyTest": 1,
|
|
15
|
-
"allSupportedValues": ["rssi_event", "new_tag_event_seconds", "new_tag_event_minutes", "
|
|
15
|
+
"allSupportedValues": ["rssi_event", "new_tag_event_seconds", "new_tag_event_minutes", "temp_event", "tx_rate_event"]
|
|
16
16
|
}
|
|
@@ -7,17 +7,9 @@ import certificate.cert_config as cert_config
|
|
|
7
7
|
|
|
8
8
|
NEW_TAG_EVENT_SCAN_TIME = 100 # in seconds
|
|
9
9
|
TAG_EVENT_SCAN_TIME = 60 # in seconds
|
|
10
|
-
NEW_TAG_HOURS_EVENT_SCAN_TIME = 62 * 60 # 62 minutes
|
|
11
10
|
RSSI_MOVEMENT_THRESHOLD = 15
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
def test_new_tag_event_hours(test, phase, datapath_module):
|
|
15
|
-
values = [ag.EVENT_TIME_UNIT_HOURS, TEST_EVENT_WINDOW_HR_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_NEW_TAG, 0]
|
|
16
|
-
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_HOURS_EVENT_SCAN_TIME,
|
|
17
|
-
ag.EVENT_TIME_UNIT_HOURS, ble5_test=True,
|
|
18
|
-
pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
|
|
19
|
-
|
|
20
|
-
|
|
21
13
|
def test_new_tag_event_minutes(test, phase, datapath_module):
|
|
22
14
|
values = [ag.EVENT_TIME_UNIT_MINUTES, TEST_EVENT_WINDOW_MIN_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_NEW_TAG, 0]
|
|
23
15
|
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME,
|
|
@@ -54,7 +46,7 @@ def test_rssi_event(test, phase, datapath_module):
|
|
|
54
46
|
|
|
55
47
|
|
|
56
48
|
EVENT_TEST_MAP = {"rssi_event": test_rssi_event, "new_tag_event_seconds": test_new_tag_event_seconds,
|
|
57
|
-
"new_tag_event_minutes": test_new_tag_event_minutes,
|
|
49
|
+
"new_tag_event_minutes": test_new_tag_event_minutes,
|
|
58
50
|
"temp_event": test_temp_event, "tx_rate_event": test_tx_rate_event}
|
|
59
51
|
|
|
60
52
|
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"dataSimOnlyTest": 1,
|
|
15
|
-
"allSupportedValues": ["rssi_event", "new_tag_event_seconds", "new_tag_event_minutes", "
|
|
15
|
+
"allSupportedValues": ["rssi_event", "new_tag_event_seconds", "new_tag_event_minutes", "temp_event", "tx_rate_event"]
|
|
16
16
|
}
|
|
@@ -7,15 +7,9 @@ import certificate.cert_config as cert_config
|
|
|
7
7
|
|
|
8
8
|
NEW_TAG_EVENT_SCAN_TIME = 100 # in seconds
|
|
9
9
|
TAG_EVENT_SCAN_TIME = 60 # in seconds
|
|
10
|
-
NEW_TAG_HOURS_EVENT_SCAN_TIME = 62 * 60 # 62 minutes
|
|
11
10
|
RSSI_MOVEMENT_THRESHOLD = 15
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
def test_new_tag_event_hours(test, phase, datapath_module):
|
|
15
|
-
values = [ag.EVENT_TIME_UNIT_HOURS, TEST_EVENT_WINDOW_HR_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_NEW_TAG, 0]
|
|
16
|
-
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_HOURS_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_HOURS)
|
|
17
|
-
|
|
18
|
-
|
|
19
13
|
def test_new_tag_event_minutes(test, phase, datapath_module):
|
|
20
14
|
values = [ag.EVENT_TIME_UNIT_MINUTES, TEST_EVENT_WINDOW_MIN_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_NEW_TAG, 0]
|
|
21
15
|
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_MINUTES)
|
|
@@ -45,7 +39,7 @@ def test_rssi_event(test, phase, datapath_module):
|
|
|
45
39
|
|
|
46
40
|
|
|
47
41
|
EVENT_TEST_MAP = {"rssi_event": test_rssi_event, "new_tag_event_seconds": test_new_tag_event_seconds,
|
|
48
|
-
"new_tag_event_minutes": test_new_tag_event_minutes,
|
|
42
|
+
"new_tag_event_minutes": test_new_tag_event_minutes,
|
|
49
43
|
"temp_event": test_temp_event, "tx_rate_event": test_tx_rate_event}
|
|
50
44
|
|
|
51
45
|
|
|
@@ -31,7 +31,7 @@ def cal_scan_time(test, delay, pacer_interval):
|
|
|
31
31
|
|
|
32
32
|
def scan_and_compare(test, pacer_interval, delay, expected_TBC_value):
|
|
33
33
|
|
|
34
|
-
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=1, duplicates=3, delay=delay, pkt_types=[0], pixels_type=
|
|
34
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=1, duplicates=3, delay=delay, pkt_types=[0], pixels_type=GEN2)
|
|
35
35
|
pixel_sim_thread.start()
|
|
36
36
|
test, scan_time = cal_scan_time(test, delay, pacer_interval)
|
|
37
37
|
df = cert_common.data_scan(test, scan_time=scan_time, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
@@ -284,7 +284,7 @@ def test_rx_tx(test):
|
|
|
284
284
|
print(rec_sig_ind_pkts) # TODO: logging print(debug)
|
|
285
285
|
|
|
286
286
|
# Analyzing tester performance as receiver
|
|
287
|
-
utPrint(f"Analyzing DUT {
|
|
287
|
+
utPrint(f"Analyzing DUT {dut.id_str} performance as a Transmitter\n", "BOLD")
|
|
288
288
|
rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=tester, tx_brg=dut)
|
|
289
289
|
if cert_common.sig_ind_pkts_fail_analysis(tx_brg=dut, rx_brg=tester, cycles=NUM_OF_SCANNING_CYCLE, received_pkts=rec_sig_ind_pkts):
|
|
290
290
|
test.rc = TEST_FAILED
|
|
@@ -323,6 +323,8 @@ def run(test):
|
|
|
323
323
|
return cert_common.test_epilog(test, revert_brgs=True,
|
|
324
324
|
modules=[dut.datapath],
|
|
325
325
|
ble5=test.dut_is_bridge())
|
|
326
|
+
if test.dut_is_bridge():
|
|
327
|
+
wait_time_n_print(BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to BLE5_MAX_DURATION_SEC
|
|
326
328
|
# Configure TESTER to scan ble5 channel during all the test
|
|
327
329
|
test = cert_config.brg_configure(test, fields=[BRG_RX_CHANNEL],
|
|
328
330
|
values=[ag.RX_CHANNEL_10_500K],
|
|
@@ -161,6 +161,8 @@ def run(test):
|
|
|
161
161
|
# Revert DUT and TESTER to defaults here and not in epilog
|
|
162
162
|
test = cert_config.config_brg_defaults(test, modules=[dut.datapath, dut.energy2400],
|
|
163
163
|
ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
|
|
164
|
+
if test.dut_is_bridge():
|
|
165
|
+
wait_time_n_print(2 * BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to 2 * BLE5_MAX_DURATION_SEC
|
|
164
166
|
if test.rc == TEST_FAILED:
|
|
165
167
|
test.add_reason("Failed to revert dut to defaults")
|
|
166
168
|
else:
|
|
@@ -288,7 +288,7 @@ def test_rx_tx(test):
|
|
|
288
288
|
print(rec_sig_ind_pkts) # TODO: logging print(debug)
|
|
289
289
|
|
|
290
290
|
# Analyzing tester performance as receiver
|
|
291
|
-
utPrint(f"Analyzing DUT {
|
|
291
|
+
utPrint(f"Analyzing DUT {dut.id_str} performance as a Transmitter\n", "BOLD")
|
|
292
292
|
rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=tester, tx_brg=dut)
|
|
293
293
|
if cert_common.sig_ind_pkts_fail_analysis(tx_brg=dut, rx_brg=tester, cycles=NUM_OF_SCANNING_CYCLE, received_pkts=rec_sig_ind_pkts):
|
|
294
294
|
test.rc = TEST_FAILED
|
common/api_if/api_validation.py
CHANGED
|
@@ -25,6 +25,12 @@ def api_validation(test):
|
|
|
25
25
|
api_validation_phase.reason = "API validation is skipped for protobuf messages"
|
|
26
26
|
test.add_phase(api_validation_phase)
|
|
27
27
|
return test
|
|
28
|
+
elif not test.dut.gw_api_version:
|
|
29
|
+
utPrint("API validation is skipped because no API version was specified", "WARNING")
|
|
30
|
+
api_validation_phase.rc = TEST_FAILED
|
|
31
|
+
api_validation_phase.reason = "API validation is skipped because no API version was specified"
|
|
32
|
+
test.add_phase(api_validation_phase)
|
|
33
|
+
return test
|
|
28
34
|
else:
|
|
29
35
|
def validate_message(message: dict, msg_type=MESSAGE_TYPES.DATA.value) -> tuple[bool, str]:
|
|
30
36
|
json_path = pkg_resources.resource_filename(__name__, f"{test.dut.gw_api_version}/{msg_type}.json")
|