1#!/bin/sh 2################################################################################ 3# 4# Copyright (C) 2022 Huawei Device Co., Ltd. 5# SPDX-License-Identifier: GPL-2.0 6# 7# Unless required by applicable law or agreed to in writing, software 8# distributed under the License is distributed on an "AS IS" BASIS, 9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10# See the License for the specific language governing permissions and 11# limitations under the License. 12# 13################################################################################ 14# File: libapi.sh 15# 16# Description: shell library api for linuxkerneltest 17# 18# Authors: Ma Feng - mafeng.ma@huawei.com 19# 20# History: Mar 15 2022 - init scripts 21# 22################################################################################ 23 24print_error() 25{ 26 echo -e "\033[41m$1\033[0m" 27} 28 29print_warn() 30{ 31 echo -e "\033[43m$1\033[0m" 32} 33 34print_pass() 35{ 36 echo -e "\033[42m$1\033[0m" 37} 38 39print_info() 40{ 41 echo -e "\033[37m$1\033[0m" 42} 43 44print_deg() 45{ 46 if [ $DEBUG -eq 1 ]; then 47 echo -e "\033[1;33m$1\033[0m" 48 fi 49} 50