Loading system/gd/cert/gd_base_test.py +5 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ # limitations under the License. import importlib import os import traceback from functools import wraps Loading Loading @@ -53,6 +54,10 @@ class GdBaseTestClass(BaseTestClass): generate_coverage_report_for_host(self.cert_coverage_info) self.cert_coverage_info = None def set_controller_properties_path(self, path): GD_DIR = os.path.join(os.getcwd(), os.pardir) self.controller_properties_file = os.path.join(GD_DIR, path) def setup_test(self): self.log_path_base = get_current_context().get_full_output_path() self.verbose_mode = bool(self.user_params.get('verbose_mode', False)) Loading system/gd/hci/cert/le_legacy_config.json 0 → 100644 +6 −0 Original line number Diff line number Diff line { "supported_commands" : ["b3", "ff", "ef", "01", "ce", "fd", "81", "ff", "3f", "0f", "40", "1e", "f0", "03", "e8", "02", "03", "d6", "81", "9f", "1c", "00", "00", "00", "40", "f7", "ff", "a7", "0f", "20", "00", "00", "4a", "80", "78", "0e", "00", "00", "00", "00",], } system/gd/hci/cert/le_scanning_manager_test.py +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ class LeScanningManagerTest(GdBaseTestClass, LeScanningManagerTestBase): GdBaseTestClass.setup_class(self, dut_module='HCI_INTERFACES', cert_module='HCI_INTERFACES') def setup_test(self): GdBaseTestClass.set_controller_properties_path(self, 'hci/cert/le_legacy_config.json') GdBaseTestClass.setup_test(self) LeScanningManagerTestBase.setup_test(self, self.cert) Loading system/vendor_libs/test_vendor_lib/model/devices/device_properties.cc +9 −8 Original line number Diff line number Diff line Loading @@ -39,12 +39,6 @@ static void ParseUint16t(Json::Value value, uint16_t* field) { *field = value.asUInt(); } static void ParseBool(Json::Value value, bool* field) { if (value.isBool()) { *field = value.asBool(); } } namespace test_vendor_lib { DeviceProperties::DeviceProperties(const std::string& file_name) Loading Loading @@ -107,8 +101,15 @@ DeviceProperties::DeviceProperties(const std::string& file_name) ParseUint8t(root["LmpPalVersion"], &lmp_pal_version_); ParseUint16t(root["ManufacturerName"], &manufacturer_name_); ParseUint16t(root["LmpPalSubversion"], &lmp_pal_subversion_); ParseBool(root["use_supported_commands_from_file"], &use_supported_commands_from_file_); Json::Value supported_commands = root["supported_commands"]; if (supported_commands.size() > 0) { use_supported_commands_from_file_ = true; for (int i = 0; i < supported_commands.size(); i++) { std::string out = supported_commands[i].asString(); uint8_t number = stoi(out, 0, 16); supported_commands_[i] = number; } } } } // namespace test_vendor_lib Loading
system/gd/cert/gd_base_test.py +5 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ # limitations under the License. import importlib import os import traceback from functools import wraps Loading Loading @@ -53,6 +54,10 @@ class GdBaseTestClass(BaseTestClass): generate_coverage_report_for_host(self.cert_coverage_info) self.cert_coverage_info = None def set_controller_properties_path(self, path): GD_DIR = os.path.join(os.getcwd(), os.pardir) self.controller_properties_file = os.path.join(GD_DIR, path) def setup_test(self): self.log_path_base = get_current_context().get_full_output_path() self.verbose_mode = bool(self.user_params.get('verbose_mode', False)) Loading
system/gd/hci/cert/le_legacy_config.json 0 → 100644 +6 −0 Original line number Diff line number Diff line { "supported_commands" : ["b3", "ff", "ef", "01", "ce", "fd", "81", "ff", "3f", "0f", "40", "1e", "f0", "03", "e8", "02", "03", "d6", "81", "9f", "1c", "00", "00", "00", "40", "f7", "ff", "a7", "0f", "20", "00", "00", "4a", "80", "78", "0e", "00", "00", "00", "00",], }
system/gd/hci/cert/le_scanning_manager_test.py +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ class LeScanningManagerTest(GdBaseTestClass, LeScanningManagerTestBase): GdBaseTestClass.setup_class(self, dut_module='HCI_INTERFACES', cert_module='HCI_INTERFACES') def setup_test(self): GdBaseTestClass.set_controller_properties_path(self, 'hci/cert/le_legacy_config.json') GdBaseTestClass.setup_test(self) LeScanningManagerTestBase.setup_test(self, self.cert) Loading
system/vendor_libs/test_vendor_lib/model/devices/device_properties.cc +9 −8 Original line number Diff line number Diff line Loading @@ -39,12 +39,6 @@ static void ParseUint16t(Json::Value value, uint16_t* field) { *field = value.asUInt(); } static void ParseBool(Json::Value value, bool* field) { if (value.isBool()) { *field = value.asBool(); } } namespace test_vendor_lib { DeviceProperties::DeviceProperties(const std::string& file_name) Loading Loading @@ -107,8 +101,15 @@ DeviceProperties::DeviceProperties(const std::string& file_name) ParseUint8t(root["LmpPalVersion"], &lmp_pal_version_); ParseUint16t(root["ManufacturerName"], &manufacturer_name_); ParseUint16t(root["LmpPalSubversion"], &lmp_pal_subversion_); ParseBool(root["use_supported_commands_from_file"], &use_supported_commands_from_file_); Json::Value supported_commands = root["supported_commands"]; if (supported_commands.size() > 0) { use_supported_commands_from_file_ = true; for (int i = 0; i < supported_commands.size(); i++) { std::string out = supported_commands[i].asString(); uint8_t number = stoi(out, 0, 16); supported_commands_[i] = number; } } } } // namespace test_vendor_lib