wiliot-certificate 1.3.0a1__py3-none-any.whl → 1.4.0a1__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/__init__.py +0 -0
- brg_certificate/ag/energous_v0_defines.py +925 -0
- brg_certificate/ag/energous_v1_defines.py +931 -0
- brg_certificate/ag/energous_v2_defines.py +925 -0
- brg_certificate/ag/energous_v3_defines.py +925 -0
- brg_certificate/ag/energous_v4_defines.py +925 -0
- brg_certificate/ag/fanstel_lan_v0_defines.py +925 -0
- brg_certificate/ag/fanstel_lte_v0_defines.py +925 -0
- brg_certificate/ag/fanstel_wifi_v0_defines.py +925 -0
- brg_certificate/ag/minew_lte_v0_defines.py +925 -0
- brg_certificate/ag/wlt_cmd_if.html +102 -0
- brg_certificate/ag/wlt_types.html +6114 -0
- brg_certificate/ag/wlt_types_ag.py +7840 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +142 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +785 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +139 -0
- brg_certificate/ag/wlt_types_ag_jsons/calibration.json +394 -0
- brg_certificate/ag/wlt_types_ag_jsons/custom.json +515 -0
- brg_certificate/ag/wlt_types_ag_jsons/datapath.json +672 -0
- brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +550 -0
- brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +595 -0
- brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +598 -0
- brg_certificate/ag/wlt_types_ag_jsons/interface.json +938 -0
- brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +1234 -0
- brg_certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +105 -0
- brg_certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +77 -0
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +61 -0
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +110 -0
- brg_certificate/brg_certificate.py +191 -0
- brg_certificate/brg_certificate_cli.py +47 -0
- brg_certificate/cert_common.py +828 -0
- brg_certificate/cert_config.py +395 -0
- brg_certificate/cert_data_sim.py +188 -0
- brg_certificate/cert_defines.py +337 -0
- brg_certificate/cert_gw_sim.py +285 -0
- brg_certificate/cert_mqtt.py +373 -0
- brg_certificate/cert_prints.py +181 -0
- brg_certificate/cert_protobuf.py +88 -0
- brg_certificate/cert_results.py +300 -0
- brg_certificate/cert_utils.py +358 -0
- brg_certificate/certificate_sanity_test_list.txt +36 -0
- brg_certificate/certificate_test_list.txt +43 -0
- brg_certificate/config/eclipse.json +10 -0
- brg_certificate/config/hivemq.json +10 -0
- brg_certificate/config/mosquitto.json +10 -0
- brg_certificate/config/mosquitto.md +95 -0
- brg_certificate/config/wiliot-dev.json +10 -0
- brg_certificate/restore_brg.py +59 -0
- brg_certificate/tests/calibration/interval_test/interval_test.json +13 -0
- brg_certificate/tests/calibration/interval_test/interval_test.py +28 -0
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +13 -0
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +28 -0
- brg_certificate/tests/calibration/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +70 -0
- brg_certificate/tests/datapath/adaptive_pacer_algo_test/adaptive_pacer_algo_test.json +13 -0
- brg_certificate/tests/datapath/adaptive_pacer_algo_test/adaptive_pacer_algo_test.py +76 -0
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.json +13 -0
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +83 -0
- brg_certificate/tests/datapath/output_power_test/output_power_test.json +13 -0
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +27 -0
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +13 -0
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +43 -0
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +13 -0
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +63 -0
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.json +13 -0
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +50 -0
- brg_certificate/tests/datapath/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +28 -0
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +13 -0
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +51 -0
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +13 -0
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +54 -0
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +13 -0
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +55 -0
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +13 -0
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +73 -0
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +13 -0
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +41 -0
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +21 -0
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +184 -0
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +21 -0
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +210 -0
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +30 -0
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +203 -0
- brg_certificate/tests/datapath/stress_test/stress_test.json +30 -0
- brg_certificate/tests/datapath/stress_test/stress_test.py +210 -0
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +13 -0
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +113 -0
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +13 -0
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +79 -0
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +13 -0
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +432 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +13 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +94 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +13 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +87 -0
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +13 -0
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +210 -0
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +13 -0
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +83 -0
- brg_certificate/tests/edge_mgmt/stat_test/stat_test.json +13 -0
- brg_certificate/tests/edge_mgmt/stat_test/stat_test.py +48 -0
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +13 -0
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +26 -0
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +13 -0
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +27 -0
- brg_certificate/tests/energy2400/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +28 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +13 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +398 -0
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +13 -0
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +153 -0
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +13 -0
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +264 -0
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +13 -0
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +27 -0
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +26 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +13 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +397 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +13 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +27 -0
- brg_certificate/wltPb_pb2.py +72 -0
- brg_certificate/wltPb_pb2.pyi +227 -0
- brg_certificate/wlt_types.py +114 -0
- gw_certificate/api/extended_api.py +7 -1531
- gw_certificate/api_if/200/data.json +106 -0
- gw_certificate/api_if/200/logs.json +12 -0
- gw_certificate/api_if/200/status.json +47 -0
- gw_certificate/api_if/201/data.json +98 -0
- gw_certificate/api_if/201/logs.json +12 -0
- gw_certificate/api_if/201/status.json +53 -0
- gw_certificate/api_if/202/data.json +83 -0
- gw_certificate/api_if/202/logs.json +12 -0
- gw_certificate/api_if/202/status.json +60 -0
- gw_certificate/api_if/203/data.json +85 -0
- gw_certificate/api_if/203/logs.json +12 -0
- gw_certificate/api_if/203/status.json +63 -0
- gw_certificate/api_if/204/data.json +85 -0
- gw_certificate/api_if/204/logs.json +12 -0
- gw_certificate/api_if/204/status.json +63 -0
- gw_certificate/api_if/205/data.json +85 -0
- gw_certificate/api_if/205/logs.json +12 -0
- gw_certificate/api_if/205/status.json +63 -0
- gw_certificate/api_if/api_validation.py +0 -2
- gw_certificate/common/analysis_data_bricks.py +18 -1413
- gw_certificate/common/debug.py +0 -21
- gw_certificate/common/utils.py +1 -212
- gw_certificate/common/utils_defines.py +0 -87
- gw_certificate/gw_certificate.py +9 -7
- gw_certificate/gw_certificate_cli.py +39 -23
- gw_certificate/interface/4.4.52_app.zip +0 -0
- gw_certificate/interface/4.4.52_sd_bl_app.zip +0 -0
- gw_certificate/interface/ble_simulator.py +0 -32
- gw_certificate/interface/if_defines.py +1 -0
- gw_certificate/interface/mqtt.py +96 -19
- gw_certificate/interface/nrfutil-linux +0 -0
- gw_certificate/interface/nrfutil-mac +0 -0
- gw_certificate/interface/nrfutil.exe +0 -0
- gw_certificate/interface/pkt_generator.py +0 -82
- gw_certificate/interface/uart_if.py +73 -43
- gw_certificate/templates/results.html +1 -1
- gw_certificate/tests/__init__.py +1 -2
- gw_certificate/tests/actions.py +134 -9
- gw_certificate/tests/connection.py +10 -5
- gw_certificate/tests/downlink.py +2 -4
- gw_certificate/tests/generic.py +62 -12
- gw_certificate/tests/registration.py +78 -27
- gw_certificate/tests/static/generated_packet_table.py +12 -48
- gw_certificate/tests/static/packet_table.csv +10048 -10048
- gw_certificate/tests/static/references.py +2 -1
- gw_certificate/tests/static/uplink_defines.py +0 -7
- gw_certificate/tests/throughput.py +7 -12
- gw_certificate/tests/uplink.py +83 -43
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a1.dist-info}/METADATA +59 -8
- wiliot_certificate-1.4.0a1.dist-info/RECORD +198 -0
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a1.dist-info}/WHEEL +1 -1
- wiliot_certificate-1.4.0a1.dist-info/entry_points.txt +3 -0
- wiliot_certificate-1.4.0a1.dist-info/top_level.txt +2 -0
- gw_certificate/interface/packet_error.py +0 -22
- wiliot_certificate-1.3.0a1.dist-info/RECORD +0 -51
- wiliot_certificate-1.3.0a1.dist-info/entry_points.txt +0 -2
- wiliot_certificate-1.3.0a1.dist-info/top_level.txt +0 -1
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a1.dist-info}/LICENSE +0 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
# Tests definitions
|
|
8
|
+
BRG_REBOOT_TIME = 30
|
|
9
|
+
NUM_OF_LED_BLINKS_ACTION = 10
|
|
10
|
+
LEDS_KEEP_ALIVE_PERIOD = 10
|
|
11
|
+
LEDS_KEEP_ALIVE_BLINKS_NUM = 2
|
|
12
|
+
ENERGIZING_LED_COLOR = "RED"
|
|
13
|
+
BOARD_TYPE_2_ECHOING_LED_COLLOR_DICT = {ag.BOARD_TYPE_FANSTEL_SINGLE_BAND_V0: "Green",
|
|
14
|
+
ag.BOARD_TYPE_FANSTEL_DUAL_BAND_V0: "Green",
|
|
15
|
+
ag.BOARD_TYPE_MINEW_SINGLE_BAND_V0: "Green",
|
|
16
|
+
ag.BOARD_TYPE_MINEW_DUAL_BAND_V0: "Blue",
|
|
17
|
+
ag.BOARD_TYPE_ENERGOUS_V0: "Blue",
|
|
18
|
+
ag.BOARD_TYPE_ENERGOUS_V1: "Blue",
|
|
19
|
+
ag.BOARD_TYPE_ENERGOUS_V2: "Blue",
|
|
20
|
+
ag.BOARD_TYPE_ENERGOUS_V3: "Blue",
|
|
21
|
+
ag.BOARD_TYPE_ENERGOUS_V4: "Blue",
|
|
22
|
+
ag.BOARD_TYPE_ERM_V0: "Blue",
|
|
23
|
+
ag.BOARD_TYPE_ERM_V1: "Blue",
|
|
24
|
+
ag.BOARD_TYPE_KOAMTAC_V0: "Green",
|
|
25
|
+
ag.BOARD_TYPE_MINEW_POE_V0: "Yellow"}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# Helper functions
|
|
29
|
+
def compare_versions(gw_version, brg_version):
|
|
30
|
+
# Split versions into components
|
|
31
|
+
gw_version_parts = gw_version.split('.')
|
|
32
|
+
brg_version_parts = brg_version.split('.')
|
|
33
|
+
|
|
34
|
+
# Compare each component
|
|
35
|
+
if (len(gw_version_parts) == 3 and len(brg_version_parts) == 3 and
|
|
36
|
+
gw_version_parts[0] == brg_version_parts[0] and
|
|
37
|
+
gw_version_parts[1] == brg_version_parts[1] and
|
|
38
|
+
gw_version_parts[2] == brg_version_parts[2]):
|
|
39
|
+
return True
|
|
40
|
+
else:
|
|
41
|
+
return False
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def run(test):
|
|
45
|
+
test = cert_common.test_prolog(test)
|
|
46
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
47
|
+
return cert_common.test_epilog(test)
|
|
48
|
+
|
|
49
|
+
test.mqttc.flush_pkts()
|
|
50
|
+
# --------------------- Pre stage ------------------------------ #
|
|
51
|
+
utPrint("Pre state - Please make sure you have a registerd GW connected to the UT BRG!!!", "WARNING")
|
|
52
|
+
utPrint("Press 'y' if the GW is registered and connected to the UT BRG", "BLUE")
|
|
53
|
+
value = cert_common.check_input_n_try_again(input())
|
|
54
|
+
test = cert_common.value_check_if_y(test, value, "PRE STAGE")
|
|
55
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
56
|
+
return cert_common.test_epilog(test)
|
|
57
|
+
utPrint("GW is registered and connected to UT BRG!", "GREEN")
|
|
58
|
+
|
|
59
|
+
# Determine LED colors according to the board type
|
|
60
|
+
test, interface = cert_common.get_module_if_pkt(test)
|
|
61
|
+
if test.rc == TEST_FAILED:
|
|
62
|
+
utPrint("Failed to get the GW interface packet!", "RED")
|
|
63
|
+
return cert_common.test_epilog(test)
|
|
64
|
+
board_type = interface.board_type
|
|
65
|
+
if board_type not in BOARD_TYPE_2_ECHOING_LED_COLLOR_DICT:
|
|
66
|
+
utPrint(f"Unknown board type: {board_type}", "RED")
|
|
67
|
+
return cert_common.test_epilog(test)
|
|
68
|
+
else:
|
|
69
|
+
ECHOING_LED_COLOR = BOARD_TYPE_2_ECHOING_LED_COLLOR_DICT[board_type]
|
|
70
|
+
if board_type == ag.BOARD_TYPE_MINEW_POE_V0:
|
|
71
|
+
NUS_INDICATION_LED_COLOR = "Green"
|
|
72
|
+
else:
|
|
73
|
+
NUS_INDICATION_LED_COLOR = ECHOING_LED_COLOR
|
|
74
|
+
|
|
75
|
+
# Version verification
|
|
76
|
+
gw_ble_version = test.gw_orig_versions.get(BLE_VERSION)
|
|
77
|
+
bridge_ble_version = test.active_brg.version
|
|
78
|
+
if gw_ble_version and bridge_ble_version:
|
|
79
|
+
if compare_versions(gw_ble_version, bridge_ble_version) is False:
|
|
80
|
+
utPrint("Versions are not alligned - Please make sure the BLE versions are the same", "RED")
|
|
81
|
+
return cert_common.test_epilog(test)
|
|
82
|
+
else:
|
|
83
|
+
utPrint("GW & BRG versions are the same - Pre stage Passed!", "GREEN")
|
|
84
|
+
else:
|
|
85
|
+
utPrint("Failed to get the BLE versions, please try again!", "RED")
|
|
86
|
+
return cert_common.test_epilog(test)
|
|
87
|
+
|
|
88
|
+
utPrint("Starting examining the LED's, Please pay attention to the following steps!", "WARNING")
|
|
89
|
+
# --------------------- Advertising LED --------------------- #
|
|
90
|
+
utPrint("Advertising LED check - sending Reboot action to BRG!", "HEADER")
|
|
91
|
+
cert_config.send_brg_action(test, ag.ACTION_REBOOT)
|
|
92
|
+
reboot_start_ts = int(datetime.datetime.now().timestamp())
|
|
93
|
+
utPrint(f"The BRG was rebooted - is the advertising LED ({NUS_INDICATION_LED_COLOR}) continuously "
|
|
94
|
+
"on and all other LED's are off? (Y/N)", "BLUE")
|
|
95
|
+
value = cert_common.check_input_n_try_again(input())
|
|
96
|
+
test = cert_common.value_check_if_y(test, value, "Advertising LED check")
|
|
97
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
98
|
+
return cert_common.test_epilog(test)
|
|
99
|
+
# wait for advertisement phase to finish
|
|
100
|
+
if (int(datetime.datetime.now().timestamp()) - reboot_start_ts < BRG_REBOOT_TIME):
|
|
101
|
+
utPrint(f"Now we'll wait for the BRG to finish his {BRG_REBOOT_TIME} advertismeent!", "BLUE")
|
|
102
|
+
cert_common.wait_time_n_print(BRG_REBOOT_TIME - (int(datetime.datetime.now().timestamp()) - reboot_start_ts))
|
|
103
|
+
utPrint("Advertisement LED check completed!\n", "GREEN")
|
|
104
|
+
|
|
105
|
+
# ------------------ Eenergizing LED check ------------------ #
|
|
106
|
+
# Energizing is ON (Non default for SUB1G, but for UT purposses we'll set it to ON)
|
|
107
|
+
utPrint("Energizing LED check!", "HEADER")
|
|
108
|
+
utPrint(f"Is the Energizing LED ({ENERGIZING_LED_COLOR}) on? (Y/N)", "BLUE")
|
|
109
|
+
value = cert_common.check_input_n_try_again(input())
|
|
110
|
+
test = cert_common.value_check_if_y(test, value, "Eenergizing LED check")
|
|
111
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
112
|
+
return cert_common.test_epilog(test)
|
|
113
|
+
|
|
114
|
+
# Energizing is OFF
|
|
115
|
+
# Default cfg for 2400 is 0 == no energizing so we only eliminating sub1g energizing
|
|
116
|
+
utPrint("Configuring the BRG to no energizing in sub1g", "WARNING")
|
|
117
|
+
sub1g_module = eval(f'ModuleEnergySub1GV{test.active_brg.api_version}')
|
|
118
|
+
test = cert_config.brg_configure(test, fields=[BRG_PATTERN], values=[ag.SUB1G_ENERGY_PATTERN_NO_ENERGIZING], module=sub1g_module)[0]
|
|
119
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
120
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
|
|
121
|
+
utPrint(f"wait a few seconds for the change to apply - Is the Energizing LED ({ENERGIZING_LED_COLOR}) off? (Y/N)", "BLUE")
|
|
122
|
+
value = cert_common.check_input_n_try_again(input())
|
|
123
|
+
test = cert_common.value_check_if_y(test, value, "Eenergizing LED check")
|
|
124
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
125
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
|
|
126
|
+
utPrint("Energizing LED check completed!\n", "GREEN")
|
|
127
|
+
|
|
128
|
+
# ------------------- Echo LED check -------------------------- #
|
|
129
|
+
utPrint("Echoing LED check!", "HEADER")
|
|
130
|
+
utPrint("Please make sure you have tags around you before answering!", "WARNING")
|
|
131
|
+
utPrint(f"Is the Echoing LED ({ECHOING_LED_COLOR}) blinking? (Y/N)", "BLUE")
|
|
132
|
+
value = cert_common.check_input_n_try_again(input())
|
|
133
|
+
test = cert_common.value_check_if_y(test, value, "Echoing LED check")
|
|
134
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
135
|
+
return cert_common.test_epilog(test)
|
|
136
|
+
utPrint("Echoing LED check completed!\n", "GREEN")
|
|
137
|
+
|
|
138
|
+
# ---------------- LEDS_KEEP_ALIVE_PERIOD_CHECK --------------- #
|
|
139
|
+
utPrint("LEDS_KEEP_ALIVE_PERIOD check!", "HEADER")
|
|
140
|
+
utPrint("Please remove all tags from the bridge surrounding for this check!", "WARNING")
|
|
141
|
+
utPrint(f"Look at the LEDS - Are both LED's off except for {LEDS_KEEP_ALIVE_BLINKS_NUM} blinks \n"
|
|
142
|
+
f"of the Echoing LED ({ECHOING_LED_COLOR}) every {LEDS_KEEP_ALIVE_PERIOD} seconds? (Y/N)", "BLUE")
|
|
143
|
+
value = cert_common.check_input_n_try_again(input())
|
|
144
|
+
test = cert_common.value_check_if_y(test, value, "LEDS_KEEP_ALIVE_PERIOD check")
|
|
145
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
146
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
|
|
147
|
+
utPrint("LEDS_KEEP_ALIVE_PERIOD check completed! - please restore the tags to position around the bridge\n", "GREEN")
|
|
148
|
+
|
|
149
|
+
# Revert to default
|
|
150
|
+
utPrint("Reverting the BRG to default configuration", "WARNING")
|
|
151
|
+
test = cert_config.config_brg_defaults(test, modules=[sub1g_module])[0]
|
|
152
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
153
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
|
|
154
|
+
utPrint(f"wait a few seconds for the change to apply - Is the Energizing LED ({ENERGIZING_LED_COLOR}) back on \n"
|
|
155
|
+
f" and the Echoing LED ({ECHOING_LED_COLOR}) blinking? (Y/N)", "BLUE")
|
|
156
|
+
value = cert_common.check_input_n_try_again(input())
|
|
157
|
+
test = cert_common.value_check_if_y(test, value, "Eenergizing LED check")
|
|
158
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
159
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
|
|
160
|
+
utPrint("Succesfully Reverted the BRG to default configuration!\n", "GREEN")
|
|
161
|
+
|
|
162
|
+
# ----------------------- Blink check ----------------------- #
|
|
163
|
+
utPrint("Blink action check - pay attention to the LED's", "HEADER")
|
|
164
|
+
cert_config.send_brg_action(test, ag.ACTION_BLINK)
|
|
165
|
+
if board_type == ag.BOARD_TYPE_MINEW_POE_V0:
|
|
166
|
+
utPrint(f"wait a few seconds for the action to apply - "
|
|
167
|
+
f"Did you see all 4 LED's blink {NUM_OF_LED_BLINKS_ACTION} times? (Y/N)", "BLUE")
|
|
168
|
+
else:
|
|
169
|
+
utPrint(f"wait a few seconds for the action to apply - "
|
|
170
|
+
f"Did you see both LED's blink {NUM_OF_LED_BLINKS_ACTION} times? (Y/N)", "BLUE")
|
|
171
|
+
value = cert_common.check_input_n_try_again(input())
|
|
172
|
+
test = cert_common.value_check_if_y(test, value, "Blink check")
|
|
173
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
174
|
+
return cert_common.test_epilog(test)
|
|
175
|
+
utPrint("Blink action check completed!\n", "GREEN")
|
|
176
|
+
|
|
177
|
+
# ------------- Power management sleep & Keep Alive Mode ------------- #
|
|
178
|
+
utPrint("Power management Sleep state & Keep Alive Mode check!", "HEADER")
|
|
179
|
+
utPrint("Sending the BRG power management configuration in order to enter sleep state", "WARNING")
|
|
180
|
+
pwr_mgmt_module = eval(f'ModulePwrMgmtV{test.active_brg.api_version}')
|
|
181
|
+
test, wltpkt = cert_common.brg_pwr_mgmt_turn_on(test)
|
|
182
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
183
|
+
# Preventing leaving brg in pwr mgmt, protection for on that worked yet no ack was received
|
|
184
|
+
test = cert_common.brg_pwr_mgmt_turn_off(test)
|
|
185
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[pwr_mgmt_module])
|
|
186
|
+
utPrint("pwr mgmt static mode turned on!", "GREEN")
|
|
187
|
+
utPrint("Waiting for on_duration to expire!", "BLUE")
|
|
188
|
+
cert_common.wait_time_n_print(wltpkt.pkt.static_on_duration)
|
|
189
|
+
sleep_state_start_ts = int(datetime.datetime.now().timestamp())
|
|
190
|
+
utPrint("Now we'll check sleep_Keep_Alive state blink .\n", "WARNING")
|
|
191
|
+
utPrint(f"look ath the LEDS - Are all leds off, besides 1 blink ({wltpkt.pkt.static_keep_alive_scan} msec period) of the \n"
|
|
192
|
+
f"Echoing LED ({ECHOING_LED_COLOR}) every {wltpkt.pkt.static_keep_alive_period} seconds? (Y/N)", "BLUE")
|
|
193
|
+
value = cert_common.check_input_n_try_again(input())
|
|
194
|
+
test = cert_common.value_check_if_y(test, value, "Sleep Keep Alive mode check")
|
|
195
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
196
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[pwr_mgmt_module])
|
|
197
|
+
# wait for sleep_duration to expire to revert the bridge to defualt configuration
|
|
198
|
+
if wltpkt.pkt.static_sleep_duration - (int(datetime.datetime.now().timestamp()) - sleep_state_start_ts) > 0:
|
|
199
|
+
utPrint("Waiting for sleep_duration to expire", "BLUE")
|
|
200
|
+
cert_common.wait_time_n_print(wltpkt.pkt.static_sleep_duration - (int(datetime.datetime.now().timestamp()) - sleep_state_start_ts))
|
|
201
|
+
# Revert to default
|
|
202
|
+
test = cert_common.brg_pwr_mgmt_turn_off(test)
|
|
203
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
204
|
+
test = cert_common.brg_pwr_mgmt_turn_off(test)
|
|
205
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[pwr_mgmt_module])
|
|
206
|
+
utPrint("Keep Alive Mode check completed!", "GREEN")
|
|
207
|
+
|
|
208
|
+
# --------------------- Post stage ----------------------------- #
|
|
209
|
+
utPrint("Test is completed, Good job!!!", "GREEN")
|
|
210
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ota_test",
|
|
3
|
+
"module": "edge_mgmt",
|
|
4
|
+
"purpose": "TODO",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "TODO",
|
|
7
|
+
"procedure": ["Test prolog", "TODO", "Test epilog"],
|
|
8
|
+
"expectedOutcome": "TODO",
|
|
9
|
+
"mandatory": 0,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": []
|
|
13
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
import brg_certificate.cert_common as cert_common
|
|
4
|
+
import brg_certificate.cert_config as cert_config
|
|
5
|
+
import brg_certificate.cert_utils as cert_utils
|
|
6
|
+
import datetime
|
|
7
|
+
import tabulate
|
|
8
|
+
|
|
9
|
+
# Index 0 = stage name Index 1 = value log to find
|
|
10
|
+
BRG_OTA_LOGS = {
|
|
11
|
+
"got ota action": "Got OTA action request for BRG",
|
|
12
|
+
"file download finish dat": "Downloaded files to /sd_images/ble_image_dat_file successfully",
|
|
13
|
+
"dat file open": "file opening /sd_images/ble_image_dat_file success",
|
|
14
|
+
"dat file transfer finish": "BRG_OTA_FILE_TRANSFER_FINISH",
|
|
15
|
+
"file download finish bin": "Downloaded files to /sd_images/ble_image_bin_file successfully",
|
|
16
|
+
"bin file open": "file opening /sd_images/ble_image_bin_file success",
|
|
17
|
+
"bin file transfer finish": "BRG_OTA_FILE_TRANSFER_FINISH",
|
|
18
|
+
"start brg ota": "Starting OTA to BRG",
|
|
19
|
+
"finish brg ota": "BRG OTA finished with status",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get_ts_from_log(log):
|
|
24
|
+
ts_end = log.find(']')
|
|
25
|
+
ts_str = log[1:ts_end]
|
|
26
|
+
# Convers from ms to sec
|
|
27
|
+
return int(ts_str) / 1000
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Prints the time each step individually for regression & follow up purposes
|
|
31
|
+
def breakdown_steps_timing(test, start_ts):
|
|
32
|
+
# timing data [step, is_found, time from start, stage timing]
|
|
33
|
+
timing_data = []
|
|
34
|
+
last_ts = start_ts
|
|
35
|
+
|
|
36
|
+
# Collect data
|
|
37
|
+
for step, log in BRG_OTA_LOGS.items():
|
|
38
|
+
found = []
|
|
39
|
+
suffix = "(dat)" if step.startswith("dat") else "(bin)" if step.startswith("bin") else ""
|
|
40
|
+
test, res, found = cert_common.single_log_search(test, log, found, fail_on_find=False, print_logs=False, additional_log=suffix)
|
|
41
|
+
time_from_start = -100 # invalid
|
|
42
|
+
step_time = -100 # invalid
|
|
43
|
+
if res:
|
|
44
|
+
found_ts = get_ts_from_log(found[0])
|
|
45
|
+
time_from_start = found_ts - start_ts
|
|
46
|
+
step_time = found_ts - last_ts
|
|
47
|
+
last_ts = found_ts
|
|
48
|
+
timing_data.append([step, res, round(time_from_start, 1), round(step_time, 1)])
|
|
49
|
+
|
|
50
|
+
# Create table
|
|
51
|
+
headers = ["Step", "Log Found", "Time From Start (secs)", "Step Time (secs)"]
|
|
52
|
+
print(tabulate.tabulate(tabular_data=timing_data, headers=headers, tablefmt="fancy_grid"))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def run(test):
|
|
56
|
+
|
|
57
|
+
test = cert_common.test_prolog(test)
|
|
58
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
59
|
+
return cert_common.test_epilog(test, revert_brgs=True)
|
|
60
|
+
|
|
61
|
+
versions_mgmt = cert_utils.load_module('versions_mgmt.py', f'{UTILS_BASE_REL_PATH}/versions_mgmt.py')
|
|
62
|
+
if test.latest:
|
|
63
|
+
_, version = versions_mgmt.get_versions(env='aws', server='test', ci=True)
|
|
64
|
+
elif test.release_candidate:
|
|
65
|
+
_, version = versions_mgmt.get_versions(env='aws', server='test', rc=True)
|
|
66
|
+
else:
|
|
67
|
+
test.rc = TEST_FAILED
|
|
68
|
+
test.reason = NO_PARAMS_GIVEN
|
|
69
|
+
print(NO_PARAMS_GIVEN)
|
|
70
|
+
|
|
71
|
+
# check for problems in prolog
|
|
72
|
+
if test.rc == TEST_FAILED or not version:
|
|
73
|
+
test = cert_common.test_epilog(test)
|
|
74
|
+
return test
|
|
75
|
+
|
|
76
|
+
start_time = datetime.datetime.now()
|
|
77
|
+
test = cert_config.brg_ota(test, gw_ble_version=version)
|
|
78
|
+
generate_log_file(test, f"brg_ota_{version}")
|
|
79
|
+
|
|
80
|
+
if test.rc == TEST_PASSED and WANTED_VER_SAME not in test.reason:
|
|
81
|
+
breakdown_steps_timing(test, start_time.timestamp())
|
|
82
|
+
|
|
83
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "stat_test",
|
|
3
|
+
"module": "edge_mgmt",
|
|
4
|
+
"purpose": "Test static packets (heartbeat and interface) sent from the bridge",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Scan for heartbeat and interface packets", "Test epilog"],
|
|
8
|
+
"expectedOutcome": "Both heartbeat and interface packets received from the bridge within 65 seconds",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": []
|
|
13
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
|
|
6
|
+
BRG_STAT_SCAN_TIMEOUT = 65
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def scan_for_brg_stat(test, timeout=BRG_STAT_SCAN_TIMEOUT, only_hb=False):
|
|
10
|
+
# In case we want to look for HB pkts only - set all modules to be True --> as if there are alredy found
|
|
11
|
+
found = {HB: False, MODULE_IF: False}
|
|
12
|
+
if only_hb is True:
|
|
13
|
+
for pkt_type in found:
|
|
14
|
+
if pkt_type != HB:
|
|
15
|
+
found[pkt_type] = True
|
|
16
|
+
else: # flash pkts if only_hb=False
|
|
17
|
+
test.mqttc.flush_pkts()
|
|
18
|
+
|
|
19
|
+
start_time = datetime.datetime.now()
|
|
20
|
+
# Search for packets
|
|
21
|
+
while not all(found.values()):
|
|
22
|
+
if (cert_mqtt.get_brg2gw_mgmt_pkts(test.mqttc, test, mgmt_types=[eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')]) and
|
|
23
|
+
not found[HB]):
|
|
24
|
+
found[HB] = True
|
|
25
|
+
print(f"Got HB packet after {(datetime.datetime.now() - start_time).seconds} sec!")
|
|
26
|
+
if (cert_mqtt.get_brg2gw_mgmt_pkts(test.mqttc, test, mgmt_types=[eval_pkt(f'ModuleIfV{test.active_brg.api_version}')]) and
|
|
27
|
+
not found[MODULE_IF]):
|
|
28
|
+
found[MODULE_IF] = True
|
|
29
|
+
print(f"Got interface module packet after {(datetime.datetime.now() - start_time).seconds} sec!")
|
|
30
|
+
print_update_wait()
|
|
31
|
+
if (datetime.datetime.now() - start_time).seconds > timeout:
|
|
32
|
+
test.rc = TEST_FAILED
|
|
33
|
+
err_print = f"{'HB' if not found[HB] else ''} {'MODULE_IF' if not found[MODULE_IF] else ''}"
|
|
34
|
+
test.add_reason(f"Didn't receive {err_print} pkt after {timeout} seconds!")
|
|
35
|
+
break
|
|
36
|
+
return test
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def run(test):
|
|
40
|
+
|
|
41
|
+
test = cert_common.test_prolog(test)
|
|
42
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
43
|
+
return cert_common.test_epilog(test)
|
|
44
|
+
|
|
45
|
+
test = scan_for_brg_stat(test)
|
|
46
|
+
generate_log_file(test, "stat")
|
|
47
|
+
|
|
48
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "duty_cycle_test",
|
|
3
|
+
"module": "energy2400",
|
|
4
|
+
"purpose": "Test configuration for supported energy2400 duty cycle values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Configurations", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": [1, 25, 50, 75]
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def run(test):
|
|
8
|
+
|
|
9
|
+
fields = [BRG_DUTY_CYCLE]
|
|
10
|
+
energy2400_module = eval_pkt(f'ModuleEnergy2400V{test.active_brg.api_version}')
|
|
11
|
+
|
|
12
|
+
test = cert_common.test_prolog(test)
|
|
13
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
14
|
+
return cert_common.test_epilog(test)
|
|
15
|
+
for param in test.params:
|
|
16
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=energy2400_module)[0]
|
|
17
|
+
generate_log_file(test, param.name)
|
|
18
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
19
|
+
test.set_phase_rc(param.name, test.rc)
|
|
20
|
+
test.add_phase_reason(param.name, test.reason)
|
|
21
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
22
|
+
break
|
|
23
|
+
else:
|
|
24
|
+
test.reset_result()
|
|
25
|
+
|
|
26
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "output_power_test",
|
|
3
|
+
"module": "energy2400",
|
|
4
|
+
"purpose": "Test configuration for all supported energy2400 output power values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Configurations", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["OUTPUT_POWER_2_4_NEG_12", "OUTPUT_POWER_2_4_NEG_8", "OUTPUT_POWER_2_4_NEG_4", "OUTPUT_POWER_2_4_POS_0", "OUTPUT_POWER_2_4_POS_2", "OUTPUT_POWER_2_4_POS_3"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def run(test):
|
|
8
|
+
|
|
9
|
+
fields = [BRG_OUTPUT_POWER]
|
|
10
|
+
energy2400_module = eval_pkt(f'ModuleEnergy2400V{test.active_brg.api_version}')
|
|
11
|
+
|
|
12
|
+
test = cert_common.test_prolog(test)
|
|
13
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
14
|
+
return cert_common.test_epilog(test)
|
|
15
|
+
|
|
16
|
+
for param in test.params:
|
|
17
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=energy2400_module)[0]
|
|
18
|
+
generate_log_file(test, param.name)
|
|
19
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
20
|
+
test.set_phase_rc(param.name, test.rc)
|
|
21
|
+
test.add_phase_reason(param.name, test.reason)
|
|
22
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
23
|
+
break
|
|
24
|
+
else:
|
|
25
|
+
test.reset_result()
|
|
26
|
+
|
|
27
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pattern_test",
|
|
3
|
+
"module": "energy2400",
|
|
4
|
+
"purpose": "Test configuration for all supported Energy 2400MHz pattern values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Configurations", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["ENERGY_PATTERN_2_4_NO_ENERGIZING", "ENERGY_PATTERN_2_4_CHANNEL_37", "ENERGY_PATTERN_2_4_CHANNEL_38", "ENERGY_PATTERN_2_4_CHANNEL_39", "ENERGY_PATTERN_2_4_FREQ_2450", "ENERGY_PATTERN_2_4_FREQ_2454"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def run(test):
|
|
8
|
+
|
|
9
|
+
fields = [BRG_PATTERN]
|
|
10
|
+
energy2400_module = eval_pkt(f'ModuleEnergy2400V{test.active_brg.api_version}')
|
|
11
|
+
|
|
12
|
+
test = cert_common.test_prolog(test)
|
|
13
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
14
|
+
return cert_common.test_epilog(test)
|
|
15
|
+
|
|
16
|
+
for param in test.params:
|
|
17
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=energy2400_module)[0]
|
|
18
|
+
# param epilog
|
|
19
|
+
generate_log_file(test, param.name)
|
|
20
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
21
|
+
test.set_phase_rc(param.name, test.rc)
|
|
22
|
+
test.add_phase_reason(param.name, test.reason)
|
|
23
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
24
|
+
break
|
|
25
|
+
else:
|
|
26
|
+
test.reset_result()
|
|
27
|
+
|
|
28
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "signal_indicator_functionality_ble5_test",
|
|
3
|
+
"module": "energy2400",
|
|
4
|
+
"purpose": "TODO",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "TODO",
|
|
7
|
+
"procedure": ["Test prolog", "TODO", "Test epilog"],
|
|
8
|
+
"expectedOutcome": "TODO",
|
|
9
|
+
"mandatory": 0,
|
|
10
|
+
"multiBridgeTest": 1,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["RX_CHANNEL_10_250K", "RX_CHANNEL_10_500K"]
|
|
13
|
+
}
|