update testcase for testsuite texlive-auto-pst-pdf-lua

This commit is contained in:
2026-04-25 00:47:55 +08:00
parent 1cd0b3d39d
commit 07913f1eef
2 changed files with 0 additions and 72 deletions

View File

@@ -1,10 +0,0 @@
{
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-b/texlive-auto-pst-pdf-lua",
"machine num": 1,
"cases": [
{
"name": "test_texlive-auto-pst-pdf-lua_function_install",
"desc": "Test package installation"
}
]
}

View File

@@ -1,62 +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-17
# @License : Mulan PSL v2
# @Desc : Test package installation
# ############################################
source "$OET_PATH/libs/locallibs/common_lib.sh"
function run_test() {
# 检查是否已经安装texlive-auto-pst-pdf-lua
LOG_INFO "检查是否已经安装texlive-auto-pst-pdf-lua"
rpm -q texlive-auto-pst-pdf-lua
if [ $? -eq 0 ]; then
LOG_INFO "texlive-auto-pst-pdf-lua已经安装脚本结束时保持安装状态"
installed=true
else
installed=false
fi
# 检查yum源中是否有texlive-auto-pst-pdf-lua
LOG_INFO "检查yum源中是否有texlive-auto-pst-pdf-lua"
dnf list available texlive-auto-pst-pdf-lua > /dev/null 2>&1
CHECK_RESULT $? 0 255 "yum源中没有texlive-auto-pst-pdf-lua软件包"
# 安装texlive-auto-pst-pdf-lua
if [ "$installed" = false ]; then
LOG_INFO "安装texlive-auto-pst-pdf-lua"
dnf install -y texlive-auto-pst-pdf-lua
CHECK_RESULT $? 0 0 "安装texlive-auto-pst-pdf-lua失败"
fi
# 测试命令功能
LOG_INFO "测试texlive-auto-pst-pdf-lua命令功能"
command -v texlua > /dev/null 2>&1
CHECK_RESULT $? 0 255 "texlua命令不存在或不支持"
# 清理环境,恢复到之前的状态
if [ "$installed" = false ]; then
LOG_INFO "卸载texlive-auto-pst-pdf-lua"
dnf remove -y texlive-auto-pst-pdf-lua
CHECK_RESULT $? 0 0 "卸载texlive-auto-pst-pdf-lua失败"
fi
LOG_INFO "测试完成,环境已恢复"
}
main "$@"