Files
os-autotest/testcases/smoke_test/smoke_openruyi/or_test_timedatectl.sh

32 lines
1.0 KiB
Bash

#!/usr/bin/bash
# Copyright (c) 2026 ISCAS .ALL rights reserved.
# This program is licensed under Mulan PSL v2.
# You can use it according to the terms and conditions of the Mulan PSL v2.
# http://license.coscl.org.cn/MulanPSL2
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
# #############################################
# @Author : yafen
# @Contact : yafen@iscas.ac.cn
# @Date : 2026-04-13
# @License : Mulan PSL v2
# @Desc : Ensure clock synchronization is complete
# ############################################
source "${OET_PATH}/libs/locallibs/common_lib.sh"
function run_test() {
LOG_INFO "Start to run test."
timedatectl | grep "Local time"
CHECK_RESULT $?
timedatectl | grep "NTP service" | grep " active"
CHECK_RESULT $?
LOG_INFO "End to run test."
}
main "$@"