diff --git a/aw/python/distributed/common/devices.py b/aw/python/distributed/common/devices.py index 71803853a2ce9850decf534a9784254117ef9ade..ef0bb06f23007a6f9cc4ad5978d09881a44e66de 100755 --- a/aw/python/distributed/common/devices.py +++ b/aw/python/distributed/common/devices.py @@ -179,7 +179,6 @@ class DeviceAdapter: time.sleep(1) return return_code - ############################################################### ############################################################### @@ -199,6 +198,7 @@ class DeviceAdapter: remote_ip, remote_port, device_sn) return device_para + @classmethod def execute_command(self, command, print_flag=True, timeout=900): try: if print_flag: @@ -211,6 +211,7 @@ class DeviceAdapter: print("results: failed") return False + @classmethod def execute_command_with_output(self, command, print_flag=True): if print_flag: print("command: " + command) @@ -248,6 +249,7 @@ class DeviceAdapter: command, QUOTATION_MARKS)) + @classmethod def check_path_legal(self, path): if path and " " in path: return "\"%s\"" % path @@ -318,7 +320,6 @@ class HDCDeviceAdapter: self.unlock_screen() self.unlock_device() - ############################################################### ############################################################### @@ -338,6 +339,7 @@ class HDCDeviceAdapter: remote_ip, remote_port, device_sn) return device_para + @classmethod def execute_command(self, command, print_flag=True, timeout=900): try: if print_flag: @@ -350,6 +352,7 @@ class HDCDeviceAdapter: print("results: failed") return False + @classmethod def execute_command_with_output(self, command, print_flag=True): if print_flag: print("command: " + command) @@ -384,6 +387,7 @@ class HDCDeviceAdapter: command, QUOTATION_MARKS)) + @classmethod def check_path_legal(self, path): if path and " " in path: return "\"%s\"" % path diff --git a/aw/python/distributed/common/manager.py b/aw/python/distributed/common/manager.py index 7d3f3e977d75f4ae5b3651c3dded7bf7191ba4e5..0cba2d64702705a9deb575fd4e209ba8f5a4bba4 100755 --- a/aw/python/distributed/common/manager.py +++ b/aw/python/distributed/common/manager.py @@ -79,6 +79,7 @@ class DeviceManager: setattr(self, device.name, device) return + @classmethod def get_device_info_list(self): device_info_list = [] tmp_path = os.path.join(os.environ.get('PYTEST_RESULTPATH'), "temp") diff --git a/aw/python/distributed/distribute/distribute.py b/aw/python/distributed/distribute/distribute.py index 10790d05d1050f93688c8d399e19c66f0a699b7b..29b0d8becba926d5402d9cb855be971f412c7abd 100755 --- a/aw/python/distributed/distribute/distribute.py +++ b/aw/python/distributed/distribute/distribute.py @@ -116,6 +116,7 @@ class Distribute: suite_path = os.path.join(self.suite_dir, target_name) return driver.execute(suite_path, background=False) + @classmethod def pull_result(self, device, source_path, result_save_path): _, file_name = os.path.split(source_path) device.pull_file(source_path, result_save_path) @@ -123,6 +124,7 @@ class Distribute: create_empty_result_file(result_save_path, file_name) return + @classmethod def _check_thread(self, device, thread_name): check_command = "ps -A | grep %s" % thread_name checksum = 0 @@ -164,6 +166,7 @@ class Distribute: config_major_file = os.path.join(self.suite_dir, "major.desc") self._write_device_config(config_info, config_major_file) + @classmethod def _query_device_ip(self, device): output = device.shell_with_output("getprop ro.hardware") if output == "": @@ -185,6 +188,7 @@ class Distribute: return ipaddress[0] + @classmethod def _query_device_uuid(self, device): """ 1. Run the dumpsys DdmpDeviceMonitorService command to query the value @@ -209,6 +213,7 @@ class Distribute: dev_nodeid_info = device_info[begin:end].replace('"', "") return dev_nodeid_info.split(":")[1] + @classmethod def _write_device_config(self, device_info, file_path): file_dir, file_name = os.path.split(file_path) final_file = os.path.join(file_dir, file_name.split('.')[0] + ".desc") diff --git a/examples/app_info/test/unittest/common/get_app_info/ExampleJsunit.test.js b/examples/app_info/test/unittest/common/get_app_info/ExampleJsunit.test.js index d6e92a7a6a5204f8b0718e09f72c44a045f2d572..84f768238335f1af1fdd4d7aa1bb5fd9d3a60c17 100644 --- a/examples/app_info/test/unittest/common/get_app_info/ExampleJsunit.test.js +++ b/examples/app_info/test/unittest/common/get_app_info/ExampleJsunit.test.js @@ -18,6 +18,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from ' describe("AppInfoTest", function () { beforeAll(function() { + /* * @tc.setup: setup invoked before all testcases */ @@ -25,6 +26,7 @@ describe("AppInfoTest", function () { }) afterAll(function() { + /* * @tc.teardown: teardown invoked after all testcases */ @@ -32,6 +34,7 @@ describe("AppInfoTest", function () { }) beforeEach(function() { + /* * @tc.setup: setup invoked before each testcases */ @@ -39,6 +42,7 @@ describe("AppInfoTest", function () { }) afterEach(function() { + /* * @tc.teardown: teardown invoked after each testcases */