update testcase for testsuite texlive-layaureo-doc
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-n/texlive-layaureo-doc",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-layaureo-doc_function_basic",
|
||||
"desc": "Verify basic documentation accessibility"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,66 +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-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Verify basic documentation accessibility
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:验证基本文档可访问性"
|
||||
|
||||
# 检查是否已安装texlive-latex-doc
|
||||
LOG_INFO "检查texlive-latex-doc是否已安装"
|
||||
dnf list installed texlive-latex-doc &> /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "texlive-latex-doc已安装,保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "texlive-latex-doc未安装,将在测试后卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有texlive-latex-doc
|
||||
LOG_INFO "检查yum源中是否有texlive-latex-doc"
|
||||
dnf list available texlive-latex-doc &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到texlive-latex-doc"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装texlive-latex-doc
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "正在安装texlive-latex-doc"
|
||||
dnf install -y texlive-latex-doc &> /dev/null
|
||||
CHECK_RESULT $? 0 0 "安装texlive-latex-doc失败"
|
||||
fi
|
||||
|
||||
# 验证文档可访问性
|
||||
LOG_INFO "验证文档可访问性"
|
||||
man -k latex &> /dev/null
|
||||
CHECK_RESULT $? 0 0 "无法访问latex文档"
|
||||
|
||||
# 清理环境(如果测试前未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "正在卸载texlive-latex-doc"
|
||||
dnf remove -y texlive-latex-doc &> /dev/null
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-latex-doc失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:验证基本文档可访问性"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user