update testcase for testsuite texlive-etsvthor

This commit is contained in:
2026-04-22 04:36:37 +08:00
parent b2111d5460
commit b9947e2fdd
2 changed files with 0 additions and 73 deletions

View File

@@ -1,10 +0,0 @@
{
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-h/texlive-etsvthor",
"machine num": 1,
"cases": [
{
"name": "test_texlive-etsvthor_function_install",
"desc": "Test package installation"
}
]
}

View File

@@ -1,63 +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-09-30
# @License : Mulan PSL v2
# @Desc : Test package installation
# ############################################
source "$OET_PATH/libs/locallibs/common_lib.sh"
function run_test() {
# 测试脚本test_texlive-etsvthor_function_install
LOG_INFO "开始测试软件包安装功能"
# 检查是否已安装目标软件包
if dnf list installed texlive-etsvthor &>/dev/null; then
LOG_INFO "环境已安装 texlive-etsvthor测试将保持安装状态"
installed=true
else
LOG_INFO "环境未安装 texlive-etsvthor测试将执行安装步骤"
installed=false
fi
# 检查yum源中是否存在目标软件包
LOG_INFO "检查yum源中是否存在 texlive-etsvthor"
dnf list available texlive-etsvthor &>/dev/null
CHECK_RESULT $? 0 255 "yum源中不存在 texlive-etsvthor 软件包"
# 执行安装(如果未安装)
if [ "$installed" = false ]; then
LOG_INFO "开始安装 texlive-etsvthor"
dnf install -y texlive-etsvthor
CHECK_RESULT $? 0 1 "安装 texlive-etsvthor 失败"
fi
# 验证软件包功能(示例命令)
LOG_INFO "验证 texlive-etsvthor 功能"
texlive-etsvthor --version &>/dev/null
CHECK_RESULT $? 0 1 "texlive-etsvthor 功能验证失败"
# 清理环境(如果测试前未安装)
if [ "$installed" = false ]; then
LOG_INFO "清理环境,卸载 texlive-etsvthor"
dnf remove -y texlive-etsvthor
CHECK_RESULT $? 0 1 "卸载 texlive-etsvthor 失败"
fi
LOG_INFO "测试完成,环境已恢复"
}
main "$@"