diff --git a/suite2cases/function_test/pkg_test/texlive-split-q/texlive-omega-doc.json b/suite2cases/function_test/pkg_test/texlive-split-q/texlive-omega-doc.json index be22cd0d4f9..9d12c352ebc 100644 --- a/suite2cases/function_test/pkg_test/texlive-split-q/texlive-omega-doc.json +++ b/suite2cases/function_test/pkg_test/texlive-split-q/texlive-omega-doc.json @@ -17,10 +17,6 @@ { "name": "test_texlive-omega-doc_function_list_files", "desc": "Verify the list of files provided by texlive-omega-doc" - }, - { - "name": "test_texlive-omega-doc_function_doc_integrity", - "desc": "Verify the integrity of the main documentation file" } ] } \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-omega-doc/test_texlive-omega-doc_function_doc_integrity.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-omega-doc/test_texlive-omega-doc_function_doc_integrity.sh deleted file mode 100644 index eee8ade5551..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-omega-doc/test_texlive-omega-doc_function_doc_integrity.sh +++ /dev/null @@ -1,87 +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 : 2026-03-27 -# @License : Mulan PSL v2 -# @Desc : Verify the integrity of the main documentation file -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试脚本开始 - - # 定义变量 - PACKAGE_NAME="texlive-omega-doc" - LOG_INFO "开始测试:验证主文档文件的完整性" - - # 步骤1:检查yum源中是否存在指定软件包 - LOG_INFO "步骤1:检查yum源中是否存在软件包 $PACKAGE_NAME" - dnf list available $PACKAGE_NAME &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "软件包 $PACKAGE_NAME 在yum源中不存在" - exit 255 - fi - - # 步骤2:检查当前是否已安装软件包 - LOG_INFO "步骤2:检查当前是否已安装软件包 $PACKAGE_NAME" - INSTALLED=0 - if rpm -q $PACKAGE_NAME &>/dev/null; then - LOG_INFO "软件包 $PACKAGE_NAME 已安装" - INSTALLED=1 - else - LOG_INFO "软件包 $PACKAGE_NAME 未安装" - INSTALLED=0 - fi - - # 步骤3:如果未安装,则安装软件包 - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "步骤3:安装软件包 $PACKAGE_NAME" - dnf install -y $PACKAGE_NAME - CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败" - fi - - # 步骤4:验证主文档文件的完整性 - LOG_INFO "步骤4:验证主文档文件的完整性" - # 假设主文档文件位于 /usr/share/doc/texlive-omega-doc/ 目录下 - DOC_DIR="/usr/share/doc/texlive-omega-doc/" - if [ -d "$DOC_DIR" ]; then - LOG_INFO "文档目录 $DOC_DIR 存在" - # 检查目录下是否有文件 - FILE_COUNT=$(find "$DOC_DIR" -type f | wc -l) - if [ $FILE_COUNT -gt 0 ]; then - LOG_INFO "文档目录中包含 $FILE_COUNT 个文件,完整性检查通过" - else - LOG_ERROR "文档目录为空,完整性检查失败" - CHECK_RESULT 1 0 0 "文档目录为空" - fi - else - LOG_ERROR "文档目录 $DOC_DIR 不存在" - CHECK_RESULT 1 0 0 "文档目录不存在" - fi - - # 步骤5:清理环境 - LOG_INFO "步骤5:清理环境" - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载测试安装的软件包 $PACKAGE_NAME" - dnf remove -y $PACKAGE_NAME - CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败" - else - LOG_INFO "保持软件包 $PACKAGE_NAME 的安装状态" - fi - - LOG_INFO "测试完成:主文档文件完整性验证结束" -} - -main "$@" \ No newline at end of file