diff --git a/README.md b/README.md index 4ab9187dca06b5d5521718445bd4716abd19f08e..1230e1e1a7525b3534300e269dedafbc39f02942 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,6 @@ base/startup/init/ # init module ├── src # Source files for the init module └── test # Source files of the test cases for the init module └── unittest -vendor -└──huawei - └──camera - └──init_configs # init configuration files (in JSON format, and deployed in /etc/init.cfg after image burning) ``` ## Constraints diff --git a/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0100.json b/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0100.json deleted file mode 100644 index fed60c0246778853a8323b77973d07883d0f9934..0000000000000000000000000000000000000000 --- a/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0100.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "description": "Config for OpenHarmony devicetest test cases", - "environment": [ - { - "type": "device" - } - ], - "driver": { - "type": "DeviceTest", - "py_file": [ - "SUB_STARTUP_INIT_BASE/Sub_Starup_Init_Base_0100.py" - ] - } -} \ No newline at end of file diff --git a/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0100.py b/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0100.py deleted file mode 100644 index ac83ff7103fa4b2075d1a3ba72c9cd50b5e084fc..0000000000000000000000000000000000000000 --- a/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0100.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- - -# -# Copyright (c) 2024 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import time -from devicetest.core.test_case import TestCase, Step -from hypium import UiDriver - - -class SunStartupInitBase0100(TestCase): - def __init__(self, controllers): - self.tag = self.__class__.__name__ - TestCase.__init__(self, self.tag, controllers) - self.driver = UiDriver(self.device1) - - def setup(self): - Step(self.devices[0].device_id) - device = self.driver.shell("param get const.product.model") - device = device.replace("\n", "").replace(" ", "") - device = str(device) - Step(device) - - def process(self): - bundle_name = "com.generic.hmos.notepad" - for i in range(5): - self.driver.System.reboot() - self.driver.System.wait_for_boot_complete() - - wake = self.driver.Screen.is_on() - time.sleep(0.5) - if wake: - self.driver.ScreenLock.unlock() - else: - self.driver.Screen.wake_up() - self.driver.ScreenLock.unlock() - self.driver.Screen.enable_stay_awake() - - self.driver.AppManager.start_app(bundle_name) - pid = self.driver.System.get_pid(bundle_name) - self.driver.Assert.equal(type(pid), int) - self.driver.AppManager.stop_app(bundle_name) - - def teardown(self): - Step("收尾工作.................") diff --git a/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0500.json b/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0500.json deleted file mode 100644 index bc3bd819e2767e127ae6cef1d9048ddb4c5990e9..0000000000000000000000000000000000000000 --- a/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0500.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "description": "Config for OpenHarmony devicetest test cases", - "environment": [ - { - "type": "device" - } - ], - "driver": { - "type": "DeviceTest", - "py_file": [ - "SUB_STARTUP_INIT_BASE/Sub_Starup_Init_Base_0500.py" - ] - } -} \ No newline at end of file diff --git a/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0500.py b/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0500.py deleted file mode 100644 index cf8405f5006ec6e6231a5c6fece025c2d33c430f..0000000000000000000000000000000000000000 --- a/test/autotest/testcases/SUB_STARTUP_INIT_BASE/sub_starup_init_base_0500.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- - -# -# Copyright (c) 2024 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import time -from devicetest.core.test_case import TestCase, Step -from hypium import UiDriver - - -class SunStartupInitBase0500(TestCase): - def __init__(self, controllers): - self.tag = self.__class__.__name__ - TestCase.__init__(self, self.tag, controllers) - self.driver = UiDriver(self.device1) - - def setup(self): - Step(self.devices[0].device_id) - device = self.driver.shell("param get const.product.model") - device = device.replace("\n", "").replace(" ", "") - device = str(device) - Step(device) - - def process(self): - bundle_name = "com.generic.hmos.notepad" - self.driver.shell("write_updater user_factory_reset") - self.driver.shell("reboot updater") - self.driver.System.wait_for_boot_complete() - self.driver.AppManager.disable_startup_guide() - - wake = self.driver.Screen.is_on() - time.sleep(0.5) - if wake: - self.driver.ScreenLock.unlock() - else: - self.driver.Screen.wake_up() - self.driver.ScreenLock.unlock() - self.driver.Screen.enable_stay_awake() - - self.driver.AppManager.start_app(bundle_name) - pid = self.driver.System.get_pid(bundle_name) - self.driver.Assert.equal(type(pid), int) - self.driver.AppManager.stop_app(bundle_name) - - def teardown(self): - Step("收尾工作.................")