update testcase for testsuite texlive-grabbox
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-z/texlive-grabbox",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-grabbox_function_basic",
|
||||
"desc": "Test basic functionality of texlive-grabbox"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 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 : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2025-11-27
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test basic functionality of texlive-grabbox
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试脚本:test_texlive-grabbox_function_basic
|
||||
|
||||
LOG_INFO "开始测试 texlive-grabbox 的基本功能"
|
||||
|
||||
# 检查是否已安装 texlive-grabbox
|
||||
LOG_INFO "检查 texlive-grabbox 是否已安装"
|
||||
dnf list installed texlive-grabbox > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "texlive-grabbox 已安装,测试结束后保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "texlive-grabbox 未安装,将在测试结束后卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查 yum 源中是否有 texlive-grabbox
|
||||
LOG_INFO "检查 yum 源中是否有 texlive-grabbox"
|
||||
dnf list available texlive-grabbox > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "yum 源中未找到 texlive-grabbox 软件包"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum 源中未找到 texlive-grabbox,退出测试"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装 texlive-grabbox
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装 texlive-grabbox"
|
||||
dnf install -y texlive-grabbox
|
||||
CHECK_RESULT $? 0 0 "安装 texlive-grabbox 失败"
|
||||
fi
|
||||
|
||||
# 测试 texlive-grabbox 的基本功能
|
||||
LOG_INFO "测试 texlive-grabbox 的基本功能"
|
||||
texlive-grabbox --help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "texlive-grabbox 命令不支持 --help 参数"
|
||||
|
||||
# 检查 texlive-grabbox --version 参数
|
||||
LOG_INFO "检查 --version 参数"
|
||||
texlive-grabbbox --version > /dev/null 2>&1
|
||||
CHECK_RESULT $? 255 255 "--version 参数不存在或不支持"
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载 texliv-e grabbox"
|
||||
dnf remove -y texliv-e grabbox
|
||||
CHECK_RESULT $? 0 0 “卸载 texliv-e grabbox失败”
|
||||
fi
|
||||
|
||||
LOG_INF0 “测试完成”
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user