update testcase for testsuite texlive-pdfpagediff-doc

This commit is contained in:
2026-04-19 22:59:50 +08:00
parent ac8a015e83
commit 2c25ca8ee4
2 changed files with 0 additions and 71 deletions

View File

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

View File

@@ -1,61 +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-10-02
# @License : Mulan PSL v2
# @Desc : Test package installation
# ############################################
source "$OET_PATH/libs/locallibs/common_lib.sh"
function run_test() {
# 检查是否已安装texlive-pdfpagediff-doc
LOG_INFO "检查是否已安装texlive-pdfpagediff-doc"
rpm -q texlive-pdfpagediff-doc > /dev/null 2>&1
if [ $? -eq 0 ]; then
LOG_INFO "texlive-pdfpagediff-doc已安装脚本结束后将保持安装状态"
INSTALLED=1
else
LOG_INFO "texlive-pdfpagediff-doc未安装脚本结束后将卸载"
INSTALLED=0
fi
# 检查yum源中是否有texlive-pdfpagediff-doc
LOG_INFO "检查yum源中是否有texlive-pdfpagediff-doc"
dnf list available texlive-pdfpagediff-doc > /dev/null 2>&1
CHECK_RESULT $? 0 255 "yum源中未找到texlive-pdfpagediff-doc软件包"
# 安装texlive-pdfpagediff-doc
if [ $INSTALLED -eq 0 ]; then
LOG_INFO "开始安装texlive-pdfpagediff-doc"
dnf install -y texlive-pdfpagediff-doc > /dev/null 2>&1
CHECK_RESULT $? 0 0 "安装texlive-pdfpagediff-doc失败"
fi
# 测试texlive-pdfpagediff命令是否可用
LOG_INFO "测试texlive-pdfpagediff命令是否可用"
texlive-pdfpagediff --help > /dev/null 2>&1
CHECK_RESULT $? 0 255 "texlive-pdfpagediff命令不可用或参数不支持"
# 清理环境
if [ $INSTALLED -eq 0 ]; then
LOG_INFO "卸载texlive-pdfpagediff-doc"
dnf remove -y texlive-pdfpagediff-doc > /dev/null 2>&1
CHECK_RESULT $? 0 0 "卸载texlive-pdfpagediff-doc失败"
fi
LOG_INFO "测试完成"
}
main "$@"