From f7207ec5e66020fb009abdfdf08f36b78d70907e Mon Sep 17 00:00:00 2001 From: honghua Date: Thu, 23 Apr 2026 13:05:51 +0800 Subject: [PATCH] update testcase for testsuite texlive-grabbox --- .../texlive-split-z/texlive-grabbox.json | 10 --- .../test_texlive-grabbox_function_basic.sh | 74 ------------------- 2 files changed, 84 deletions(-) delete mode 100644 suite2cases/function_test/pkg_test/texlive-split-z/texlive-grabbox.json delete mode 100644 testcases/function_test/pkg_test/texlive-split-z/texlive-grabbox/test_texlive-grabbox_function_basic.sh diff --git a/suite2cases/function_test/pkg_test/texlive-split-z/texlive-grabbox.json b/suite2cases/function_test/pkg_test/texlive-split-z/texlive-grabbox.json deleted file mode 100644 index 2d8402949c8..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-z/texlive-grabbox.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-z/texlive-grabbox", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-grabbox_function_basic", - "desc": "Test basic functionality of texlive-grabbox" - } - ] -} \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-z/texlive-grabbox/test_texlive-grabbox_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-z/texlive-grabbox/test_texlive-grabbox_function_basic.sh deleted file mode 100644 index 1ae11c259f2..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-z/texlive-grabbox/test_texlive-grabbox_function_basic.sh +++ /dev/null @@ -1,74 +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-27 -# @License : Mulan PSL v2 -# @Desc : Test basic functionality of texlive-grabbox -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试脚本:test_texlive-grabbox_function_basic - - LOG_INFO "开始测试 texlive-grabbox 的基本功能" - - # 检查是否已安装 texlive-grabbox - LOG_INFO "检查 texlive-grabbox 是否已安装" - dnf list installed texlive-grabbox > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-grabbox 已安装,测试结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-grabbox 未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-grabbox - LOG_INFO "检查 yum 源中是否有 texlive-grabbox" - dnf list available texlive-grabbox > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "yum 源中未找到 texlive-grabbox 软件包" - if [ $? -ne 0 ]; then - LOG_ERROR "yum 源中未找到 texlive-grabbox,退出测试" - exit 255 - fi - - # 如果未安装,则安装 texlive-grabbox - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装 texlive-grabbox" - dnf install -y texlive-grabbox - CHECK_RESULT $? 0 0 "安装 texlive-grabbox 失败" - fi - - # 测试 texlive-grabbox 的基本功能 - LOG_INFO "测试 texlive-grabbox 的基本功能" - texlive-grabbox --help > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "texlive-grabbox 命令不支持 --help 参数" - - # 检查 texlive-grabbox --version 参数 - LOG_INFO "检查 --version 参数" - texlive-grabbbox --version > /dev/null 2>&1 - CHECK_RESULT $? 255 255 "--version 参数不存在或不支持" - - # 清理环境:如果测试前未安装,则卸载软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载 texliv-e grabbox" - dnf remove -y texliv-e grabbox - CHECK_RESULT $? 0 0 “卸载 texliv-e grabbox失败” - fi - - LOG_INF0 “测试完成” -} - -main "$@" \ No newline at end of file