From 033263d14b8bcb558b86f11e5cf9a03a4eab143e Mon Sep 17 00:00:00 2001 From: honghua Date: Sun, 19 Apr 2026 01:29:06 +0800 Subject: [PATCH] update testcase for testsuite texlive-photo --- .../texlive-split-r/texlive-photo.json | 11 ---- .../test_texlive-photo_upgrade.sh | 61 ------------------- 2 files changed, 72 deletions(-) delete mode 100644 suite2cases/function_test/pkg_test/texlive-split-r/texlive-photo.json delete mode 100644 testcases/function_test/pkg_test/texlive-split-r/texlive-photo/test_texlive-photo_upgrade.sh diff --git a/suite2cases/function_test/pkg_test/texlive-split-r/texlive-photo.json b/suite2cases/function_test/pkg_test/texlive-split-r/texlive-photo.json deleted file mode 100644 index 18143b9c5af..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-r/texlive-photo.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-r/texlive-photo", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-photo_upgrade", - "desc": "测试 texlive-photo 软件包的升级功能,验证升级过程是否正常完成。", - "machine num": 1 - } - ] -} \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-r/texlive-photo/test_texlive-photo_upgrade.sh b/testcases/function_test/pkg_test/texlive-split-r/texlive-photo/test_texlive-photo_upgrade.sh deleted file mode 100644 index 1fcecfd84f4..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-r/texlive-photo/test_texlive-photo_upgrade.sh +++ /dev/null @@ -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-07-04 -# @License : Mulan PSL v2 -# @Desc : 测试 texlive-photo 软件包的升级功能,验证升级过程是否正常完成。 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已经安装了 texlive-photo 软件包 - LOG_INFO "检查是否已经安装了 texlive-photo 软件包" - rpm -q texlive-photo > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-photo 已安装,脚本结束后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-phote 未安装,脚本结束后将卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-photo 软件包 - LOG_INFO "检查 yum 源中是否有 texlive-photo 软件包" - dnf list available texlive-photo > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum 源中不存在 texlive-photo 软件包" - - # 安装 texlive-photo - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装 texlive-photo 软件包" - dnf install -y texlive-photo - CHECK_RESULT $? 0 $? "安装 texlive-photo 失败" - fi - - # 验证升级功能 - LOG_INFO "测试升级功能" - dnf upgrade -y texlive-photo - CHECK_RESULT $? 0 $? "升级 texlive-photo 失败" - - # 清理环境:如果脚本开始时未安装,则卸载 texlive-phote;否则保持安装状态 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载 texlive-phote" - dnf remove -y texlive-phote - CHECK_RESULT $? 0 $? "卸载 texlate_photo 失败" - else - LOG_INFO "保持原状,不卸载 texlate_photo" - fi -} - -main "$@" \ No newline at end of file