update testcase for testsuite texlive-diagbox-doc

This commit is contained in:
2026-04-23 06:02:47 +08:00
parent ff489e8385
commit dc6e99d9ec
2 changed files with 0 additions and 75 deletions

View File

@@ -1,10 +0,0 @@
{
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-g/texlive-diagbox-doc",
"machine num": 1,
"cases": [
{
"name": "test_texlive-diagbox-doc_function_install",
"desc": "Test installation of texlive-diagbox-doc"
}
]
}

View File

@@ -1,65 +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-12-06
# @License : Mulan PSL v2
# @Desc : Test installation of texlive-diagbox-doc
# ############################################
source "$OET_PATH/libs/locallibs/common_lib.sh"
function run_test() {
# 检查texlive-diagbox-doc是否已安装
LOG_INFO "检查texlive-diagbox-doc是否已安装"
rpm -q texlive-diagbox-doc > /dev/null 2>&1
if [ $? -eq 0 ]; then
LOG_INFO "texlive-diagbox-doc已安装脚本结束时将保持安装状态"
INSTALLED=true
else
LOG_INFO "texlive-diagbox-doc未安装将在测试后卸载"
INSTALLED=false
fi
# 检查yum源中是否有texlive-diagbox-doc软件包
LOG_INFO "检查yum源中是否有texlive-diagbox-doc软件包"
dnf list available texlive-diagbox-doc > /dev/null 2>&1
CHECK_RESULT $? 0 255 "yum源中未找到texlive-diagbox-doc软件包"
# 安装texlive-diagbox-doc
LOG_INFO "安装texlive-diagbox-doc"
dnf install -y texlive-diagbox-doc > /dev/null 2>&1
CHECK_RESULT $? 0 0 "安装texlive-diagbox-doc失败"
# 验证texlive-diagbox-doc是否成功安装
LOG_INFO "验证texlive-diagbox-doc是否成功安装"
rpm -q texlive-diagbox-doc > /dev/null 2>&1
CHECK_RESULT $? 0 0 "texlive-diagbox-doc未成功安装"
# 测试步骤检查texlive-diagbox-doc的功能示例命令
LOG_INFO "测试texlive-diagbox-doc的功能"
# 假设有一个测试命令这里用echo模拟
echo "Testing texlive-diagbox-doc functionality" > /dev/null 2>&1
CHECK_RESULT $? 0 0 "测试texlive-diagbox-doc功能失败"
# 清理环境:如果之前未安装,则卸载软件包
if [ "$INSTALLED" = false ]; then
LOG_INFO "卸载texlive-diagbox-doc"
dnf remove -y texlive-diagbox-doc > /dev/null 2>&1
CHECK_RESULT $? 0 0 "卸载texlive-diagbox-doc失败"
fi
LOG_INFO "测试脚本执行完毕"
}
main "$@"