update testcase for testsuite texlive-sfg-doc

This commit is contained in:
2026-04-19 00:06:17 +08:00
parent 52a187a62e
commit ddfd3086ff
2 changed files with 0 additions and 65 deletions

View File

@@ -2,10 +2,6 @@
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-u/texlive-sfg-doc",
"machine num": 1,
"cases": [
{
"name": "test_texlive-sfg-doc_function_basic",
"desc": "Test basic functionality"
},
{
"name": "test_texlive-sfg-doc_function_install",
"desc": "Test if the package can be installed successfully"

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-03
# @License : Mulan PSL v2
# @Desc : Test basic functionality
# ############################################
source "$OET_PATH/libs/locallibs/common_lib.sh"
function run_test() {
# 检查是否已经安装texlive-sfg-doc软件包
LOG_INFO "检查是否已经安装texlive-sfg-doc软件包"
dnf list installed texlive-sfg-doc >/dev/null 2>&1
if [ $? -eq 0 ]; then
LOG_INFO "texlive-sfg-doc已安装脚本结束时保持安装状态"
INSTALLED=1
else
LOG_INFO "texlive-sfg-doc未安装将在测试结束后卸载"
INSTALLED=0
fi
# 检查yum源中是否有texlive-sfg-doc软件包
LOG_INFO "检查yum源中是否有texlive-sfg-doc软件包"
dnf list available texlive-sfg-doc >/dev/null 2>&1
CHECK_RESULT $? 0 255 "yum源中没有texlive-sfg-doc软件包"
# 安装texlive-sfg-doc软件包
if [ $INSTALLED -eq 0 ]; then
LOG_INFO "安装texlive-sfg-doc软件包"
dnf install -y texlive-sfg-doc >/dev/null 2>&1
CHECK_RESULT $? 0 0 "安装texlive-sfg-doc失败"
fi
# 测试基本功能
LOG_INFO "测试基本功能"
command_to_test --help >/dev/null 2>&1
CHECK_RESULT $? 0 255 "参数不存在或不支持"
# 清理环境
if [ $INSTALLED -eq 0 ]; then
LOG_INFO "卸载texlive-sfg-doc软件包"
dnf remove -y texlive-sfg-doc >/dev/null 2>&1
CHECK_RESULT $? 0 0 "卸载texlive-sfg-doc失败"
fi
LOG_INFO "测试完成"
}
main "$@"