1#!/usr/bin/env python3 2#-*- coding: utf-8 -*- 3 4# Copyright (c) 2025 Huawei Device Co., Ltd. 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17from devicetest.core.test_case import TestCase, CheckPoint 18from hypium import UiDriver 19 20 21class case05_init001(TestCase): 22 23 def __init__(self, configs): 24 self.TAG = self.__class__.__name__ 25 TestCase.__init__(self, self.TAG, configs) 26 self.tests = [ 27 "test_step" 28 ] 29 self.driver = UiDriver(self.device1) 30 self.sn = self.device1.device_sn 31 32 def setup(self): 33 self.log.info("case05_init001 start") 34 self.driver.shell("rm -r /data/log/hilog") 35 36 def test_step(self): 37 driver = self.driver 38 result = driver.System.execute_command("param get bootevent.samgr.ready") 39 CheckPoint("The system can detect the startup event") 40 assert "true" in result 41 42 def teardown(self): 43 self.log.info("case05_init001 down") 44