diff --git a/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help.json b/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help.json
deleted file mode 100644
index ce1832d6c76..00000000000
--- a/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help",
- "machine num": 1,
- "cases": [
- {
- "name": "test_glassfish-jaxb-help_function_init",
- "desc": "Test initialization of glassfish-jaxb-help"
- },
- {
- "name": "test_glassfish-jaxb-help_function_parse",
- "desc": "Test XML parsing functionality"
- },
- {
- "name": "test_glassfish-jaxb-help_function_install",
- "desc": "Test installation of glassfish-jaxb-help package"
- },
- {
- "name": "test_glassfish-jaxb-help_function_check_ver",
- "desc": "Test checking package version"
- },
- {
- "name": "test_glassfish-jaxb-help_function_uninstall",
- "desc": "Test uninstallation of glassfish-jaxb-help package"
- },
- {
- "name": "test_glassfish-jaxb-help_function_bind_schema",
- "desc": "Test binding XML schema to classes"
- },
- {
- "name": "test_glassfish-jaxb-help_function_marshal_obj",
- "desc": "Test marshalling Java objects to XML"
- },
- {
- "name": "test_glassfish-jaxb-help_function_unmarshal_xml",
- "desc": "Test unmarshalling XML to Java objects"
- },
- {
- "name": "test_glassfish-jaxb-help_function_validate_xml",
- "desc": "Test XML validation against schema"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/guava/guava-help.json b/suite2cases/function_test/pkg_test/guava/guava-help.json
deleted file mode 100644
index eb583c5ade0..00000000000
--- a/suite2cases/function_test/pkg_test/guava/guava-help.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/guava/guava-help",
- "machine num": 1,
- "cases": [
- {
- "name": "test_guava-help_install",
- "desc": "测试guava-help软件包的安装功能",
- "machine num": 1
- },
- {
- "name": "test_guava-help_function_load",
- "desc": "测试guava-help软件包的加载功能"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/jarjar/jarjar-help.json b/suite2cases/function_test/pkg_test/jarjar/jarjar-help.json
index 309736e2234..79e730953c5 100644
--- a/suite2cases/function_test/pkg_test/jarjar/jarjar-help.json
+++ b/suite2cases/function_test/pkg_test/jarjar/jarjar-help.json
@@ -14,18 +14,6 @@
{
"name": "test_jarjar-help_function_uninstall",
"desc": "Test the uninstallation functionality of jarjar-help package"
- },
- {
- "name": "test_jarjar-help_function_version",
- "desc": "Test the version query functionality of jarjar-help"
- },
- {
- "name": "test_jarjar-help_function_help",
- "desc": "Test the help information display functionality"
- },
- {
- "name": "test_jarjar-help_function_usage",
- "desc": "Test the basic usage functionality of jarjar-help"
}
]
}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/log4j/log4j-web.json b/suite2cases/function_test/pkg_test/log4j/log4j-web.json
index 6b5f60e97ac..a1b64fd977b 100644
--- a/suite2cases/function_test/pkg_test/log4j/log4j-web.json
+++ b/suite2cases/function_test/pkg_test/log4j/log4j-web.json
@@ -16,10 +16,6 @@
"name": "test_log4j-web_upgrade",
"desc": "测试log4j-web软件包的升级功能,验证升级是否成功",
"machine num": 1
- },
- {
- "name": "test_log4j-web_function_config",
- "desc": "测试log4j-web软件包的配置功能,验证配置是否生效"
}
]
}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/python-branca/python-branca-help.json b/suite2cases/function_test/pkg_test/python-branca/python-branca-help.json
deleted file mode 100644
index 7ea54ee0606..00000000000
--- a/suite2cases/function_test/pkg_test/python-branca/python-branca-help.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/python-branca/python-branca-help",
- "machine num": 1,
- "cases": [
- {
- "name": "test_python-branca-help_function_init",
- "desc": "Test initialization of the package"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/rubygem-liquid/rubygem-liquid-doc.json b/suite2cases/function_test/pkg_test/rubygem-liquid/rubygem-liquid-doc.json
deleted file mode 100644
index 6eefbacec68..00000000000
--- a/suite2cases/function_test/pkg_test/rubygem-liquid/rubygem-liquid-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/rubygem-liquid/rubygem-liquid-doc",
- "machine num": 1,
- "cases": [
- {
- "name": "test_rubygem-liquid-doc_function_parse",
- "desc": "Test parsing functionality"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/rust/rust-help.json b/suite2cases/function_test/pkg_test/rust/rust-help.json
deleted file mode 100644
index 3c02d0bfad9..00000000000
--- a/suite2cases/function_test/pkg_test/rust/rust-help.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/rust/rust-help",
- "machine num": 1,
- "cases": [
- {
- "name": "test_rust-help_function_install",
- "desc": "Test installation of rust-help"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/texlive-split-g/texlive-dk-bib.json b/suite2cases/function_test/pkg_test/texlive-split-g/texlive-dk-bib.json
deleted file mode 100644
index 3fc6e925b62..00000000000
--- a/suite2cases/function_test/pkg_test/texlive-split-g/texlive-dk-bib.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-g/texlive-dk-bib",
- "machine num": 1,
- "cases": [
- {
- "name": "test_texlive-dk-bib_function_bib",
- "desc": "Test basic bibliography functionality"
- },
- {
- "name": "test_texlive-dk-bib_function_cite",
- "desc": "Test citation functionality"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/texlive-split-q/texlive-notestex.json b/suite2cases/function_test/pkg_test/texlive-split-q/texlive-notestex.json
deleted file mode 100644
index f6752515a0a..00000000000
--- a/suite2cases/function_test/pkg_test/texlive-split-q/texlive-notestex.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex",
- "machine num": 1,
- "cases": [
- {
- "name": "test_texlive-notestex_function_basic",
- "desc": "Test basic functionality of texlive-notestex"
- },
- {
- "name": "test_texlive-notestex_function_install",
- "desc": "Test installation of texlive-notestex package"
- },
- {
- "name": "test_texlive-notestex_function_uninstall",
- "desc": "Test uninstallation of texlive-notestex package"
- },
- {
- "name": "test_texlive-notestex_function_check_installed",
- "desc": "Test verification of package installation status"
- },
- {
- "name": "test_texlive-notestex_function_basic_cmd",
- "desc": "Test execution of basic package commands"
- },
- {
- "name": "test_texlive-notestex_function_doc_access",
- "desc": "Test access to package documentation"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc.json b/suite2cases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc.json
deleted file mode 100644
index eb3741e91b6..00000000000
--- a/suite2cases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc",
- "machine num": 1,
- "cases": [
- {
- "name": "test_texlive-pagerange-doc_function_basic",
- "desc": "Basic functionality test for texlive-pagerange-doc"
- },
- {
- "name": "test_texlive-pagerange-doc_function_installation",
- "desc": "Test if the texlive-pagerange-doc package can be installed correctly"
- },
- {
- "name": "test_texlive-pagerange-doc_function_uninstall",
- "desc": "Test if the texlive-pagerange-doc package can be uninstalled cleanly"
- },
- {
- "name": "test_texlive-pagerange-doc_function_version",
- "desc": "Test if the correct version of texlive-pagerange-doc package is installed"
- },
- {
- "name": "test_texlive-pagerange-doc_function_doc_files",
- "desc": "Test if the documentation files for texlive-pagerange are present after installation"
- },
- {
- "name": "test_texlive-pagerange-doc_function_basic_usage",
- "desc": "Test the basic usage example of the pagerange package as described in the documentation"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/texlive-split-x/texlive-typewriter.json b/suite2cases/function_test/pkg_test/texlive-split-x/texlive-typewriter.json
deleted file mode 100644
index 13b5f3957b1..00000000000
--- a/suite2cases/function_test/pkg_test/texlive-split-x/texlive-typewriter.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-x/texlive-typewriter",
- "machine num": 1,
- "cases": [
- {
- "name": "test_texlive-typewriter_function_font",
- "desc": "Test the font rendering functionality"
- }
- ]
-}
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_bind_schema.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_bind_schema.sh
deleted file mode 100644
index 4ed557582d0..00000000000
--- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_bind_schema.sh
+++ /dev/null
@@ -1,76 +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-02-24
-# @License : Mulan PSL v2
-# @Desc : Test binding XML schema to classes
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test binding XML schema to classes"
-
- # 定义软件包名称
- PACKAGE_NAME="glassfish-jaxb"
- LOG_INFO "检查yum源中是否存在软件包: $PACKAGE_NAME"
- if ! dnf list available $PACKAGE_NAME &>/dev/null; then
- LOG_ERROR "yum源中未找到软件包: $PACKAGE_NAME"
- exit 255
- fi
-
- # 检查是否已安装
- LOG_INFO "检查环境是否已安装 $PACKAGE_NAME"
- if rpm -q $PACKAGE_NAME &>/dev/null; then
- INSTALLED=true
- LOG_INFO "$PACKAGE_NAME 已安装,测试后保持安装状态"
- else
- INSTALLED=false
- LOG_INFO "$PACKAGE_NAME 未安装,将进行安装测试"
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装软件包: $PACKAGE_NAME"
- dnf install -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "安装 $PACKAGE_NAME 失败"
- fi
-
- # 测试绑定XML schema到类
- LOG_INFO "测试绑定XML schema到类"
- # 假设命令为jaxb-schema-bind,参数为--schema-file
- COMMAND="jaxb-schema-bind"
- SCHEMA_FILE="test.xsd"
- LOG_INFO "检查命令 $COMMAND 是否支持 --schema-file 参数"
- $COMMAND --help | grep -q "\-\-schema-file"
- CHECK_RESULT $? 0 0 "命令 $COMMAND 不支持 --schema-file 参数"
-
- LOG_INFO "执行命令: $COMMAND --schema-file $SCHEMA_FILE"
- $COMMAND --schema-file $SCHEMA_FILE
- CHECK_RESULT $? 0 0 "绑定XML schema到类失败"
-
- # 清理环境
- LOG_INFO "清理测试环境"
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载软件包: $PACKAGE_NAME"
- dnf remove -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "卸载 $PACKAGE_NAME 失败"
- else
- LOG_INFO "保持 $PACKAGE_NAME 安装状态"
- fi
-
- LOG_INFO "测试完成:Test binding XML schema to classes"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_check_ver.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_check_ver.sh
deleted file mode 100644
index 71edbba8685..00000000000
--- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_check_ver.sh
+++ /dev/null
@@ -1,79 +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-02-24
-# @License : Mulan PSL v2
-# @Desc : Test checking package version
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:检查软件包版本"
-
- LOG_INFO "步骤1:检查yum源中是否存在glassfish-jaxb-help软件包"
- dnf list available glassfish-jaxb-help > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到glassfish-jaxb-help软件包"
- exit 255
- fi
-
- LOG_INFO "步骤2:检查系统是否已安装glassfish-jaxb-help"
- rpm -q glassfish-jaxb-help > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- INSTALLED=true
- LOG_INFO "glassfish-jaxb-help已安装,测试结束后将保持安装状态"
- else
- INSTALLED=false
- LOG_INFO "glassfish-jaxb-help未安装,将进行安装测试"
- fi
-
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "步骤3:安装glassfish-jaxb-help软件包"
- dnf install -y glassfish-jaxb-help
- CHECK_RESULT $? 0 0 "安装glassfish-jaxb-help失败"
- fi
-
- LOG_INFO "步骤4:检查glassfish-jaxb-help命令的--help参数"
- glassfish-jaxb-help --help > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "glassfish-jaxb-help命令不支持--help参数"
- exit 255
- fi
-
- LOG_INFO "步骤5:检查glassfish-jaxb-help命令的版本参数"
- glassfish-jaxb-help --version > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "glassfish-jaxb-help命令不支持--version参数"
- exit 255
- fi
-
- LOG_INFO "步骤6:获取并验证glassfish-jaxb-help版本信息"
- VERSION_OUTPUT=$(glassfish-jaxb-help --version 2>&1)
- CHECK_RESULT $? 0 0 "执行glassfish-jaxb-help --version命令失败"
- LOG_INFO "glassfish-jaxb-help版本信息:$VERSION_OUTPUT"
-
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "步骤7:卸载glassfish-jaxb-help软件包"
- dnf remove -y glassfish-jaxb-help
- CHECK_RESULT $? 0 0 "卸载glassfish-jaxb-help失败"
- LOG_INFO "环境已恢复:glassfish-jaxb-help已卸载"
- else
- LOG_INFO "步骤7:保持glassfish-jaxb-help安装状态,不进行卸载"
- fi
-
- LOG_INFO "测试完成:glassfish-jaxb-help版本检查成功"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_init.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_init.sh
deleted file mode 100644
index 4f86f338d12..00000000000
--- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_init.sh
+++ /dev/null
@@ -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-29
-# @License : Mulan PSL v2
-# @Desc : Test initialization of glassfish-jaxb-help
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查yum源中是否存在glassfish-jaxb-help软件包
- LOG_INFO "检查yum源中是否存在glassfish-jaxb-help软件包"
- dnf list available glassfish-jaxb-help >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在glassfish-jaxb-help软件包"
- exit 255
- fi
-
- # 检查是否已安装glassfish-jaxb-help
- LOG_INFO "检查是否已安装glassfish-jaxb-help"
- rpm -q glassfish-jaxb-help >/dev/null 2>&1
- if [ $? -eq 0 ]; then
- installed=true
- LOG_INFO "glassfish-jaxb-help已安装"
- else
- installed=false
- LOG_INFO "glassfish-jaxb-help未安装,将进行安装测试"
- fi
-
- # 如果未安装,则安装glassfish-jaxb-help
- if [ "$installed" = false ]; then
- LOG_INFO "安装glassfish-jaxb-help"
- dnf install -y glassfish-jaxb-help
- CHECK_RESULT $? 0 0 "安装glassfish-jaxb-help失败"
- fi
-
- # 测试glassfish-jaxb-help初始化功能
- LOG_INFO "测试glassfish-jaxb-help初始化功能"
- glassfish-jaxb-help --init >/dev/null 2>&1
- CHECK_RESULT $? 0 0 "glassfish-jaxb-help初始化失败"
-
- # 清理环境:如果脚本开始时未安装,则卸载glassfish-jaxb-help
- if [ "$installed" = false ]; then
- LOG_INFO "卸载glassfish-jaxb-help"
- dnf remove -y glassfish-jaxb-help
- CHECK_RESULT $? 0 0 "卸载glassfish-jaxb-help失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_install.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_install.sh
deleted file mode 100644
index 724f2130bd8..00000000000
--- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_install.sh
+++ /dev/null
@@ -1,63 +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-02-24
-# @License : Mulan PSL v2
-# @Desc : Test installation of glassfish-jaxb-help package
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试 glassfish-jaxb-help 软件包安装功能"
- LOG_INFO "步骤1: 检查 glassfish-jaxb-help 软件包是否已在YUM源中"
- dnf list available glassfish-jaxb-help
- CHECK_RESULT $? 0 0 "glassfish-jaxb-help 软件包在YUM源中不存在"
-
- LOG_INFO "步骤2: 检查 glassfish-jaxb-help 软件包是否已安装"
- rpm -q glassfish-jaxb-help
- if [ $? -eq 0 ]; then
- LOG_INFO "glassfish-jaxb-help 软件包已安装,测试结束将保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "glassfish-jaxb-help 软件包未安装,将进行安装测试"
- INSTALLED=0
- fi
-
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤3: 安装 glassfish-jaxb-help 软件包"
- dnf install -y glassfish-jaxb-help
- CHECK_RESULT $? 0 0 "安装 glassfish-jaxb-help 软件包失败"
- fi
-
- LOG_INFO "步骤4: 验证 glassfish-jaxb-help 软件包安装成功"
- rpm -q glassfish-jaxb-help
- CHECK_RESULT $? 0 0 "glassfish-jaxb-help 软件包安装后验证失败"
-
- LOG_INFO "步骤5: 检查 glassfish-jaxb-help 命令是否可用"
- glassfish-jaxb-help --help
- CHECK_RESULT $? 0 0 "glassfish-jaxb-help 命令参数检查失败"
-
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤6: 清理环境,卸载 glassfish-jaxb-help 软件包"
- dnf remove -y glassfish-jaxb-help
- CHECK_RESULT $? 0 0 "卸载 glassfish-jaxb-help 软件包失败"
- else
- LOG_INFO "步骤6: 环境已安装 glassfish-jaxb-help,保持原状,无需卸载"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_marshal_obj.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_marshal_obj.sh
deleted file mode 100644
index 72234a68c04..00000000000
--- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_marshal_obj.sh
+++ /dev/null
@@ -1,155 +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-02-24
-# @License : Mulan PSL v2
-# @Desc : Test marshalling Java objects to XML
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 判断是否已安装glassfish-jaxb相关包
- LOG_INFO "检查glassfish-jaxb相关软件包是否已安装"
- rpm -qa | grep -E "^glassfish-jaxb" > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "glassfish-jaxb相关软件包已安装,标记为已安装状态"
- INSTALLED="true"
- else
- LOG_INFO "glassfish-jaxb相关软件包未安装"
- INSTALLED="false"
- fi
-
- # 检查yum源中是否有glassfish-jaxb软件包
- LOG_INFO "检查yum源中是否有glassfish-jaxb软件包"
- dnf list available glassfish-jaxb 2>/dev/null | grep -q glassfish-jaxb
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中没有glassfish-jaxb软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = "false" ]; then
- LOG_INFO "开始安装glassfish-jaxb软件包"
- dnf install -y glassfish-jaxb
- CHECK_RESULT $? 0 0 "安装glassfish-jaxb软件包失败"
- LOG_INFO "glassfish-jaxb软件包安装成功"
- fi
-
- # 测试marshalling Java objects to XML功能
- LOG_INFO "测试marshalling Java objects to XML功能"
-
- # 创建一个简单的Java类用于测试
- LOG_INFO "创建测试Java类"
- cat > TestObject.java << "EOF"
- import javax.xml.bind.annotation.XmlRootElement;
-
- @XmlRootElement
- public class TestObject {
- private String name;
- private int value;
-
- public TestObject() {}
-
- public TestObject(String name, int value) {
- this.name = name;
- this.value = value;
- }
-
- public String getName() { return name; }
- public void setName(String name) { this.name = name; }
-
- public int getValue() { return value; }
- public void setValue(int value) { this.value = value; }
- }
- EOF
-
- # 编译Java类
- LOG_INFO "编译测试Java类"
- javac TestObject.java
- CHECK_RESULT $? 0 0 "编译Java类失败"
-
- # 创建测试程序
- LOG_INFO "创建测试marshalling程序"
- cat > TestMarshal.java << "EOF"
- import javax.xml.bind.JAXBContext;
- import javax.xml.bind.Marshaller;
- import java.io.StringWriter;
-
- public class TestMarshal {
- public static void main(String[] args) {
- try {
- TestObject obj = new TestObject("test", 123);
-
- JAXBContext context = JAXBContext.newInstance(TestObject.class);
- Marshaller marshaller = context.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- StringWriter writer = new StringWriter();
- marshaller.marshal(obj, writer);
-
- String xml = writer.toString();
- System.out.println("Marshalled XML:");
- System.out.println(xml);
-
- // 检查生成的XML是否包含预期的内容
- if (xml.contains("test") && xml.contains("123")) {
- System.out.println("SUCCESS: Marshalling completed successfully");
- } else {
- System.out.println("FAILURE: Marshalling did not produce expected XML");
- System.exit(1);
- }
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- }
- EOF
-
- # 编译测试程序
- LOG_INFO "编译测试程序"
- javac -cp . TestMarshal.java
- CHECK_RESULT $? 0 0 "编译测试程序失败"
-
- # 运行测试程序
- LOG_INFO "运行marshalling测试"
- java -cp . TestMarshal > marshal_output.txt 2>&1
- CHECK_RESULT $? 0 0 "marshalling测试执行失败"
-
- # 检查输出结果
- LOG_INFO "检查marshalling测试结果"
- grep -q "SUCCESS: Marshalling completed successfully" marshal_output.txt
- CHECK_RESULT $? 0 0 "marshalling测试未产生预期结果"
-
- LOG_INFO "marshalling测试成功完成"
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- rm -f TestObject.java TestObject.class TestMarshal.java TestMarshal.class marshal_output.txt
-
- # 如果脚本开始时未安装,则在结束时卸载软件包
- if [ "$INSTALLED" = "false" ]; then
- LOG_INFO "卸载glassfish-jaxb软件包"
- dnf remove -y glassfish-jaxb
- CHECK_RESULT $? 0 0 "卸载glassfish-jaxb软件包失败"
- LOG_INFO "glassfish-jaxb软件包卸载成功"
- else
- LOG_INFO "保持glassfish-jaxb软件包安装状态"
- fi
-
- LOG_INFO "测试脚本执行完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_parse.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_parse.sh
deleted file mode 100644
index 9ed4f110693..00000000000
--- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_parse.sh
+++ /dev/null
@@ -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-12-11
-# @License : Mulan PSL v2
-# @Desc : Test XML parsing functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查yum源中是否存在glassfish-jaxb软件包
- LOG_INFO "检查yum源中是否存在glassfish-jaxb软件包"
- dnf list available glassfish-jaxb &> /dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在glassfish-jaxb软件包"
- exit 255
- fi
-
- # 检查是否已安装glassfish-jaxb
- LOG_INFO "检查是否已安装glassfish-jaxb"
- rpm -q glassfish-jaxb &> /dev/null
- if [ $? -eq 0 ]; then
- installed=true
- LOG_INFO "glassfish-jaxb已安装,脚本结束时将保持安装状态"
- else
- installed=false
- LOG_INFO "glassfish-jaxb未安装,将在测试结束后卸载"
- fi
-
- # 安装glassfish-jaxb
- if [ "$installed" = false ]; then
- LOG_INFO "开始安装glassfish-jaxb"
- dnf install -y glassfish-jaxb &> /dev/null
- CHECK_RESULT $? 0 0 "安装glassfish-jaxb失败"
- fi
-
- # 测试XML解析功能
- LOG_INFO "测试XML解析功能"
- java -jar /usr/share/glassfish-jaxb/jaxb-ri.jar -version &> /dev/null
- CHECK_RESULT $? 0 0 "XML解析功能测试失败"
-
- # 清理环境
- if [ "$installed" = false ]; then
- LOG_INFO "卸载glassfish-jaxb"
- dnf remove -y glassfish-jaxb &> /dev/null
- CHECK_RESULT $? 0 0 "卸载glassfish-jaxb失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_uninstall.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_uninstall.sh
deleted file mode 100644
index c12204dd458..00000000000
--- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_uninstall.sh
+++ /dev/null
@@ -1,84 +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-02-24
-# @License : Mulan PSL v2
-# @Desc : Test uninstallation of glassfish-jaxb-help package
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义全局变量
- PACKAGE_NAME="glassfish-jaxb-help"
- INSTALLED_FLAG=0
-
- # 步骤1: 检查软件包是否已在yum源中
- LOG_INFO "步骤1: 检查yum源中是否存在$PACKAGE_NAME软件包"
- dnf list available $PACKAGE_NAME &> /dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到$PACKAGE_NAME软件包"
- exit 255
- fi
- LOG_INFO "yum源中存在$PACKAGE_NAME软件包"
-
- # 步骤2: 检查当前环境是否已安装该软件包
- LOG_INFO "步骤2: 检查当前环境是否已安装$PACKAGE_NAME软件包"
- rpm -q $PACKAGE_NAME &> /dev/null
- if [ $? -eq 0 ]; then
- LOG_INFO "当前环境已安装$PACKAGE_NAME软件包"
- INSTALLED_FLAG=1
- else
- LOG_INFO "当前环境未安装$PACKAGE_NAME软件包"
- INSTALLED_FLAG=0
- fi
-
- # 步骤3: 如果未安装,则安装软件包作为测试步骤
- if [ $INSTALLED_FLAG -eq 0 ]; then
- LOG_INFO "步骤3: 安装$PACKAGE_NAME软件包"
- dnf install -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "安装$PACKAGE_NAME软件包失败"
- LOG_INFO "安装$PACKAGE_NAME软件包成功"
- fi
-
- # 步骤4: 测试卸载软件包
- LOG_INFO "步骤4: 测试卸载$PACKAGE_NAME软件包"
- dnf remove -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "卸载$PACKAGE_NAME软件包失败"
- LOG_INFO "卸载$PACKAGE_NAME软件包成功"
-
- # 步骤5: 验证软件包是否已卸载
- LOG_INFO "步骤5: 验证$PACKAGE_NAME软件包是否已卸载"
- rpm -q $PACKAGE_NAME &> /dev/null
- if [ $? -eq 0 ]; then
- LOG_ERROR "卸载后$PACKAGE_NAME软件包仍然存在"
- exit 1
- fi
- LOG_INFO "验证通过:$PACKAGE_NAME软件包已成功卸载"
-
- # 步骤6: 环境恢复
- LOG_INFO "步骤6: 恢复环境状态"
- if [ $INSTALLED_FLAG -eq 1 ]; then
- LOG_INFO "重新安装$PACKAGE_NAME软件包以恢复原始状态"
- dnf install -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "重新安装$PACKAGE_NAME软件包失败"
- LOG_INFO "环境已恢复到原始安装状态"
- else
- LOG_INFO "原始环境未安装$PACKAGE_NAME,无需恢复"
- fi
-
- LOG_INFO "测试完成:成功测试了glassfish-jaxb-help软件包的卸载功能"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_unmarshal_xml.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_unmarshal_xml.sh
deleted file mode 100644
index 4a83cc0a430..00000000000
--- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_unmarshal_xml.sh
+++ /dev/null
@@ -1,110 +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-02-24
-# @License : Mulan PSL v2
-# @Desc : Test unmarshalling XML to Java objects
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test unmarshalling XML to Java objects"
- LOG_INFO "步骤1:检查系统中是否已安装glassfish-jaxb软件包"
- rpm -q glassfish-jaxb
- if [ $? -eq 0 ]; then
- LOG_INFO "glassfish-jaxb已安装,将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "glassfish-jaxb未安装,将在测试过程中安装"
- INSTALLED=false
- fi
- LOG_INFO "步骤2:检查yum源中是否有glassfish-jaxb软件包"
- dnf list available glassfish-jaxb
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到glassfish-jaxb软件包"
- exit 255
- fi
- if [ "$INSTALLED" = "false" ]; then
- LOG_INFO "步骤3:安装glassfish-jaxb软件包"
- dnf install -y glassfish-jaxb
- CHECK_RESULT $? 0 0 "安装glassfish-jaxb失败"
- fi
- LOG_INFO "步骤4:检查xjc命令是否支持-unmarshal参数"
- xjc -help 2>&1 | grep -q "\-unmarshal"
- if [ $? -ne 0 ]; then
- LOG_ERROR "xjc命令不支持-unmarshal参数"
- exit 255
- fi
- LOG_INFO "步骤5:创建一个简单的XML文件用于测试"
- cat > test.xml << EOF
-
-
- Test Content
-
- EOF
- CHECK_RESULT $? 0 0 "创建XML文件失败"
- LOG_INFO "步骤6:创建一个简单的XSD文件用于测试"
- cat > test.xsd << EOF
-
-
-
-
-
-
-
-
-
-
- EOF
- CHECK_RESULT $? 0 0 "创建XSD文件失败"
- LOG_INFO "步骤7:使用xjc生成Java类"
- xjc -d . test.xsd
- CHECK_RESULT $? 0 0 "生成Java类失败"
- LOG_INFO "步骤8:编译生成的Java类"
- javac *.java
- CHECK_RESULT $? 0 0 "编译Java类失败"
- LOG_INFO "步骤9:编写一个简单的Java程序来测试unmarshal功能"
- cat > TestUnmarshal.java << EOF
- import javax.xml.bind.JAXBContext;
- import javax.xml.bind.Unmarshaller;
- import java.io.File;
- public class TestUnmarshal {
- public static void main(String[] args) throws Exception {
- JAXBContext jaxbContext = JAXBContext.newInstance(Root.class);
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
- Root root = (Root) unmarshaller.unmarshal(new File("test.xml"));
- System.out.println("Unmarshalled element: " + root.getElement());
- }
- }
- EOF
- CHECK_RESULT $? 0 0 "创建测试Java程序失败"
- LOG_INFO "步骤10:编译测试Java程序"
- javac -cp . TestUnmarshal.java
- CHECK_RESULT $? 0 0 "编译测试Java程序失败"
- LOG_INFO "步骤11:运行测试程序"
- java -cp . TestUnmarshal
- CHECK_RESULT $? 0 0 "运行测试程序失败"
- LOG_INFO "步骤12:清理生成的Java类和编译文件"
- rm -f *.java *.class test.xml test.xsd
- CHECK_RESULT $? 0 0 "清理文件失败"
- if [ "$INSTALLED" = "false" ]; then
- LOG_INFO "步骤13:卸载glassfish-jaxb软件包"
- dnf remove -y glassfish-jaxb
- CHECK_RESULT $? 0 0 "卸载glassfish-jaxb失败"
- fi
- LOG_INFO "测试完成:Test unmarshalling XML to Java objects"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_validate_xml.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_validate_xml.sh
deleted file mode 100644
index 4b69227cd0b..00000000000
--- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-help/test_glassfish-jaxb-help_function_validate_xml.sh
+++ /dev/null
@@ -1,120 +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-02-24
-# @License : Mulan PSL v2
-# @Desc : Test XML validation against schema
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test XML validation against schema"
-
- LOG_INFO "步骤1:检查yum源中是否存在glassfish-jaxb软件包"
- dnf list available glassfish-jaxb 2>/dev/null | grep -q glassfish-jaxb
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到glassfish-jaxb软件包"
- exit 255
- fi
-
- LOG_INFO "步骤2:检查系统是否已安装glassfish-jaxb"
- rpm -q glassfish-jaxb > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "系统已安装glassfish-jaxb,测试结束后将保持安装状态"
- INSTALLED_BEFORE=1
- else
- LOG_INFO "系统未安装glassfish-jaxb,将在测试后卸载"
- INSTALLED_BEFORE=0
- fi
-
- if [ $INSTALLED_BEFORE -eq 0 ]; then
- LOG_INFO "步骤3:安装glassfish-jaxb软件包"
- dnf install -y glassfish-jaxb
- CHECK_RESULT $? 0 0 "安装glassfish-jaxb失败"
- fi
-
- LOG_INFO "步骤4:检查xjc命令的--help参数是否支持"
- xjc --help > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "xjc命令不支持--help参数或命令不存在"
- if [ $INSTALLED_BEFORE -eq 0 ]; then
- dnf remove -y glassfish-jaxb
- fi
- exit 255
- fi
-
- LOG_INFO "步骤5:创建测试XML和XSD文件"
- cat > test_schema.xsd << "EOF"
-
-
-
-
-
-
-
-
-
-
-
- EOF
-
- cat > test_valid.xml << "EOF"
-
-
- 张三
- 30
-
- EOF
-
- cat > test_invalid.xml << "EOF"
-
-
- 李四
- not_a_number
-
- EOF
-
- LOG_INFO "步骤6:使用xjc验证有效的XML文件"
- xjc -version > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "xjc命令执行失败"
-
- LOG_INFO "步骤7:使用第三方工具验证XML(使用xmllint)"
- which xmllint > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- xmllint --schema test_schema.xsd test_valid.xml --noout
- CHECK_RESULT $? 0 0 "有效的XML验证失败"
-
- xmllint --schema test_schema.xsd test_invalid.xml --noout 2>/dev/null
- CHECK_RESULT $? 0 1 "无效的XML验证应失败但通过了"
- else
- LOG_INFO "未找到xmllint工具,跳过XML验证测试"
- fi
-
- LOG_INFO "步骤8:清理测试文件"
- rm -f test_schema.xsd test_valid.xml test_invalid.xml
-
- LOG_INFO "步骤9:环境恢复"
- if [ $INSTALLED_BEFORE -eq 0 ]; then
- LOG_INFO "卸载glassfish-jaxb软件包"
- dnf remove -y glassfish-jaxb
- CHECK_RESULT $? 0 0 "卸载glassfish-jaxb失败"
- else
- LOG_INFO "保持glassfish-jaxb安装状态"
- fi
-
- LOG_INFO "测试完成:Test XML validation against schema"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/guava/guava-help/test_guava-help_function_load.sh b/testcases/function_test/pkg_test/guava/guava-help/test_guava-help_function_load.sh
deleted file mode 100644
index 4fd3798e36c..00000000000
--- a/testcases/function_test/pkg_test/guava/guava-help/test_guava-help_function_load.sh
+++ /dev/null
@@ -1,67 +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-12-10
-# @License : Mulan PSL v2
-# @Desc : 测试guava-help软件包的加载功能
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- LOG_INFO "开始测试guava-help软件包的加载功能"
-
- # 检查环境是否已安装guava-help
- LOG_INFO "检查guava-help软件包是否已安装"
- if dnf list installed guava-help &>/dev/null; then
- LOG_INFO "guava-help软件包已安装,测试结束后将保持安装状态"
- installed=true
- else
- LOG_INFO "guava-help软件包未安装,测试结束后将卸载"
- installed=false
- fi
-
- # 检查yum源中是否有guava-help软件包
- LOG_INFO "检查yum源中是否存在guava-help软件包"
- if ! dnf list available guava-help &>/dev/null; then
- LOG_ERROR "yum源中未找到guava-help软件包"
- exit 255
- fi
-
- # 安装guava-help软件包
- LOG_INFO "安装guava-help软件包"
- dnf install -y guava-help
- CHECK_RESULT $? 0 0 "安装guava-help软件包失败"
-
- # 测试加载功能
- LOG_INFO "测试guava-help软件包的加载功能"
- command_to_test="guava-help --version" # 假设--version是支持的参数
- eval $command_to_test
- CHECK_RESULT $? 0 0 "guava-help加载功能测试失败"
-
- # 清理环境
- if [ "$installed" = false ]; then
- LOG_INFO "卸载guava-help软件包"
- dnf remove -y guava-help
- CHECK_RESULT $? 0 0 "卸载guava-help软件包失败"
- else
- LOG_INFO "保持guava-help软件包的安装状态"
- fi
-
- LOG_INFO "测试完成"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/guava/guava-help/test_guava-help_install.sh b/testcases/function_test/pkg_test/guava/guava-help/test_guava-help_install.sh
deleted file mode 100644
index c7eeab91062..00000000000
--- a/testcases/function_test/pkg_test/guava/guava-help/test_guava-help_install.sh
+++ /dev/null
@@ -1,59 +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-06-12
-# @License : Mulan PSL v2
-# @Desc : 测试guava-help软件包的安装功能
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查guava-help软件包是否已安装
- LOG_INFO "检查guava-help软件包是否已安装"
- rpm -q guava-help > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "guava-help软件包已安装,脚本结束时将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "guava-help软件包未安装,将在测试完成后卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否存在guava-help软件包
- LOG_INFO "检查yum源中是否存在guava-help软件包"
- dnf list available guava-help > /dev/null 2>&1
- CHECK_RESULT $? 0 255 "yum源中未找到guava-help软件包"
-
- # 安装guava-help软件包
- LOG_INFO "开始安装guava-help软件包"
- dnf install -y guava-help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "安装guava-help软件包失败"
-
- # 验证guava-help命令是否可用
- LOG_INFO "验证guava-help命令是否可用"
- guava-help --help > /dev/null 2>&1
- CHECK_RESULT $? 0 255 "guava-help命令不支持或参数错误"
-
- # 清理环境:如果脚本开始时未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "清理环境:卸载guava-help软件包"
- dnf remove -y guava-help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "卸载guava-help软件包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/jarjar/jarjar-help/test_jarjar-help_function_help.sh b/testcases/function_test/pkg_test/jarjar/jarjar-help/test_jarjar-help_function_help.sh
deleted file mode 100644
index 61c064769a5..00000000000
--- a/testcases/function_test/pkg_test/jarjar/jarjar-help/test_jarjar-help_function_help.sh
+++ /dev/null
@@ -1,92 +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-29
-# @License : Mulan PSL v2
-# @Desc : Test the help information display functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义软件包名称
- PACKAGE_NAME="jarjar-help-function"
- LOG_INFO "测试开始:验证帮助信息显示功能"
-
- # 步骤1:检查软件包是否已在yum源中
- LOG_INFO "步骤1:检查软件包是否在yum源中"
- dnf list available ${PACKAGE_NAME} &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 ${PACKAGE_NAME} 不在yum源中"
- exit 255
- fi
-
- # 步骤2:检查环境是否已安装软件包
- LOG_INFO "步骤2:检查环境是否已安装软件包"
- INSTALLED=0
- if rpm -q ${PACKAGE_NAME} &>/dev/null; then
- LOG_INFO "软件包已安装,测试结束后保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "软件包未安装,将在测试前安装"
- fi
-
- # 步骤3:如果未安装,则安装软件包
- if [ ${INSTALLED} -eq 0 ]; then
- LOG_INFO "步骤3:安装软件包 ${PACKAGE_NAME}"
- dnf install -y ${PACKAGE_NAME}
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 步骤4:测试帮助信息显示功能
- LOG_INFO "步骤4:测试帮助信息显示功能"
- # 假设软件包提供的命令是 jarjar-help-function
- COMMAND_NAME="jarjar-help-function"
- # 检查命令是否存在
- if ! command -v ${COMMAND_NAME} &>/dev/null; then
- LOG_ERROR "命令 ${COMMAND_NAME} 不存在"
- exit 255
- fi
-
- # 测试帮助参数
- LOG_INFO "测试帮助参数 -h"
- ${COMMAND_NAME} -h &>/dev/null
- CHECK_RESULT $? 0 0 "命令 -h 参数执行失败"
-
- LOG_INFO "测试帮助参数 --help"
- ${COMMAND_NAME} --help &>/dev/null
- CHECK_RESULT $? 0 0 "命令 --help 参数执行失败"
-
- # 步骤5:测试无效参数
- LOG_INFO "步骤5:测试无效参数"
- ${COMMAND_NAME} --invalid-param &>/dev/null
- if [ $? -ne 255 ] && [ $? -ne 1 ]; then
- LOG_ERROR "无效参数未按预期处理"
- exit 255
- fi
-
- # 步骤6:清理环境
- LOG_INFO "步骤6:清理环境"
- if [ ${INSTALLED} -eq 0 ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y ${PACKAGE_NAME}
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "保持软件包安装状态"
- fi
-
- LOG_INFO "测试完成:帮助信息显示功能验证成功"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/jarjar/jarjar-help/test_jarjar-help_function_usage.sh b/testcases/function_test/pkg_test/jarjar/jarjar-help/test_jarjar-help_function_usage.sh
deleted file mode 100644
index cf15c0da00d..00000000000
--- a/testcases/function_test/pkg_test/jarjar/jarjar-help/test_jarjar-help_function_usage.sh
+++ /dev/null
@@ -1,135 +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-29
-# @License : Mulan PSL v2
-# @Desc : Test the basic usage functionality of jarjar-help
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义变量
- PACKAGE_NAME="jarjar-help"
- LOG_FILE="/tmp/test_jarjar-help.log"
-
- # 检查软件包是否在yum源中
- check_package_in_repo() {
- LOG_INFO "检查yum源中是否存在${PACKAGE_NAME}软件包"
- dnf list available ${PACKAGE_NAME} &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在${PACKAGE_NAME}软件包"
- exit 255
- fi
- LOG_INFO "yum源中存在${PACKAGE_NAME}软件包"
- }
-
- # 检查软件包是否已安装
- check_package_installed() {
- LOG_INFO "检查${PACKAGE_NAME}是否已安装"
- rpm -q ${PACKAGE_NAME} &>/dev/null
- if [ $? -eq 0 ]; then
- LOG_INFO "${PACKAGE_NAME}已安装"
- return 0
- else
- LOG_INFO "${PACKAGE_NAME}未安装"
- return 1
- fi
- }
-
- # 安装软件包
- install_package() {
- LOG_INFO "开始安装${PACKAGE_NAME}"
- dnf install -y ${PACKAGE_NAME}
- CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}失败"
- LOG_INFO "安装${PACKAGE_NAME}成功"
- }
-
- # 卸载软件包
- uninstall_package() {
- LOG_INFO "开始卸载${PACKAGE_NAME}"
- dnf remove -y ${PACKAGE_NAME}
- CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}失败"
- LOG_INFO "卸载${PACKAGE_NAME}成功"
- }
-
- # 测试jarjar-help基本使用功能
- test_jarjar_help_basic_usage() {
- LOG_INFO "测试jarjar-help基本使用功能"
-
- # 测试不带参数运行
- LOG_INFO "测试不带参数运行jarjar-help"
- jarjar-help
- CHECK_RESULT $? 0 0 "不带参数运行jarjar-help失败"
-
- # 测试--help参数
- LOG_INFO "测试--help参数"
- jarjar-help --help
- CHECK_RESULT $? 0 0 "--help参数测试失败"
-
- # 测试-h参数
- LOG_INFO "测试-h参数"
- jarjar-help -h
- CHECK_RESULT $? 0 0 "-h参数测试失败"
-
- # 测试不支持的参数
- LOG_INFO "测试不支持的参数--invalid-param"
- jarjar-help --invalid-param 2>/dev/null
- if [ $? -eq 255 ]; then
- LOG_INFO "不支持的参数正确处理"
- else
- LOG_ERROR "不支持的参数未正确处理"
- exit 255
- fi
-
- LOG_INFO "jarjar-help基本使用功能测试完成"
- }
-
- # 主函数
- main() {
- LOG_INFO "开始测试jarjar-help基本使用功能"
-
- # 检查软件包是否在yum源中
- check_package_in_repo
-
- # 检查是否已安装
- check_package_installed
- local was_installed=$?
-
- # 如果未安装,则安装
- if [ $was_installed -ne 0 ]; then
- install_package
- fi
-
- # 执行测试
- test_jarjar_help_basic_usage
-
- # 环境清理
- LOG_INFO "开始清理测试环境"
-
- # 如果之前未安装,则卸载
- if [ $was_installed -ne 0 ]; then
- uninstall_package
- else
- LOG_INFO "保持${PACKAGE_NAME}的安装状态"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
- }
-
- # 执行主函数
- main
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/jarjar/jarjar-help/test_jarjar-help_function_version.sh b/testcases/function_test/pkg_test/jarjar/jarjar-help/test_jarjar-help_function_version.sh
deleted file mode 100644
index c0ff14a2e24..00000000000
--- a/testcases/function_test/pkg_test/jarjar/jarjar-help/test_jarjar-help_function_version.sh
+++ /dev/null
@@ -1,80 +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-29
-# @License : Mulan PSL v2
-# @Desc : Test the version query functionality of jarjar-help
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试jarjar-help的版本查询功能"
-
- # 检查yum源中是否存在jarjar-help软件包
- LOG_INFO "检查yum源中是否存在jarjar-help软件包"
- dnf list available jarjar-help 2>&1 | grep -q "jarjar-help"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到jarjar-help软件包"
- exit 255
- fi
-
- # 检查jarjar-help是否已经安装
- LOG_INFO "检查jarjar-help是否已经安装"
- rpm -q jarjar-help > /dev/null 2>&1
- INSTALLED=$?
-
- # 如果未安装,则安装jarjar-help
- if [ $INSTALLED -ne 0 ]; then
- LOG_INFO "安装jarjar-help软件包"
- dnf install -y jarjar-help
- CHECK_RESULT $? 0 0 "安装jarjar-help失败"
- fi
-
- # 测试jarjar-help的版本查询功能
- LOG_INFO "执行jarjar-help --version命令"
- jarjar-help --version
- CHECK_RESULT $? 0 0 "jarjar-help --version命令执行失败"
-
- # 测试jarjar-help的-v参数
- LOG_INFO "执行jarjar-help -v命令"
- jarjar-help -v
- CHECK_RESULT $? 0 0 "jarjar-help -v命令执行失败"
-
- # 测试jarjar-help的--help参数中的版本信息
- LOG_INFO "检查jarjar-help --help输出中是否包含版本信息"
- jarjar-help --help | grep -q "version"
- CHECK_RESULT $? 0 0 "jarjar-help --help输出中未找到版本信息"
-
- # 测试不支持的参数
- LOG_INFO "测试jarjar-help不支持的参数"
- jarjar-help --invalid-param 2>&1 | grep -q "unrecognized option"
- if [ $? -ne 0 ]; then
- LOG_ERROR "jarjar-help不支持--invalid-param参数"
- exit 255
- fi
-
- # 环境恢复:如果测试前未安装,则卸载jarjar-help
- if [ $INSTALLED -ne 0 ]; then
- LOG_INFO "卸载jarjar-help软件包"
- dnf remove -y jarjar-help
- CHECK_RESULT $? 0 0 "卸载jarjar-help失败"
- else
- LOG_INFO "测试前jarjar-help已安装,保持安装状态"
- fi
-
- LOG_INFO "jarjar-help版本查询功能测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/log4j/log4j-web/test_log4j-web_function_config.sh b/testcases/function_test/pkg_test/log4j/log4j-web/test_log4j-web_function_config.sh
deleted file mode 100644
index d9095e1dd23..00000000000
--- a/testcases/function_test/pkg_test/log4j/log4j-web/test_log4j-web_function_config.sh
+++ /dev/null
@@ -1,77 +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-12-06
-# @License : Mulan PSL v2
-# @Desc : 测试log4j-web软件包的配置功能,验证配置是否生效
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查log4j-web软件包是否已安装
- LOG_INFO "检查log4j-web软件包是否已安装"
- if rpm -q log4j-web &>/dev/null; then
- LOG_INFO "log4j-web软件包已安装"
- INSTALLED=true
- else
- LOG_INFO "log4j-web软件包未安装"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有log4j-web软件包
- LOG_INFO "检查yum源中是否有log4j-web软件包"
- if ! dnf list available log4j-web &>/dev/null; then
- LOG_ERROR "yum源中未找到log4j-web软件包"
- exit 255
- fi
-
- # 如果未安装,则安装log4j-web软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装log4j-web软件包"
- dnf install -y log4j-web
- CHECK_RESULT $? 0 0 "安装log4j-web软件包失败"
- fi
-
- # 验证配置功能
- LOG_INFO "验证log4j-web配置功能是否生效"
- # 假设配置验证命令为检查某个配置文件是否存在或内容是否正确
- CONFIG_FILE="/etc/log4j-web/config.properties"
- if [ -f "$CONFIG_FILE" ]; then
- LOG_INFO "配置文件存在,验证配置内容"
- # 示例:检查配置文件中是否包含特定内容,如"debug=true"
- if grep -q "debug=true" "$CONFIG_FILE"; then
- LOG_INFO "配置验证成功"
- else
- LOG_ERROR "配置内容不符合预期"
- exit 1
- fi
- else
- LOG_ERROR "配置文件不存在,配置功能未生效"
- exit 1
- fi
-
- # 清理环境:如果脚本开始时未安装,则卸载log4j-web软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "清理环境:卸载log4j-web软件包"
- dnf remove -y log4j-web
- CHECK_RESULT $? 0 0 "卸载log4j-web软件包失败"
- fi
-
- LOG_INFO "测试脚本执行完毕,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-branca/python-branca-help/test_python-branca-help_function_init.sh b/testcases/function_test/pkg_test/python-branca/python-branca-help/test_python-branca-help_function_init.sh
deleted file mode 100644
index 2de2694a4e3..00000000000
--- a/testcases/function_test/pkg_test/python-branca/python-branca-help/test_python-branca-help_function_init.sh
+++ /dev/null
@@ -1,62 +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-12-02
-# @License : Mulan PSL v2
-# @Desc : Test initialization of the package
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装python-branca-help包
- LOG_INFO "检查是否已安装python-branca-help包"
- if dnf list installed python-branca-help &>/dev/null; then
- LOG_INFO "python-branca-help包已安装"
- installed=true
- else
- LOG_INFO "python-branca-help包未安装"
- installed=false
- fi
-
- # 检查yum源中是否有python-branca-help包
- LOG_INFO "检查yum源中是否有python-branca-help包"
- if ! dnf list available python-branca-help &>/dev/null; then
- LOG_ERROR "yum源中未找到python-branca-help包"
- exit 255
- fi
-
- # 如果未安装,则安装python-branca-help包
- if [ "$installed" = false ]; then
- LOG_INFO "安装python-branca-help包"
- dnf install -y python-branca-help
- CHECK_RESULT $? 0 0 "安装python-branca-help包失败"
- fi
-
- # 测试初始化功能
- LOG_INFO "测试初始化功能"
- branca --help &>/dev/null
- CHECK_RESULT $? 0 0 "初始化功能测试失败"
-
- # 如果最初未安装,则在测试完成后卸载软件包
- if [ "$installed" = false ]; then
- LOG_INFO "卸载python-branca-help包"
- dnf remove -y python-branca-help
- CHECK_RESULT $? 0 0 "卸载python-branca-help包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/rubygem-liquid/rubygem-liquid-doc/test_rubygem-liquid-doc_function_parse.sh b/testcases/function_test/pkg_test/rubygem-liquid/rubygem-liquid-doc/test_rubygem-liquid-doc_function_parse.sh
deleted file mode 100644
index 51cddb8f722..00000000000
--- a/testcases/function_test/pkg_test/rubygem-liquid/rubygem-liquid-doc/test_rubygem-liquid-doc_function_parse.sh
+++ /dev/null
@@ -1,85 +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-12-03
-# @License : Mulan PSL v2
-# @Desc : Test parsing functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 测试脚本:test_rubygem-liquid-doc_function_parse
-
- LOG_INFO "开始测试:Test parsing functionality"
-
- # 检查是否已安装rubygem-liquid-doc
- LOG_INFO "检查是否已安装rubygem-liquid-doc"
- dnf list installed rubygem-liquid-doc > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "rubygem-liquid-doc已安装,测试结束后保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "rubygem-liquid-doc未安装,将在测试结束后卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有rubygem-liquid-doc
- LOG_INFO "检查yum源中是否有rubygem-liquid-doc"
- dnf list available rubygem-liquid-doc > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到rubygem-liquid-doc,退出测试"
- exit 255
- fi
-
- # 如果未安装,则安装rubygem-liquid-doc
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装rubygem-liquid-doc"
- dnf install -y rubygem-liquid-doc > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "安装rubygem-liquid-doc失败"
- fi
-
- # 测试解析功能
- LOG_INFO "测试解析功能"
- liquid --help > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "liquid命令不存在或不支持,退出测试"
- exit 255
- fi
-
- # 执行解析测试命令(示例)
- LOG_INFO "执行解析测试命令"
- echo "{{ "hello" | capitalize }}" | liquid > output.txt 2>&1
- CHECK_RESULT $? 0 0 "解析功能测试失败"
-
- # 验证输出结果
- LOG_INFO "验证输出结果"
- grep -q "Hello" output.txt
- CHECK_RESULT $? 0 0 "输出结果不符合预期"
-
- # 清理临时文件
- LOG_INFO "清理临时文件"
- rm -f output.txt
-
- #如果最初未安装,则在测试结束后卸载
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载rubygem-liquid-doc"
- dnf remove -y rubygem-liquid-doc > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "卸载rubygem-liquid-doc失败"
- fi
-
- LOG_INFO “测试完成:Test parsing functionality”
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/rust/rust-help/test_rust-help_function_install.sh b/testcases/function_test/pkg_test/rust/rust-help/test_rust-help_function_install.sh
deleted file mode 100644
index 75f86fa39be..00000000000
--- a/testcases/function_test/pkg_test/rust/rust-help/test_rust-help_function_install.sh
+++ /dev/null
@@ -1,65 +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-12-01
-# @License : Mulan PSL v2
-# @Desc : Test installation of rust-help
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- LOG_INFO "开始测试:Test installation of rust-help"
-
- # 检查是否已安装rust-help
- if dnf list installed rust-help &>/dev/null; then
- LOG_INFO "rust-help 已安装,测试将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "rust-help 未安装,测试将安装并卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有rust-help
- LOG_INFO "检查yum源中是否存在rust-help"
- if ! dnf list available rust-help &>/dev/null; then
- LOG_ERROR "yum源中未找到rust-help,退出测试"
- exit 255
- fi
-
- # 如果未安装,则安装rust-help
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装rust-help"
- dnf install -y rust-help
- CHECK_RESULT $? 0 0 "安装rust-help失败"
- fi
-
- # 测试rust-help命令
- LOG_INFO "测试rust-help命令"
- rust-help --help &>/dev/null
- CHECK_RESULT $? 0 0 "rust-help命令执行失败"
-
- # 清理环境
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载rust-help"
- dnf remove -y rust-help
- CHECK_RESULT $? 0 0 "卸载rust-help失败"
- fi
-
- LOG_INFO "测试完成:Test installation of rust-help"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-g/texlive-dk-bib/test_texlive-dk-bib_function_bib.sh b/testcases/function_test/pkg_test/texlive-split-g/texlive-dk-bib/test_texlive-dk-bib_function_bib.sh
deleted file mode 100644
index 051b88f67f3..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-g/texlive-dk-bib/test_texlive-dk-bib_function_bib.sh
+++ /dev/null
@@ -1,64 +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-12-01
-# @License : Mulan PSL v2
-# @Desc : Test basic bibliography functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装texlive-dk-bib
- LOG_INFO "检查是否已安装texlive-dk-bib"
- if dnf list installed texlive-dk-bib &>/dev/null; then
- LOG_INFO "texlive-dk-bib已安装,脚本结束时将保持安装状态"
- installed=true
- else
- LOG_INFO "texlive-dk-bib未安装,将在测试结束后卸载"
- installed=false
- fi
-
- # 检查yum源中是否有texlive-dk-bib软件包
- LOG_INFO "检查yum源中是否有texlive-dk-bib软件包"
- if ! dnf list available texlive-dk-bib &>/dev/null; then
- LOG_ERROR "yum源中未找到texlive-dk-bib软件包"
- exit 255
- fi
-
- # 安装texlive-dk-bib软件包
- if [ "$installed" = false ]; then
- LOG_INFO "开始安装texlive-dk-bib软件包"
- dnf install -y texlive-dk-bib
- CHECK_RESULT $? 0 0 "安装texlive-dk-bib软件包失败"
- fi
-
- # 测试基本参考文献功能
- LOG_INFO "测试基本参考文献功能"
- bibtex --version
- CHECK_RESULT $? 0 0 "bibtex命令执行失败"
-
- # 清理环境:如果脚本开始时未安装,则卸载texlive-dk-bib
- if [ "$installed" = false ]; then
- LOG_INFO "卸载texlive-dk-bib软件包"
- dnf remove -y texlive-dk-bib
- CHECK_RESULT $? 0 0 "卸载texlive-dk-bib软件包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-g/texlive-dk-bib/test_texlive-dk-bib_function_cite.sh b/testcases/function_test/pkg_test/texlive-split-g/texlive-dk-bib/test_texlive-dk-bib_function_cite.sh
deleted file mode 100644
index 51592d558ab..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-g/texlive-dk-bib/test_texlive-dk-bib_function_cite.sh
+++ /dev/null
@@ -1,62 +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-12-11
-# @License : Mulan PSL v2
-# @Desc : Test citation functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装texlive-dk-bib
- LOG_INFO "检查是否已安装texlive-dk-bib"
- rpm -q texlive-dk-bib > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-dk-bib已安装,脚本结束时保持安装状态"
- installed=true
- else
- LOG_INFO "texlive-dk-bib未安装,将在脚本结束时卸载"
- installed=false
- fi
-
- # 检查yum源中是否有texlive-dk-bib
- LOG_INFO "检查yum源中是否有texlive-dk-bib"
- dnf list available texlive-dk-bib > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到texlive-dk-bib,退出"
- exit 255
- fi
-
- # 安装texlive-dk-bib
- LOG_INFO "安装texlive-dk-bib"
- dnf install -y texlive-dk-bib
- CHECK_RESULT $? 0 0 "安装texlive-dk-bib失败"
-
- # 测试citation功能
- LOG_INFO "测试citation功能"
- pdflatex --help | grep "citation" > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "pdflatex不支持citation参数"
-
- # 清理环境
- if [ "$installed" = false ]; then
- LOG_INFO "卸载texlive-dk-bib"
- dnf remove -y texlive-dk-bib
- CHECK_RESULT $? 0 0 "卸载texlive-dk-bib失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_basic.sh
deleted file mode 100644
index 62bc6c55220..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_basic.sh
+++ /dev/null
@@ -1,76 +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-12-13
-# @License : Mulan PSL v2
-# @Desc : Test basic functionality of texlive-notestex
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试texlive-notestex的基本功能"
-
- # 检查是否已安装texlive-notestex
- LOG_INFO "检查是否已安装texlive-notestex"
- if dnf list installed texlive-notestex &> /dev/null; then
- LOG_INFO "texlive-notestex已安装,测试完成后将保持安装状态"
- installed=true
- else
- LOG_INFO "texlive-notestex未安装,将在测试完成后卸载"
- installed=false
- fi
-
- # 检查yum源中是否有texlive-notestex
- LOG_INFO "检查yum源中是否有texlive-notestex"
- if ! dnf list available texlive-notestex &> /dev/null; then
- LOG_ERROR "yum源中未找到texlive-notestex"
- exit 255
- fi
-
- # 安装texlive-notestex(如果未安装)
- if [ "$installed" = false ]; then
- LOG_INFO "安装texlive-notestex"
- dnf install -y texlive-notestex
- CHECK_RESULT $? 0 0 "安装texlive-notestex失败"
- fi
-
- # 测试基本功能
- LOG_INFO "测试texlive-notestex的基本功能"
- command_to_test="texlive-notestex --version"
- eval "$command_to_test" &> /dev/null
- CHECK_RESULT $? 0 0 "执行命令失败: $command_to_test"
-
- # 测试不支持的参数
- LOG_INFO "测试不支持的参数"
- command_with_invalid_arg="texlive-notestex --invalid-arg"
- eval "$command_with_invalid_arg" &> /dev/null
- if [ $? -ne 0 ]; then
- LOG_INFO "不支持参数--invalid-arg,符合预期"
- else
- LOG_ERROR "支持了不应支持的参数--invalid-arg"
- exit 255
- fi
-
- # 清理环境(如果测试前未安装)
- if [ "$installed" = false ]; then
- LOG_INFO "卸载texlive-notestex"
- dnf remove -y texlive-notestex
- CHECK_RESULT $? 0 0 "卸载texlive-notestex失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_basic_cmd.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_basic_cmd.sh
deleted file mode 100644
index 48804aa6e00..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_basic_cmd.sh
+++ /dev/null
@@ -1,85 +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-30
-# @License : Mulan PSL v2
-# @Desc : Test execution of basic package commands
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test execution of basic package commands"
-
- # 步骤1:检查测试环境是否已经安装了texlive-notestex软件包
- LOG_INFO "步骤1:检查texlive-notestex软件包是否已安装"
- if dnf list installed texlive-notestex &>/dev/null; then
- LOG_INFO "texlive-notestex已安装,测试完成后将保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "texlive-notestex未安装,将在测试过程中安装并在测试完成后卸载"
- INSTALLED=0
- fi
-
- # 步骤2:检查yum源中是否有texlive-notestex软件包
- LOG_INFO "步骤2:检查yum源中是否有texlive-notestex软件包"
- if ! dnf list available texlive-notestex &>/dev/null; then
- LOG_ERROR "yum源中未找到texlive-notestex软件包"
- exit 255
- fi
-
- # 步骤3:如果未安装,则安装texlive-notestex软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤3:安装texlive-notestex软件包"
- dnf install -y texlive-notestex
- CHECK_RESULT $? 0 0 "安装texlive-notestex失败"
- fi
-
- # 步骤4:执行texlive-notestex的基本命令测试
- LOG_INFO "步骤4:执行texlive-notestex基本命令测试"
- # 假设texlive-notestex包含一个名为"texlive-test"的命令,这里测试其基本功能
- if command -v texlive-test &>/dev/null; then
- LOG_INFO "执行"texlive-test --version"命令"
- texlive-test --version
- CHECK_RESULT $? 0 0 "执行"texlive-test --version"失败"
- else
- LOG_INFO "执行"texlive-notestex --help"命令"
- texlive-notestex --help
- CHECK_RESULT $? 0 0 "执行"texlive-notestex --help"失败"
- fi
-
- # 步骤5:测试不支持的参数
- LOG_INFO "步骤5:测试不支持的参数"
- texlive-notestex --invalid-parameter 2>/dev/null
- if [ $? -eq 255 ]; then
- LOG_INFO "不支持的参数已正确处理"
- else
- LOG_ERROR "不支持的参数未正确处理"
- exit 255
- fi
-
- # 步骤6:环境恢复
- LOG_INFO "步骤6:环境恢复"
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "卸载texlive-notestex软件包"
- dnf remove -y texlive-notestex
- CHECK_RESULT $? 0 0 "卸载texlive-notestex失败"
- else
- LOG_INFO "保持texlive-notestex软件包安装状态"
- fi
-
- LOG_INFO "测试完成:Test execution of basic package commands"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_check_installed.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_check_installed.sh
deleted file mode 100644
index 8f49f3fb75c..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_check_installed.sh
+++ /dev/null
@@ -1,77 +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-30
-# @License : Mulan PSL v2
-# @Desc : Test verification of package installation status
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 测试脚本开始
- LOG_INFO "开始测试:验证软件包安装状态"
-
- # 定义软件包名称
- PACKAGE_NAME="texlive-notestex"
-
- # 步骤1:检查软件包是否已在yum源中
- LOG_INFO "步骤1:检查软件包是否在yum源中"
- dnf list available "$PACKAGE_NAME" &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 $PACKAGE_NAME 不在yum源中"
- exit 255
- fi
- LOG_INFO "软件包 $PACKAGE_NAME 在yum源中"
-
- # 步骤2:检查当前环境是否已安装该软件包
- LOG_INFO "步骤2:检查当前环境是否已安装 $PACKAGE_NAME"
- dnf list installed "$PACKAGE_NAME" &>/dev/null
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包 $PACKAGE_NAME 已安装,标记为已安装状态"
- ALREADY_INSTALLED=1
- else
- LOG_INFO "软件包 $PACKAGE_NAME 未安装,标记为未安装状态"
- ALREADY_INSTALLED=0
- fi
-
- # 步骤3:如果未安装,则安装软件包作为测试步骤
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "步骤3:安装软件包 $PACKAGE_NAME"
- dnf install -y "$PACKAGE_NAME"
- CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败"
- LOG_INFO "软件包 $PACKAGE_NAME 安装成功"
- fi
-
- # 步骤4:验证软件包安装状态
- LOG_INFO "步骤4:验证软件包安装状态"
- dnf list installed "$PACKAGE_NAME" &>/dev/null
- CHECK_RESULT $? 0 0 "验证软件包 $PACKAGE_NAME 安装状态失败"
- LOG_INFO "软件包 $PACKAGE_NAME 安装状态验证成功"
-
- # 步骤5:清理环境,恢复到之前的状态
- LOG_INFO "步骤5:清理环境,恢复到之前的状态"
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "卸载测试安装的软件包 $PACKAGE_NAME"
- dnf remove -y "$PACKAGE_NAME"
- CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败"
- LOG_INFO "软件包 $PACKAGE_NAME 卸载成功"
- else
- LOG_INFO "软件包 $PACKAGE_NAME 原本已安装,保持安装状态"
- fi
-
- LOG_INFO "测试完成:验证软件包安装状态成功"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_doc_access.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_doc_access.sh
deleted file mode 100644
index 631323c713e..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_doc_access.sh
+++ /dev/null
@@ -1,73 +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-30
-# @License : Mulan PSL v2
-# @Desc : Test access to package documentation
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 环境检查:判断是否已安装texlive-notestex
- LOG_INFO "检查是否已安装texlive-notestex软件包"
- rpm -q texlive-notestex > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-notestex已安装,测试后将保持安装状态"
- ALREADY_INSTALLED=1
- else
- LOG_INFO "texlive-notestex未安装,将在测试后卸载"
- ALREADY_INSTALLED=0
- fi
-
- # 检查yum源中是否存在texlive-notestex软件包
- LOG_INFO "检查yum源中是否存在texlive-notestex软件包"
- dnf list available texlive-notestex > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在texlive-notestex软件包"
- exit 255
- fi
-
- # 安装texlive-notestex软件包(如果未安装)
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "开始安装texlive-notestex软件包"
- dnf install -y texlive-notestex
- CHECK_RESULT $? 0 0 "安装texlive-notestex失败"
- fi
-
- # 测试访问软件包文档
- LOG_INFO "测试访问texlive-notestex软件包文档"
- rpm -qd texlive-notestex > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "访问texlive-notestex文档失败"
-
- # 验证文档文件是否存在
- LOG_INFO "验证文档文件是否存在"
- DOC_FILES=$(rpm -qd texlive-notestex 2>/dev/null | head -5)
- if [ -z "$DOC_FILES" ]; then
- LOG_ERROR "未找到texlive-notestex文档文件"
- exit 1
- fi
- LOG_INFO "找到文档文件:$DOC_FILES"
-
- # 清理环境:如果测试前未安装,则卸载软件包
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "清理环境:卸载texlive-notestex软件包"
- dnf remove -y texlive-notestex
- CHECK_RESULT $? 0 0 "卸载texlive-notestex失败"
- fi
-
- LOG_INFO "测试完成:成功访问texlive-notestex软件包文档"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_install.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_install.sh
deleted file mode 100644
index a631054809f..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_install.sh
+++ /dev/null
@@ -1,92 +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-30
-# @License : Mulan PSL v2
-# @Desc : Test installation of texlive-notestex package
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:texlive-notestex包的安装功能"
-
- # 检查当前环境是否已安装texlive-notestex包
- LOG_INFO "步骤1:检查texlive-notestex是否已安装"
- dnf list installed texlive-notestex > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-notestex已安装,测试结束后将保持安装状态"
- INSTALLED_BEFORE=1
- else
- LOG_INFO "texlive-notestex未安装,将进行安装测试"
- INSTALLED_BEFORE=0
- fi
-
- # 检查yum源中是否存在texlive-notestex包
- LOG_INFO "步骤2:检查yum源中是否存在texlive-notestex包"
- dnf list available texlive-notestex > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到texlive-notestex包"
- exit 255
- fi
-
- # 如果未安装,则执行安装
- if [ $INSTALLED_BEFORE -eq 0 ]; then
- LOG_INFO "步骤3:安装texlive-notestex包"
- dnf install -y texlive-notestex
- CHECK_RESULT $? 0 0 "安装texlive-notestex包失败"
- LOG_INFO "texlive-notestex包安装成功"
- fi
-
- # 验证安装是否成功
- LOG_INFO "步骤4:验证texlive-notestex包安装是否成功"
- dnf list installed texlive-notestex > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "验证texlive-notestex包安装失败"
-
- # 测试texlive-notestex包的基本功能
- LOG_INFO "步骤5:测试texlive-notestex包的基本功能"
- # 假设texlive-notestex包安装后会提供命令"notestex",这里检查该命令是否存在
- which notestex > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "未找到notestex命令,可能安装不完整"
- exit 1
- fi
-
- # 检查notestex命令是否支持--version参数
- LOG_INFO "步骤6:检查notestex命令是否支持--version参数"
- notestex --version > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "notestex命令不支持--version参数"
- exit 255
- fi
-
- # 执行notestex --version命令
- LOG_INFO "步骤7:执行notestex --version命令"
- notestex --version
- CHECK_RESULT $? 0 0 "执行notestex --version命令失败"
-
- # 环境清理:如果测试前未安装,则卸载texlive-notestex包
- if [ $INSTALLED_BEFORE -eq 0 ]; then
- LOG_INFO "步骤8:清理环境,卸载texlive-notestex包"
- dnf remove -y texlive-notestex
- CHECK_RESULT $? 0 0 "卸载texlive-notestex包失败"
- LOG_INFO "texlive-notestex包卸载成功"
- else
- LOG_INFO "步骤8:测试前已安装texlive-notestex,保持安装状态"
- fi
-
- LOG_INFO "测试完成:texlive-notestex包的安装功能测试通过"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_uninstall.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_uninstall.sh
deleted file mode 100644
index 39b1c1093ab..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-q/texlive-notestex/test_texlive-notestex_function_uninstall.sh
+++ /dev/null
@@ -1,77 +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-30
-# @License : Mulan PSL v2
-# @Desc : Test uninstallation of texlive-notestex package
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- set -e
-
- LOG_INFO "开始测试:卸载texlive-notestex软件包"
-
- # 检查是否已安装texlive-notestex
- if rpm -q texlive-notestex &>/dev/null; then
- LOG_INFO "检测到texlive-notestex已安装,测试结束后将保持安装状态"
- INSTALLED_BEFORE=true
- else
- LOG_INFO "检测到texlive-notestex未安装,将在测试前安装"
- INSTALLED_BEFORE=false
- fi
-
- # 检查yum源中是否有texlive-notestex软件包
- LOG_INFO "检查yum源中是否存在texlive-notestex软件包"
- if ! dnf list available texlive-notestex &>/dev/null; then
- LOG_ERROR "yum源中不存在texlive-notestex软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED_BEFORE" = false ]; then
- LOG_INFO "正在安装texlive-notestex软件包"
- dnf install -y texlive-notestex
- CHECK_RESULT $? 0 0 "安装texlive-notestex失败"
- fi
-
- # 验证软件包已安装
- LOG_INFO "验证texlive-notestex软件包已安装"
- rpm -q texlive-notestex
- CHECK_RESULT $? 0 0 "texlive-notestex软件包未正确安装"
-
- # 卸载软件包
- LOG_INFO "正在卸载texlive-notestex软件包"
- dnf remove -y texlive-notestex
- CHECK_RESULT $? 0 0 "卸载texlive-notestex失败"
-
- # 验证软件包已卸载
- LOG_INFO "验证texlive-notestex软件包已卸载"
- if rpm -q texlive-notestex &>/dev/null; then
- LOG_ERROR "texlive-notestex软件包卸载失败"
- exit 1
- fi
-
- # 恢复环境:如果测试前已安装,则重新安装
- if [ "$INSTALLED_BEFORE" = true ]; then
- LOG_INFO "恢复环境:重新安装texlive-notestex软件包"
- dnf install -y texlive-notestex
- CHECK_RESULT $? 0 0 "重新安装texlive-notestex失败"
- fi
-
- LOG_INFO "测试完成:texlive-notestex软件包卸载功能正常"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_basic.sh
deleted file mode 100644
index 9a2084e6846..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_basic.sh
+++ /dev/null
@@ -1,64 +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 : Basic functionality test for texlive-pagerange-doc
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始执行测试脚本:Basic functionality test for texlive-pagerange-doc"
-
- # 检查是否已安装texlive-pagerange-doc
- LOG_INFO "检查texlive-pagerange-doc是否已安装"
- if dnf list installed texlive-pagerange-doc &>/dev/null; then
- LOG_INFO "texlive-pagerange-doc已安装,跳过安装步骤"
- installed=true
- else
- LOG_INFO "texlive-pagerange-doc未安装,准备安装"
- installed=false
- fi
-
- # 检查yum源中是否有texlive-pagerange-doc
- LOG_INFO "检查yum源中是否存在texlive-pagerange-doc"
- if ! dnf list available texlive-pagerange-doc &>/dev/null; then
- LOG_ERROR "yum源中未找到texlive-pagerange-doc,退出测试"
- exit 255
- fi
-
- # 如果未安装,则安装texlive-pagerange-doc
- if [ "$installed" = false ]; then
- LOG_INFO "开始安装texlive-pagerange-doc"
- dnf install -y texlive-pagerange-doc
- CHECK_RESULT $? 0 0 "安装texlive-pagerange-doc失败"
- fi
-
- # 测试texlive-pagerange-doc基本功能
- LOG_INFO "测试texlive-pagerange-doc基本功能"
- texlive-pagerange-doc --help
- CHECK_RESULT $? 0 0 "texlive-pagerange-doc基本功能测试失败"
-
- # 清理环境
- if [ "$installed" = false ]; then
- LOG_INFO "卸载texlive-pagerange-doc"
- dnf remove -y texlive-pagerange-doc
- CHECK_RESULT $? 0 0 "卸载texlive-pagerange-doc失败"
- fi
-
- LOG_INFO "测试脚本执行完成:Basic functionality test for texlive-pagerange-doc"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_basic_usage.sh b/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_basic_usage.sh
deleted file mode 100644
index 4ea86969463..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_basic_usage.sh
+++ /dev/null
@@ -1,193 +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-20
-# @License : Mulan PSL v2
-# @Desc : Test the basic usage example of the pagerange package as described in the documentation
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义日志函数(虽然题目说无需定义,但实际脚本中需要定义才能使用)
- LOG_INFO() {
- echo "[INFO] $*"
- }
-
- LOG_ERROR() {
- echo "[ERROR] $*"
- }
-
- # 定义检查结果函数
- CHECK_RESULT() {
- if [ $# -ne 4 ]; then
- LOG_ERROR "CHECK_RESULT 参数错误"
- exit 1
- fi
- if [ $1 -ne $2 ]; then
- LOG_ERROR "$4"
- exit $3
- fi
- }
-
- # 定义SSH_CMD函数(虽然题目说无需定义,但实际需要)
- SSH_CMD() {
- if [ $# -lt 4 ]; then
- LOG_ERROR "SSH_CMD 参数不足"
- return 1
- fi
- local cmd=$1
- local ip=$2
- local password=$3
- local user=$4
- shift 4
-
- # 这里使用expect实现自动登录(需要安装expect)
- expect << EOF
- set timeout 30
- spawn ssh -o StrictHostKeyChecking=no ${user}@${ip} "$cmd $@"
- expect {
- "*password:" {
- send "${password}\r"
- exp_continue
- }
- eof {
- catch wait result
- exit [lindex \$result 3]
- }
- }
- EOF
- return $?
- }
-
- # 主测试函数
- test_pagerange_basic_usage() {
- local package_name="texlive-pagerange-doc"
- local installed_before_test=false
-
- LOG_INFO "开始测试:验证pagerange包的基本使用示例"
-
- # 检查软件包是否已安装
- LOG_INFO "步骤1:检查系统是否已安装${package_name}"
- if rpm -q ${package_name} > /dev/null 2>&1; then
- LOG_INFO "${package_name} 已安装"
- installed_before_test=true
- else
- LOG_INFO "${package_name} 未安装"
- fi
-
- # 检查yum源中是否有该软件包
- LOG_INFO "步骤2:检查yum源中是否有${package_name}软件包"
- dnf list available ${package_name} > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到${package_name}软件包"
- exit 255
- fi
- LOG_INFO "yum源中存在${package_name}软件包"
-
- # 如果未安装,则安装软件包
- if [ "${installed_before_test}" = "false" ]; then
- LOG_INFO "步骤3:安装${package_name}软件包"
- dnf install -y ${package_name}
- CHECK_RESULT $? 0 0 "安装${package_name}失败"
- LOG_INFO "${package_name}安装成功"
- fi
-
- # 测试基本使用示例
- LOG_INFO "步骤4:测试pagerange包的基本使用示例"
-
- # 检查是否有pagerange命令
- LOG_INFO "检查pagerange命令是否存在"
- which pagerange > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- # 尝试在texlive目录下查找
- find /usr/share/texlive -name "pagerange*" -type f 2>/dev/null | head -1 > /dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "未找到pagerange命令或相关文件"
- exit 255
- fi
- fi
-
- # 检查pagerange命令是否支持基本参数
- LOG_INFO "检查pagerange命令是否支持--help参数"
- pagerange --help > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- # 尝试其他可能的帮助参数
- pagerange -h > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "pagerange命令不支持--help或-h参数"
- exit 255
- fi
- fi
- LOG_INFO "pagerange命令参数检查通过"
-
- # 创建测试文件
- LOG_INFO "创建测试文件"
- local test_file="/tmp/test_pagerange.tex"
- cat > ${test_file} << "EOF"
- \documentclass{article}
- \usepackage{pagerange}
- \begin{document}
- This is a test document for pagerange package.
- \pagerange{1-5}
- \end{document}
- EOF
- CHECK_RESULT $? 0 0 "创建测试文件失败"
-
- # 尝试编译测试文件(如果pdflatex可用)
- LOG_INFO "尝试编译测试文档"
- if command -v pdflatex > /dev/null 2>&1; then
- pdflatex -interaction=nonstopmode ${test_file} > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "测试文档编译成功"
- # 检查生成的PDF文件
- local pdf_file="/tmp/test_pagerange.pdf"
- if [ -f ${pdf_file} ]; then
- LOG_INFO "成功生成PDF文件"
- # 检查文件大小
- local file_size=$(stat -c%s ${pdf_file} 2>/dev/null || stat -f%z ${pdf_file})
- if [ ${file_size} -gt 0 ]; then
- LOG_INFO "PDF文件大小正常:${file_size}字节"
- fi
- fi
- else
- LOG_INFO "编译测试文档失败(可能是正常情况,继续测试)"
- fi
- else
- LOG_INFO "系统中未安装pdflatex,跳过编译测试"
- fi
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- rm -f /tmp/test_pagerange.*
-
- # 环境恢复
- LOG_INFO "步骤5:恢复测试环境"
- if [ "${installed_before_test}" = "false" ]; then
- LOG_INFO "卸载测试安装的${package_name}软件包"
- dnf remove -y ${package_name}
- CHECK_RESULT $? 0 0 "卸载${package_name}失败"
- LOG_INFO "${package_name}卸载成功"
- else
- LOG_INFO "保持${package_name}的安装状态"
- fi
-
- LOG_INFO "测试完成:pagerange包的基本使用示例测试通过"
- }
-
- # 执行测试
- test_pagerange_basic_usage
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_doc_files.sh b/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_doc_files.sh
deleted file mode 100644
index d7df1b84f9a..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_doc_files.sh
+++ /dev/null
@@ -1,149 +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-20
-# @License : Mulan PSL v2
-# @Desc : Test if the documentation files for texlive-pagerange are present after installation
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 环境变量定义
- PACKAGE_NAME="texlive-pagerange-doc"
- LOG_FILE="/tmp/test_texlive-pagerange-doc.log"
-
- # 日志函数(直接使用LOG_INFO和LOG_ERROR)
- LOG_INFO() {
- echo "[INFO] $(date "+%Y-%m-%d %H:%M:%S") $*" | tee -a $LOG_FILE
- }
- LOG_ERROR() {
- echo "[ERROR] $(date "+%Y-%m-%d %H:%M:%S") $*" | tee -a $LOG_FILE
- }
-
- # 检查软件包是否在yum源中存在
- check_package_in_repo() {
- LOG_INFO "检查yum源中是否存在软件包: $PACKAGE_NAME"
- dnf list available $PACKAGE_NAME &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在软件包: $PACKAGE_NAME"
- exit 255
- fi
- LOG_INFO "软件包 $PACKAGE_NAME 存在于yum源中"
- }
-
- # 检查软件包是否已安装
- check_package_installed() {
- LOG_INFO "检查软件包 $PACKAGE_NAME 是否已安装"
- rpm -q $PACKAGE_NAME &>/dev/null
- return $?
- }
-
- # 安装软件包
- install_package() {
- LOG_INFO "安装软件包: $PACKAGE_NAME"
- dnf install -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败"
- LOG_INFO "软件包 $PACKAGE_NAME 安装成功"
- }
-
- # 卸载软件包
- uninstall_package() {
- LOG_INFO "卸载软件包: $PACKAGE_NAME"
- dnf remove -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败"
- LOG_INFO "软件包 $PACKAGE_NAME 卸载成功"
- }
-
- # 检查文档文件是否存在
- check_doc_files() {
- LOG_INFO "检查软件包 $PACKAGE_NAME 的文档文件是否存在"
- # 获取软件包安装的文件列表
- FILES=$(rpm -ql $PACKAGE_NAME 2>/dev/null)
- if [ -z "$FILES" ]; then
- LOG_ERROR "软件包 $PACKAGE_NAME 未安装或未找到文件"
- return 1
- fi
-
- # 检查是否包含文档文件(通常位于/usr/share/doc目录下)
- DOC_FILES=$(echo "$FILES" | grep -E "/usr/share/doc/.*$PACKAGE_NAME.*" || true)
- if [ -z "$DOC_FILES" ]; then
- LOG_ERROR "未找到软件包 $PACKAGE_NAME 的文档文件"
- return 1
- fi
-
- LOG_INFO "找到软件包 $PACKAGE_NAME 的文档文件:"
- echo "$DOC_FILES" | while read file; do
- if [ -f "$file" ]; then
- LOG_INFO " - $file (存在)"
- else
- LOG_ERROR " - $file (不存在)"
- return 1
- fi
- done
-
- # 检查至少有一个文档文件存在
- for file in $DOC_FILES; do
- if [ -f "$file" ]; then
- LOG_INFO "软件包 $PACKAGE_NAME 的文档文件检查通过"
- return 0
- fi
- done
-
- LOG_ERROR "软件包 $PACKAGE_NAME 的文档文件不存在"
- return 1
- }
-
- # 主测试函数
- main_test() {
- LOG_INFO "开始测试: 检查texlive-pagerange-doc安装后文档文件是否存在"
-
- # 步骤1: 检查软件包是否在yum源中
- check_package_in_repo
-
- # 步骤2: 检查软件包是否已安装
- local was_installed=false
- if check_package_installed; then
- LOG_INFO "软件包 $PACKAGE_NAME 已经安装"
- was_installed=true
- else
- LOG_INFO "软件包 $PACKAGE_NAME 未安装,将进行安装"
- was_installed=false
- fi
-
- # 步骤3: 如果未安装,则安装软件包
- if [ "$was_installed" = "false" ]; then
- install_package
- fi
-
- # 步骤4: 检查文档文件是否存在
- check_doc_files
- CHECK_RESULT $? 0 0 "文档文件检查失败"
-
- # 步骤5: 清理环境(如果测试前未安装,则卸载软件包)
- if [ "$was_installed" = "false" ]; then
- LOG_INFO "恢复环境: 卸载测试安装的软件包"
- uninstall_package
- else
- LOG_INFO "保持环境: 不卸载已安装的软件包"
- fi
-
- LOG_INFO "测试完成: texlive-pagerange-doc安装后文档文件存在性检查通过"
- }
-
- # 执行主测试
- main_test
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_installation.sh b/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_installation.sh
deleted file mode 100644
index 18401c84b18..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_installation.sh
+++ /dev/null
@@ -1,80 +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-20
-# @License : Mulan PSL v2
-# @Desc : Test if the texlive-pagerange-doc package can be installed correctly
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:检查 texlive-pagerange-doc 软件包是否能够正确安装"
-
- # 检查环境是否已经安装 texlive-pagerange-doc
- LOG_INFO "步骤1:检查 texlive-pagerange-doc 是否已经安装"
- rpm -q texlive-pagerange-doc > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-pagerange-doc 已经安装,脚本结束后将保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "texlive-pagerange-doc 未安装,将在测试步骤中安装"
- INSTALLED=0
- fi
-
- # 检查 yum 源中是否有 texlive-pagerange-doc 软件包
- LOG_INFO "步骤2:检查 yum 源中是否有 texlive-pagerange-doc 软件包"
- dnf list available texlive-pagerange-doc > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum 源中未找到 texlive-pagerange-doc 软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤3:安装 texlive-pagerange-doc 软件包"
- dnf install -y texlive-pagerange-doc
- CHECK_RESULT $? 0 0 "安装 texlive-pagerange-doc 失败"
- LOG_INFO "texlive-pagerange-doc 安装成功"
- fi
-
- # 验证软件包是否安装成功
- LOG_INFO "步骤4:验证 texlive-pagerange-doc 软件包是否安装成功"
- rpm -q texlive-pagerange-doc > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "texlive-pagerange-doc 软件包未正确安装"
-
- # 测试软件包功能(这里假设软件包安装后可以通过特定命令验证)
- LOG_INFO "步骤5:验证 texlive-pagerange-doc 功能"
- # 假设 texlive-pagerange-doc 提供了某个命令或文件,这里以检查文档文件为例
- if [ -f /usr/share/doc/texlive-pagerange-doc/README ]; then
- LOG_INFO "texlive-pagerange-doc 文档文件存在,功能正常"
- else
- LOG_ERROR "texlive-pagerange-doc 文档文件不存在,功能异常"
- exit 1
- fi
-
- # 清理环境:如果脚本开始时未安装,则在结束时卸载软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤6:卸载 texlive-pagerange-doc 软件包"
- dnf remove -y texlive-pagerange-doc
- CHECK_RESULT $? 0 0 "卸载 texlive-pagerange-doc 失败"
- LOG_INFO "texlive-pagerange-doc 卸载成功"
- else
- LOG_INFO "步骤6:保持 texlive-pagerange-doc 安装状态,无需卸载"
- fi
-
- LOG_INFO "测试完成:texlive-pagerange-doc 软件包能够正确安装"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_uninstall.sh b/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_uninstall.sh
deleted file mode 100644
index c529391a675..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_uninstall.sh
+++ /dev/null
@@ -1,79 +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-20
-# @License : Mulan PSL v2
-# @Desc : Test if the texlive-pagerange-doc package can be uninstalled cleanly
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 判断环境是否已安装texlive-pagerange-doc
- LOG_INFO "检查texlive-pagerange-doc软件包是否已安装"
- dnf list installed texlive-pagerange-doc > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-pagerange-doc软件包已安装,标记为已安装状态"
- INSTALLED_FLAG=1
- else
- LOG_INFO "texlive-pagerange-doc软件包未安装,标记为未安装状态"
- INSTALLED_FLAG=0
- fi
-
- # 检查yum源中是否存在texlive-pagerange-doc软件包
- LOG_INFO "检查yum源中是否存在texlive-pagerange-doc软件包"
- dnf list available texlive-pagerange-doc > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在texlive-pagerange-doc软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包作为测试步骤
- if [ $INSTALLED_FLAG -eq 0 ]; then
- LOG_INFO "开始安装texlive-pagerange-doc软件包"
- dnf install -y texlive-pagerange-doc
- CHECK_RESULT $? 0 0 "安装texlive-pagerange-doc软件包失败"
- LOG_INFO "texlive-pagerange-doc软件包安装成功"
- fi
-
- # 测试卸载功能
- LOG_INFO "开始测试texlive-pagerange-doc软件包卸载功能"
- dnf remove -y texlive-pagerange-doc
- CHECK_RESULT $? 0 0 "卸载texlive-pagerange-doc软件包失败"
- LOG_INFO "texlive-pagerange-doc软件包卸载成功"
-
- # 验证软件包是否已卸载
- LOG_INFO "验证texlive-pagerange-doc软件包是否已卸载"
- dnf list installed texlive-pagerange-doc > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_ERROR "texlive-pagerange-doc软件包卸载验证失败"
- exit 1
- else
- LOG_INFO "texlive-pagerange-doc软件包卸载验证成功"
- fi
-
- # 环境恢复:如果最初未安装,则保持卸载状态;如果最初已安装,则重新安装
- if [ $INSTALLED_FLAG -eq 1 ]; then
- LOG_INFO "恢复原始环境:重新安装texlive-pagerange-doc软件包"
- dnf install -y texlive-pagerange-doc
- CHECK_RESULT $? 0 0 "重新安装texlive-pagerange-doc软件包失败"
- LOG_INFO "texlive-pagerange-doc软件包重新安装成功"
- else
- LOG_INFO "原始环境未安装texlive-pagerange-doc软件包,保持卸载状态"
- fi
-
- LOG_INFO "测试完成:texlive-pagerange-doc软件包可以干净卸载"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_version.sh b/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_version.sh
deleted file mode 100644
index 9f56b2b53c3..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-r/texlive-pagerange-doc/test_texlive-pagerange-doc_function_version.sh
+++ /dev/null
@@ -1,133 +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-20
-# @License : Mulan PSL v2
-# @Desc : Test if the correct version of texlive-pagerange-doc package is installed
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义颜色输出函数(虽然题目说直接使用,但实际环境中可能没有,这里定义兼容版本)
- if ! command -v LOG_INFO &> /dev/null; then
- LOG_INFO() {
- echo "[INFO] $*"
- }
- fi
-
- if ! command -v LOG_ERROR &> /dev/null; then
- LOG_ERROR() {
- echo "[ERROR] $*" >&2
- }
- fi
-
- # 检查CHECK_RESULT函数是否存在,不存在则定义
- if ! command -v CHECK_RESULT &> /dev/null; then
- CHECK_RESULT() {
- local actual=$1
- local expected=$2
- local errcode=$3
- local errmsg=$4
- if [ $actual -ne $expected ]; then
- LOG_ERROR "$errmsg (实际: $actual, 期望: $expected)"
- exit $errcode
- fi
- }
- fi
-
- # 检查SSH_CMD函数是否存在,不存在则定义(为单机测试提供兼容)
- if ! command -v SSH_CMD &> /dev/null; then
- SSH_CMD() {
- local cmd=$1
- local node_ip=$2
- local node_password=$3
- local node_user=$4
- LOG_INFO "在节点 $node_ip 上执行命令: $cmd"
- # 这里只是模拟,实际应根据SSH_CMD的实现来调用
- ssh $node_user@$node_ip "$cmd"
- }
- fi
-
- # 主测试函数
- main() {
- local package_name="texlive-pagerange-doc"
- local installed_before_test=false
- local need_cleanup=false
-
- LOG_INFO "开始测试:检查 texlive-pagerange-doc 软件包是否正确安装并验证版本"
-
- # 步骤1:检查yum源中是否存在该软件包
- LOG_INFO "步骤1:检查yum源中是否存在 $package_name 软件包"
- if ! dnf list available "$package_name" &> /dev/null; then
- LOG_ERROR "yum源中未找到 $package_name 软件包"
- exit 255
- fi
- LOG_INFO "yum源中存在 $package_name 软件包"
-
- # 步骤2:检查环境是否已经安装该软件包
- LOG_INFO "步骤2:检查环境是否已经安装 $package_name 软件包"
- if rpm -q "$package_name" &> /dev/null; then
- LOG_INFO "$package_name 软件包已安装"
- installed_before_test=true
- else
- LOG_INFO "$package_name 软件包未安装"
- installed_before_test=false
- fi
-
- # 步骤3:如果未安装,则安装软件包
- if [ "$installed_before_test" = false ]; then
- LOG_INFO "步骤3:安装 $package_name 软件包"
- dnf install -y "$package_name"
- CHECK_RESULT $? 0 0 "安装 $package_name 软件包失败"
- need_cleanup=true
- LOG_INFO "$package_name 软件包安装成功"
- else
- LOG_INFO "步骤3:跳过安装,软件包已存在"
- fi
-
- # 步骤4:验证软件包版本
- LOG_INFO "步骤4:验证 $package_name 软件包版本"
- local package_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}" "$package_name")
- CHECK_RESULT $? 0 0 "获取 $package_name 软件包版本失败"
- LOG_INFO "$package_name 软件包版本为: $package_version"
-
- # 步骤5:验证软件包功能(示例:检查文档文件是否存在)
- LOG_INFO "步骤5:验证 $package_name 软件包功能"
- local doc_path=$(rpm -ql "$package_name" | grep -E "\.pdf$|\.html$" | head -1)
- if [ -n "$doc_path" ] && [ -f "$doc_path" ]; then
- LOG_INFO "找到文档文件: $doc_path"
- else
- LOG_ERROR "未找到 $package_name 的文档文件"
- exit 1
- fi
-
- # 步骤6:清理环境(如果测试前未安装,则卸载软件包)
- if [ "$need_cleanup" = true ]; then
- LOG_INFO "步骤6:清理环境,卸载 $package_name 软件包"
- dnf remove -y "$package_name"
- CHECK_RESULT $? 0 0 "卸载 $package_name 软件包失败"
- LOG_INFO "$package_name 软件包卸载成功"
- else
- LOG_INFO "步骤6:跳过清理,保持软件包安装状态"
- fi
-
- LOG_INFO "测试完成:texlive-pagerange-doc 软件包版本验证成功"
- }
-
- # 执行主函数
- main
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-x/texlive-typewriter/test_texlive-typewriter_function_font.sh b/testcases/function_test/pkg_test/texlive-split-x/texlive-typewriter/test_texlive-typewriter_function_font.sh
deleted file mode 100644
index eeb29e6ea09..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-x/texlive-typewriter/test_texlive-typewriter_function_font.sh
+++ /dev/null
@@ -1,75 +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 : Test the font rendering functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已经安装texlive-typewriter-function-font
- LOG_INFO "检查是否已经安装texlive-typewriter-function-font"
- rpm -q texlive-typewriter-function-font > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-typewriter-function-font已安装,脚本结束时将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "texlive-typewriter-function-font未安装,将在测试结束后卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否存在texlive-typewriter-function-font
- LOG_INFO "检查yum源中是否存在texlive-typewriter-function-font"
- dnf list available texlive-typewriter-function-font > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在texlive-typewriter-function-font,退出码255"
- exit 255
- fi
-
- # 安装texlive-typewriter-function-font
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装texlive-typewriter-function-font"
- dnf install -y texlive-typewriter-function-font
- CHECK_RESULT $? 0 0 "安装texlive-typewriter-function-font失败"
- fi
-
- # 测试字体渲染功能
- LOG_INFO "测试字体渲染功能"
- echo "\documentclass{article}
- \usepackage{typewriter}
- \begin{document}
- \texttt{Test the font rendering functionality}
- \end{document}" > test_font.tex
- pdflatex test_font.tex > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "字体渲染功能测试失败"
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- rm -f test_font.tex test_font.aux test_font.log test_font.pdf
-
- # 如果脚本开始时未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载texlive-typewriter-function-font"
- dnf remove -y texlive-typewriter-function-font
- CHECK_RESULT $? 0 0 "卸载texlive-typewriter-function-font失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-
-}
-
-main "$@"
\ No newline at end of file