15ba71b47Sopenharmony_ci#!/usr/bin/env python3 25ba71b47Sopenharmony_ci#-*- coding: utf-8 -*- 35ba71b47Sopenharmony_ci 45ba71b47Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd. 55ba71b47Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 65ba71b47Sopenharmony_ci# you may not use this file except in compliance with the License. 75ba71b47Sopenharmony_ci# You may obtain a copy of the License at 85ba71b47Sopenharmony_ci# 95ba71b47Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 105ba71b47Sopenharmony_ci# 115ba71b47Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 125ba71b47Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 135ba71b47Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 145ba71b47Sopenharmony_ci# See the License for the specific language governing permissions and 155ba71b47Sopenharmony_ci# limitations under the License. 165ba71b47Sopenharmony_ci 175ba71b47Sopenharmony_cifrom devicetest.core.test_case import TestCase, CheckPoint 185ba71b47Sopenharmony_cifrom hypium import UiDriver 195ba71b47Sopenharmony_cifrom hypium.action.host import host 205ba71b47Sopenharmony_ci 215ba71b47Sopenharmony_ci 225ba71b47Sopenharmony_ciclass case05_init001(TestCase): 235ba71b47Sopenharmony_ci 245ba71b47Sopenharmony_ci def __init__(self, configs): 255ba71b47Sopenharmony_ci self.TAG = self.__class__.__name__ 265ba71b47Sopenharmony_ci TestCase.__init__(self, self.TAG, configs) 275ba71b47Sopenharmony_ci self.tests = [ 285ba71b47Sopenharmony_ci "test_step" 295ba71b47Sopenharmony_ci ] 305ba71b47Sopenharmony_ci self.driver = UiDriver(self.device1) 315ba71b47Sopenharmony_ci self.sn = self.device1.device_sn 325ba71b47Sopenharmony_ci 335ba71b47Sopenharmony_ci def setup(self): 345ba71b47Sopenharmony_ci self.log.info("case05_init001 start") 355ba71b47Sopenharmony_ci host.shell("hdc -t {} shell rm -r /data/log/hilog".format(self.sn)) 365ba71b47Sopenharmony_ci 375ba71b47Sopenharmony_ci def test_step(self): 385ba71b47Sopenharmony_ci driver = self.driver 395ba71b47Sopenharmony_ci result = driver.System.execute_command("param get bootevent.samgr.ready") 405ba71b47Sopenharmony_ci CheckPoint("The system can detect the startup event") 415ba71b47Sopenharmony_ci assert "true" in result 425ba71b47Sopenharmony_ci 435ba71b47Sopenharmony_ci def teardown(self): 445ba71b47Sopenharmony_ci self.log.info("case05_init001 down") 45