diff --git a/suite2cases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help.json b/suite2cases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help.json deleted file mode 100644 index 38fcff911ce..00000000000 --- a/suite2cases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help", - "machine num": 1, - "cases": [ - { - "name": "test_apache-commons-digester-help_function_parse", - "desc": "Test XML parsing functionality" - }, - { - "name": "test_apache-commons-digester-help_function_config", - "desc": "Test configuration loading" - }, - { - "name": "test_apache-commons-digester-help_function_install", - "desc": "Test package installation" - }, - { - "name": "test_apache-commons-digester-help_function_uninstall", - "desc": "Test package removal" - }, - { - "name": "test_apache-commons-digester-help_function_version", - "desc": "Test package version check" - }, - { - "name": "test_apache-commons-digester-help_function_basic_parse", - "desc": "Test basic XML parsing" - }, - { - "name": "test_apache-commons-digester-help_function_ruleset", - "desc": "Test ruleset definition" - }, - { - "name": "test_apache-commons-digester-help_function_object_create", - "desc": "Test object creation from XML" - }, - { - "name": "test_apache-commons-digester-help_function_set_properties", - "desc": "Test property setting" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/jboss-remoting-jmx/jboss-remoting-jmx-help.json b/suite2cases/function_test/pkg_test/jboss-remoting-jmx/jboss-remoting-jmx-help.json index efd1e27fedb..9cbdde0276b 100644 --- a/suite2cases/function_test/pkg_test/jboss-remoting-jmx/jboss-remoting-jmx-help.json +++ b/suite2cases/function_test/pkg_test/jboss-remoting-jmx/jboss-remoting-jmx-help.json @@ -6,10 +6,6 @@ "name": "test_jboss-remoting-jmx-help_install", "desc": "测试 jboss-remoting-jmx-help 软件包的安装功能", "machine num": 1 - }, - { - "name": "test_jboss-remoting-jmx-help_function_start", - "desc": "测试 jboss-remoting-jmx-help 的启动功能" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-d/texlive-caladea.json b/suite2cases/function_test/pkg_test/texlive-split-d/texlive-caladea.json deleted file mode 100644 index 67c2130da39..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-d/texlive-caladea.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-d/texlive-caladea", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-caladea_function_install", - "desc": "Test package installation" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-e/texlive-cmcyr.json b/suite2cases/function_test/pkg_test/texlive-split-e/texlive-cmcyr.json index cd0a782253f..80bca163ccd 100644 --- a/suite2cases/function_test/pkg_test/texlive-split-e/texlive-cmcyr.json +++ b/suite2cases/function_test/pkg_test/texlive-split-e/texlive-cmcyr.json @@ -2,26 +2,10 @@ "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr", "machine num": 1, "cases": [ - { - "name": "test_texlive-cmcyr_function_font", - "desc": "Test the font rendering functionality of texlive-cmcyr" - }, { "name": "test_texlive-cmcyr_function_install", "desc": "Test the installation process of texlive-cmcyr package" }, - { - "name": "test_texlive-cmcyr_function_fonts", - "desc": "Test the availability of CM Cyrillic fonts in TeX" - }, - { - "name": "test_texlive-cmcyr_function_basic", - "desc": "Test basic document compilation with cmcyr fonts" - }, - { - "name": "test_texlive-cmcyr_function_cyrillic", - "desc": "Test rendering of Cyrillic text with cmcyr" - }, { "name": "test_texlive-cmcyr_function_uninstall", "desc": "Test the uninstallation of texlive-cmcyr package" diff --git a/suite2cases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams.json b/suite2cases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams.json deleted file mode 100644 index fdf0808c8ef..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-dynkin-diagrams_function_draw", - "desc": "Test drawing Dynkin diagrams" - }, - { - "name": "test_texlive-dynkin-diagrams_function_install", - "desc": "Test installation of texlive-dynkin-diagrams package" - }, - { - "name": "test_texlive-dynkin-diagrams_function_check_installed", - "desc": "Test if texlive-dynkin-diagrams package is installed" - }, - { - "name": "test_texlive-dynkin-diagrams_function_basic_usage", - "desc": "Test basic Dynkin diagram typesetting" - }, - { - "name": "test_texlive-dynkin-diagrams_function_remove", - "desc": "Test removal of texlive-dynkin-diagrams package" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-j/texlive-grayhints.json b/suite2cases/function_test/pkg_test/texlive-split-j/texlive-grayhints.json deleted file mode 100644 index 35c3ad5321f..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-j/texlive-grayhints.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-j/texlive-grayhints", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-grayhints_function_basic", - "desc": "Basic functionality test for texlive-grayhints" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-j/texlive-gsemthesis-doc.json b/suite2cases/function_test/pkg_test/texlive-split-j/texlive-gsemthesis-doc.json index 53b5c51359e..eaba48bd335 100644 --- a/suite2cases/function_test/pkg_test/texlive-split-j/texlive-gsemthesis-doc.json +++ b/suite2cases/function_test/pkg_test/texlive-split-j/texlive-gsemthesis-doc.json @@ -6,10 +6,6 @@ "name": "test_texlive-gsemthesis-doc_function_install", "desc": "Test package installation" }, - { - "name": "test_texlive-gsemthesis-doc_function_check_installed", - "desc": "Verify package is installed" - }, { "name": "test_texlive-gsemthesis-doc_function_remove", "desc": "Test package removal" diff --git a/suite2cases/function_test/pkg_test/texlive-split-p/texlive-msc.json b/suite2cases/function_test/pkg_test/texlive-split-p/texlive-msc.json deleted file mode 100644 index c56f813e518..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-p/texlive-msc.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-p/texlive-msc", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-msc_function_basic", - "desc": "Basic functionality test" - }, - { - "name": "test_texlive-msc_function_install", - "desc": "Test installation of texlive-msc package" - }, - { - "name": "test_texlive-msc_function_uninstall", - "desc": "Test removal of texlive-msc package" - }, - { - "name": "test_texlive-msc_function_check_inst", - "desc": "Check if texlive-msc is installed" - }, - { - "name": "test_texlive-msc_function_basic_usage", - "desc": "Test basic msc macro usage in LaTeX" - }, - { - "name": "test_texlive-msc_function_compile", - "desc": "Test compiling a LaTeX doc with msc" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray.json b/suite2cases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray.json index b758881f34f..30a25260c27 100644 --- a/suite2cases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray.json +++ b/suite2cases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray.json @@ -11,18 +11,6 @@ "name": "test_texlive-subeqnarray_uninstall", "desc": "测试 texlive-subeqnarray 软件包的卸载功能,验证是否能够正确从系统中卸载。", "machine num": 1 - }, - { - "name": "test_texlive-subeqnarray_function_install_check", - "desc": "检查 texlive-subeqnarray 软件包是否已正确安装在系统中。" - }, - { - "name": "test_texlive-subeqnarray_function_basic_usage", - "desc": "测试 texlive-subeqnarray 宏包的基本功能,验证其能否在 LaTeX 文档中正确排版子公式编号。" - }, - { - "name": "test_texlive-subeqnarray_function_remove_pkg", - "desc": "测试从系统中移除 texlive-subeqnarray 软件包及其相关文件。" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker.json b/suite2cases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker.json deleted file mode 100644 index 55df6a6f021..00000000000 --- a/suite2cases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker", - "machine num": 1, - "cases": [ - { - "name": "test_ws-xmlschema-walker_function_parse", - "desc": "Test XML schema parsing functionality" - }, - { - "name": "test_ws-xmlschema-walker_function_validate", - "desc": "Test schema validation feature" - }, - { - "name": "test_ws-xmlschema-walker_function_walk", - "desc": "Test walking through schema nodes" - }, - { - "name": "test_ws-xmlschema-walker_function_export", - "desc": "Test schema export to other formats" - }, - { - "name": "test_ws-xmlschema-walker_function_deps", - "desc": "Test basic dependency checks" - }, - { - "name": "test_ws-xmlschema-walker_function_load", - "desc": "Test loading XML schema" - }, - { - "name": "test_ws-xmlschema-walker_function_transform", - "desc": "Test schema transformation" - }, - { - "name": "test_ws-xmlschema-walker_function_query", - "desc": "Test querying schema nodes" - }, - { - "name": "test_ws-xmlschema-walker_function_merge", - "desc": "Test merging schemas" - }, - { - "name": "test_ws-xmlschema-walker_function_generate", - "desc": "Test code generation" - } - ] -} \ No newline at end of file diff --git a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_config.sh b/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_config.sh deleted file mode 100644 index eb41b5165e7..00000000000 --- a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_config.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-05 -# @License : Mulan PSL v2 -# @Desc : Test configuration loading -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装apache-commons-digester - LOG_INFO "检查是否已安装apache-commons-digester" - rpm -q apache-commons-digester > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "apache-commons-digester已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "apache-commons-digester未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有apache-commons-digester软件包 - LOG_INFO "检查yum源中是否有apache-commons-digester软件包" - dnf list available apache-commons-digester > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到apache-commons-digester软件包" - exit 255 - fi - - # 安装apache-commons-digester软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装apache-commons-digester软件包" - dnf install -y apache-commons-digester - CHECK_RESULT $? 0 0 "安装apache-commons-digester失败" - fi - - # 测试配置加载功能 - LOG_INFO "测试配置加载功能" - java -cp /usr/share/java/apache-commons-digester.jar org.apache.commons.digester.Digester -h > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "配置加载功能测试失败" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载apache-commons-digester软件包" - dnf remove -y apache-commons-digester - CHECK_RESULT $? 0 0 "卸载apache-commons-digester失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_install.sh b/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_install.sh deleted file mode 100644 index 8a102e6c144..00000000000 --- a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_install.sh +++ /dev/null @@ -1,89 +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-28 -# @License : Mulan PSL v2 -# @Desc : Test package installation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试软件包安装功能" - - # 检查yum源中是否存在apache-commons-digester-help软件包 - LOG_INFO "步骤1:检查yum源中是否存在apache-commons-digester-help软件包" - dnf list available apache-commons-digester-help 2>/dev/null | grep -q apache-commons-digester-help - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到apache-commons-digester-help软件包" - exit 255 - fi - - # 检查是否已经安装 - LOG_INFO "步骤2:检查是否已经安装apache-commons-digester-help软件包" - rpm -q apache-commons-digester-help - if [ $? -eq 0 ]; then - already_installed=true - LOG_INFO "软件包已经安装,测试结束后将保持安装状态" - else - already_installed=false - LOG_INFO "软件包未安装,将进行安装测试" - fi - - # 如果未安装,则安装软件包 - if [ "$already_installed" = false ]; then - LOG_INFO "步骤3:安装apache-commons-digester-help软件包" - dnf install -y apache-commons-digester-help - CHECK_RESULT $? 0 0 "安装软件包失败" - - # 验证安装 - LOG_INFO "步骤4:验证软件包是否安装成功" - rpm -q apache-commons-digester-help - CHECK_RESULT $? 0 0 "软件包安装验证失败" - - # 测试软件包功能 - LOG_INFO "步骤5:测试软件包基本功能" - # 这里添加具体的功能测试命令 - # 示例:检查命令是否存在 - if command -v digester-help &>/dev/null; then - LOG_INFO "软件包命令存在" - else - LOG_ERROR "软件包命令不存在" - exit 255 - fi - fi - - # 环境清理 - LOG_INFO "步骤6:清理测试环境" - if [ "$already_installed" = false ]; then - LOG_INFO "卸载测试安装的软件包" - dnf remove -y apache-commons-digester-help - CHECK_RESULT $? 0 0 "卸载软件包失败" - - # 验证卸载 - rpm -q apache-commons-digester-help - if [ $? -eq 0 ]; then - LOG_ERROR "软件包卸载失败" - exit 1 - else - LOG_INFO "软件包已成功卸载" - fi - else - LOG_INFO "保持原有安装状态,无需卸载" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_parse.sh b/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_parse.sh deleted file mode 100644 index f80bba8cc04..00000000000 --- a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_parse.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-11-29 -# @License : Mulan PSL v2 -# @Desc : Test XML parsing functionality -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test XML parsing functionality" - - # 检查是否已安装apache-commons-digester - LOG_INFO "检查是否已安装apache-commons-digester" - rpm -q apache-commons-digester - if [ $? -eq 0 ]; then - LOG_INFO "apache-commons-digester已安装,测试结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "apache-commons-digester未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有apache-commons-digester - LOG_INFO "检查yum源中是否有apache-commons-digester" - dnf list available apache-commons-digester > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "yum源中未找到apache-commons-digester软件包" - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到apache-commons-digester软件包" - exit 255 - fi - - # 安装apache-commons-digester(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装apache-commons-digester" - dnf install -y apache-commons-digester > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装apache-commons-digester失败" - fi - - # 测试XML解析功能 - LOG_INFO "测试XML解析功能" - java -cp /usr/share/java/apache-commons-digester.jar org.apache.commons.digester.DigesterTest > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "XML解析功能测试失败" - - # 清理环境(如果测试前未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在卸载apache-commons-digester" - dnf remove -y apache-commons-digester > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载apache-commons-digester失败" - fi - - LOG_INFO "测试完成:Test XML parsing functionality" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_ruleset.sh b/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_ruleset.sh deleted file mode 100644 index 15927eeebca..00000000000 --- a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_ruleset.sh +++ /dev/null @@ -1,99 +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-28 -# @License : Mulan PSL v2 -# @Desc : Test ruleset definition -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试脚本:Test ruleset definition - - LOG_INFO "开始测试:Test ruleset definition" - - # 定义软件包名称 - PACKAGE_NAME="apache-commons-digester" - - # 步骤1:检查环境是否已安装指定软件包 - LOG_INFO "步骤1:检查环境是否已安装${PACKAGE_NAME}软件包" - if dnf list installed "${PACKAGE_NAME}" > /dev/null 2>&1; then - LOG_INFO "${PACKAGE_NAME}已安装,脚本结束时将保持安装状态" - INSTALLED_BEFORE="true" - else - LOG_INFO "${PACKAGE_NAME}未安装,将在测试过程中安装并在结束前卸载" - INSTALLED_BEFORE="false" - fi - - # 步骤2:检查yum源中是否存在该软件包 - LOG_INFO "步骤2:检查yum源中是否存在${PACKAGE_NAME}软件包" - if ! dnf list available "${PACKAGE_NAME}" > /dev/null 2>&1; then - LOG_ERROR "yum源中未找到${PACKAGE_NAME}软件包" - exit 255 - fi - LOG_INFO "yum源中存在${PACKAGE_NAME}软件包" - - # 步骤3:如果未安装,则安装软件包 - if [ "${INSTALLED_BEFORE}" = "false" ]; then - LOG_INFO "步骤3:安装${PACKAGE_NAME}软件包" - dnf install -y "${PACKAGE_NAME}" - CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}软件包失败" - LOG_INFO "成功安装${PACKAGE_NAME}软件包" - fi - - # 步骤4:执行测试命令(示例:检查digester命令是否存在) - LOG_INFO "步骤4:检查digester命令是否存在" - if command -v digester > /dev/null 2>&1; then - LOG_INFO "digester命令存在" - else - LOG_ERROR "digester命令不存在" - exit 255 - fi - - # 步骤5:测试命令参数(示例:检查digester命令是否支持--help参数) - LOG_INFO "步骤5:测试digester命令是否支持--help参数" - if digester --help > /dev/null 2>&1; then - LOG_INFO "digester命令支持--help参数" - else - LOG_ERROR "digester命令不支持--help参数" - exit 255 - fi - - # 步骤6:执行具体测试命令(示例:使用digester命令测试规则集定义) - LOG_INFO "步骤6:执行digester命令测试规则集定义" - digester --help 2>&1 | grep -q "ruleset" - CHECK_RESULT $? 0 0 "digester命令测试规则集定义失败" - LOG_INFO "digester命令测试规则集定义成功" - - # 步骤7:如果需要,在第二个服务器上执行命令(示例:检查第二个服务器上的digester命令) - LOG_INFO "步骤7:在第二个服务器上检查digester命令是否存在" - SSH_CMD "command -v digester" $NODE2_IPV4 $NODE2_PASSWORD $NODE2_USER - CHECK_RESULT $? 0 0 "第二个服务器上digester命令不存在或执行失败" - LOG_INFO "第二个服务器上digester命令存在" - - # 步骤8:清理环境(如果测试前未安装,则卸载软件包) - if [ "${INSTALLED_BEFORE}" = "false" ]; then - LOG_INFO "步骤8:卸载${PACKAGE_NAME}软件包" - dnf remove -y "${PACKAGE_NAME}" - CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}软件包失败" - LOG_INFO "成功卸载${PACKAGE_NAME}软件包" - else - LOG_INFO "步骤8:测试前已安装${PACKAGE_NAME},保持安装状态" - fi - - LOG_INFO "测试完成:Test ruleset definition" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_version.sh b/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_version.sh deleted file mode 100644 index 7eda5c0301a..00000000000 --- a/testcases/function_test/pkg_test/apache-commons-digester/apache-commons-digester-help/test_apache-commons-digester-help_function_version.sh +++ /dev/null @@ -1,90 +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-28 -# @License : Mulan PSL v2 -# @Desc : Test package version check -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 定义颜色变量(用于日志输出) - LOG_INFO() { - echo -e "\033[32m[INFO]\033[0m $1" - } - - LOG_ERROR() { - echo -e "\033[31m[ERROR]\033[0m $1" - } - - # 定义包名 - PACKAGE_NAME="apache-commons-digester" - PACKAGE_FULL_NAME="apache-commons-digester-help" - - # 步骤1: 检查软件包是否存在于yum源中 - LOG_INFO "步骤1: 检查软件包是否存在于yum源中" - dnf list available ${PACKAGE_FULL_NAME} &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "软件包 ${PACKAGE_FULL_NAME} 不存在于yum源中" - exit 255 - fi - - # 步骤2: 检查当前环境是否已安装软件包 - LOG_INFO "步骤2: 检查当前环境是否已安装软件包" - rpm -q ${PACKAGE_FULL_NAME} &>/dev/null - if [ $? -eq 0 ]; then - LOG_INFO "软件包 ${PACKAGE_FULL_NAME} 已安装,标记为已安装状态" - INSTALLED="yes" - else - LOG_INFO "软件包 ${PACKAGE_FULL_NAME} 未安装,标记为未安装状态" - INSTALLED="no" - fi - - # 步骤3: 如果未安装,则安装软件包 - if [ "${INSTALLED}" = "no" ]; then - LOG_INFO "步骤3: 安装软件包 ${PACKAGE_FULL_NAME}" - dnf install -y ${PACKAGE_FULL_NAME} - CHECK_RESULT $? 0 0 "安装软件包失败" - fi - - # 步骤4: 测试软件包版本检查功能 - LOG_INFO "步骤4: 测试软件包版本检查功能" - # 假设软件包提供版本检查命令为 "digester-version" - COMMAND="digester-version" - # 检查命令是否存在 - type ${COMMAND} &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "命令 ${COMMAND} 不存在或不支持" - exit 255 - fi - - # 执行版本检查命令 - ${COMMAND} --version - CHECK_RESULT $? 0 0 "版本检查命令执行失败" - - # 步骤5: 清理环境,恢复到之前的状态 - LOG_INFO "步骤5: 清理环境,恢复到之前的状态" - if [ "${INSTALLED}" = "no" ]; then - LOG_INFO "卸载软件包 ${PACKAGE_FULL_NAME}" - dnf remove -y ${PACKAGE_FULL_NAME} - CHECK_RESULT $? 0 0 "卸载软件包失败" - else - LOG_INFO "软件包 ${PACKAGE_FULL_NAME} 原本已安装,保持安装状态" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/jboss-remoting-jmx/jboss-remoting-jmx-help/test_jboss-remoting-jmx-help_function_start.sh b/testcases/function_test/pkg_test/jboss-remoting-jmx/jboss-remoting-jmx-help/test_jboss-remoting-jmx-help_function_start.sh deleted file mode 100644 index 31a8bff17be..00000000000 --- a/testcases/function_test/pkg_test/jboss-remoting-jmx/jboss-remoting-jmx-help/test_jboss-remoting-jmx-help_function_start.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-03 -# @License : Mulan PSL v2 -# @Desc : 测试 jboss-remoting-jmx-help 的启动功能 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查jboss-remoting-jmx-help软件包是否已安装 - LOG_INFO "检查jboss-remoting-jmx-help软件包是否已安装" - rpm -q jboss-remoting-jmx-help > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "jboss-remoting-jmx-help软件包已安装,脚本结束后将保持安装状态" - INSTALLED=1 - else - LOG_INFO "jboss-remoting-jmx-help软件包未安装,将在测试后卸载" - INSTALLED=0 - fi - - # 检查yum源中是否有jboss-remoting-jmx-help软件包 - LOG_INFO "检查yum源中是否有jboss-remoting-jmx-help软件包" - dnf list available jboss-remoting-jmx-help > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到jboss-remoting-jmx-help软件包" - exit 255 - fi - - # 安装jboss-remoting-jmx-help软件包(如果未安装) - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "开始安装jboss-remoting-jmx-help软件包" - dnf install -y jboss-remoting-jmx-help > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装jboss-remoting-jmx-help软件包失败" - fi - - # 测试jboss-remoting-jmx-help的启动功能 - LOG_INFO "测试jboss-remoting-jmx-help的启动功能" - jboss-remoting-jmx-help --help > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "jboss-remoting-jmx-help启动功能测试失败" - - # 清理环境(如果脚本开始时未安装) - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载jboss-remoting-jmx-help软件包" - dnf remove -y jboss-remoting-jmx-help > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载jboss-remoting-jmx-help软件包失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-d/texlive-caladea/test_texlive-caladea_function_install.sh b/testcases/function_test/pkg_test/texlive-split-d/texlive-caladea/test_texlive-caladea_function_install.sh deleted file mode 100644 index 8350b1b3985..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-d/texlive-caladea/test_texlive-caladea_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-09-30 -# @License : Mulan PSL v2 -# @Desc : Test package installation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已经安装texlive-caladea - LOG_INFO "检查是否已经安装texlive-caladea" - rpm -q texlive-caladea > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-caladea已经安装,脚本结束时保持安装状态" - installed=true - else - installed=false - fi - - # 检查yum源中是否有texlive-caladea软件包 - LOG_INFO "检查yum源中是否有texlive-caladea软件包" - dnf list available texlive-caladea > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum源中没有texlive-caladea软件包" - - # 安装texlive-caladea软件包 - if [ "$installed" = false ]; then - LOG_INFO "安装texlive-caladea软件包" - dnf install -y texlive-caladea - CHECK_RESULT $? 0 0 "安装texlive-caladea软件包失败" - fi - - # 验证texlive-caladea是否成功安装 - LOG_INFO "验证texlive-caladea是否成功安装" - rpm -q texlive-caladea > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "texlive-caladea未成功安装" - - # 清理环境 - if [ "$installed" = false ]; then - LOG_INFO "卸载texlive-caladea软件包" - dnf remove -y texlive-caladea - CHECK_RESULT $? 0 0 "卸载texlive-caladea软件包失败" - - # 再次验证texlive-caladea是否已卸载 - LOG_INFO "验证texlive-caladea是否已卸载" - rpm -q texlive-caladea > /dev/null 2>&1 - CHECK_RESULT $? 1 0 "texlive-caladea未成功卸载" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_basic.sh deleted file mode 100644 index 0c9c2790f10..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_basic.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-02-26 -# @License : Mulan PSL v2 -# @Desc : Test basic document compilation with cmcyr fonts -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test basic document compilation with cmcyr fonts" - LOG_INFO "步骤1:检查环境是否已安装texlive-cmcyr软件包" - if rpm -q texlive-cmcyr &> /dev/null; then - LOG_INFO "texlive-cmcyr已安装,脚本结束时将保持安装状态" - INSTALLED="true" - else - LOG_INFO "texlive-cmcyr未安装,将在测试过程中安装并在结束后卸载" - INSTALLED="false" - fi - - LOG_INFO "步骤2:检查yum源中是否存在texlive-cmcyr软件包" - if ! dnf list available texlive-cmcyr &> /dev/null; then - LOG_ERROR "yum源中未找到texlive-cmcyr软件包" - exit 255 - fi - - if [ "$INSTALLED" = "false" ]; then - LOG_INFO "步骤3:安装texlive-cmcyr软件包" - dnf install -y texlive-cmcyr - CHECK_RESULT $? 0 0 "安装texlive-cmcyr失败" - fi - - LOG_INFO "步骤4:检查texlive-cmcyr提供的命令和参数" - if ! command -v latex &> /dev/null; then - LOG_ERROR "latex命令不存在" - exit 255 - fi - - LOG_INFO "步骤5:创建一个简单的LaTeX文档,使用cmcyr字体" - cat > test_cmcyr.tex << "EOF" - \documentclass{article} - \usepackage[T2A]{fontenc} - \usepackage[utf8]{inputenc} - \usepackage{cmcyr} - \begin{document} - This is a test document with cmcyr fonts. - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试文档失败" - - LOG_INFO "步骤6:使用latex编译测试文档" - latex test_cmcyr.tex - CHECK_RESULT $? 0 0 "latex编译失败" - - LOG_INFO "步骤7:检查生成的DVI文件" - if [ -f test_cmcyr.dvi ]; then - LOG_INFO "DVI文件生成成功" - else - LOG_ERROR "DVI文件未生成" - exit 1 - fi - - LOG_INFO "步骤8:清理生成的临时文件" - rm -f test_cmcyr.tex test_cmcyr.dvi test_cmcyr.log test_cmcyr.aux - - if [ "$INSTALLED" = "false" ]; then - LOG_INFO "步骤9:卸载texlive-cmcyr软件包" - dnf remove -y texlive-cmcyr - CHECK_RESULT $? 0 0 "卸载texlive-cmcyr失败" - fi - - LOG_INFO "测试完成:Test basic document compilation with cmcyr fonts" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_cyrillic.sh b/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_cyrillic.sh deleted file mode 100644 index 8c49c7802c4..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_cyrillic.sh +++ /dev/null @@ -1,88 +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-26 -# @License : Mulan PSL v2 -# @Desc : Test rendering of Cyrillic text with cmcyr -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装texlive-cmcyr - LOG_INFO "检查是否已安装texlive-cmcyr软件包" - if rpm -q texlive-cmcyr &> /dev/null; then - LOG_INFO "texlive-cmcyr已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cmcyr未安装,将在测试后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-cmcyr软件包 - LOG_INFO "检查yum源中是否有texlive-cmcyr软件包" - if ! dnf list available texlive-cmcyr &> /dev/null; then - LOG_ERROR "yum源中未找到texlive-cmcyr软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装texlive-cmcyr软件包" - dnf install -y texlive-cmcyr - CHECK_RESULT $? 0 0 "安装texlive-cmcyr失败" - fi - - # 测试渲染西里尔文本 - LOG_INFO "测试使用cmcyr渲染西里尔文本" - cat > test_cyrillic.tex << "EOF" - \documentclass{article} - \usepackage{cmcyr} - \begin{document} - \textcyr{Привет, мир!} - \end{document} - EOF - - # 检查tex文件是否创建成功 - CHECK_RESULT $? 0 0 "创建测试tex文件失败" - - # 使用latex命令编译tex文件 - LOG_INFO "使用latex编译tex文件" - latex test_cyrillic.tex - CHECK_RESULT $? 0 0 "latex编译失败" - - # 检查生成的dvi文件 - LOG_INFO "检查生成的dvi文件" - if [ -f test_cyrillic.dvi ]; then - LOG_INFO "成功生成dvi文件" - else - LOG_ERROR "未生成dvi文件" - exit 1 - fi - - # 清理生成的临时文件 - LOG_INFO "清理临时文件" - rm -f test_cyrillic.tex test_cyrillic.aux test_cyrillic.log test_cyrillic.dvi - - # 如果之前未安装,则卸载软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlive-cmcyr软件包" - dnf remove -y texlive-cmcyr - CHECK_RESULT $? 0 0 "卸载texlive-cmcyr失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_font.sh b/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_font.sh deleted file mode 100644 index 3b17395db2b..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_font.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-27 -# @License : Mulan PSL v2 -# @Desc : Test the font rendering functionality of texlive-cmcyr -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查texlive-cmcyr软件包是否已安装 - LOG_INFO "检查texlive-cmcyr软件包是否已安装" - if dnf list installed texlive-cmcyr &>/dev/null; then - LOG_INFO "texlive-cmcyr软件包已安装,测试完成后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cmcyr软件包未安装,将在测试完成后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-cmcyr软件包 - LOG_INFO "检查yum源中是否有texlive-cmcyr软件包" - if ! dnf list available texlive-cmcyr &>/dev/null; then - LOG_ERROR "yum源中未找到texlive-cmcyr软件包" - exit 255 - fi - - # 安装texlive-cmcyr软件包(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装texlive-cmcyr软件包" - dnf install -y texlive-cmcyr - CHECK_RESULT $? 0 0 "安装texlive-cmcyr失败" - fi - - # 测试字体渲染功能 - LOG_INFO "测试texlive-cmcyr字体渲染功能" - TEST_CMD="echo "\documentclass{article}\usepackage{cmcyr}\begin{document}Test\end{document}" > test.tex && pdflatex test.tex" - eval "$TEST_CMD" - CHECK_RESULT $? 0 0 "字体渲染功能测试失败" - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f test.tex test.log test.aux test.pdf - - # 卸载texlive-cmcyr软件包(如果最初未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlive-cmcyr软件包" - dnf remove -y texlive-cmcyr - CHECK_RESULT $? 0 0 "卸载texlive-cmcyr失败" - fi - - LOG_INFO "测试脚本执行完成" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_fonts.sh b/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_fonts.sh deleted file mode 100644 index a0fbff0cf96..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-e/texlive-cmcyr/test_texlive-cmcyr_function_fonts.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-02-26 -# @License : Mulan PSL v2 -# @Desc : Test the availability of CM Cyrillic fonts in TeX -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - set -e - - # 检查是否已安装texlive-cmcyr-function-fonts包 - LOG_INFO "检查是否已安装texlive-cmcyr-function-fonts软件包" - if dnf list installed texlive-cmcyr-function-fonts &>/dev/null; then - LOG_INFO "texlive-cmcyr-function-fonts已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cmcyr-function-fonts未安装" - INSTALLED=false - fi - - # 检查yum源中是否存在该软件包 - LOG_INFO "检查yum源中是否存在texlive-cmcyr-function-fonts软件包" - if ! dnf list available texlive-cmcyr-function-fonts &>/dev/null; then - LOG_ERROR "yum源中不存在texlive-cmcyr-function-fonts软件包" - exit 255 - fi - - # 如果未安装,则进行安装 - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装texlive-cmcyr-function-fonts软件包" - dnf install -y texlive-cmcyr-function-fonts - CHECK_RESULT $? 0 0 "安装texlive-cmcyr-function-fonts失败" - LOG_INFO "texlive-cmcyr-function-fonts软件包安装成功" - fi - - # 测试CM Cyrillic字体的可用性 - LOG_INFO "测试CM Cyrillic字体的可用性" - # 使用kpsewhich命令查找cmcyr字体文件,这是一个常见的TeX字体工具 - if command -v kpsewhich &>/dev/null; then - # 检查cmcyr相关的字体文件是否存在 - FONT_FILES=("cmcyr10.tfm" "cmcyr10.vf" "cmcyr10.600pk" "cmcyr10.600gf") - for font_file in "${FONT_FILES[@]}"; do - LOG_INFO "查找字体文件: $font_file" - font_path=$(kpsewhich $font_file 2>/dev/null) - if [ -n "$font_path" ] && [ -f "$font_path" ]; then - LOG_INFO "找到字体文件: $font_path" - else - LOG_ERROR "未找到字体文件: $font_file" - exit 1 - fi - done - LOG_INFO "CM Cyrillic字体文件检查通过" - else - LOG_ERROR "未找到kpsewhich命令,无法检查字体文件" - exit 1 - fi - - # 清理环境:如果脚本开始时未安装,则在结束时卸载 - if [ "$INSTALLED" = false ]; then - LOG_INFO "清理环境:卸载texlive-cmcyr-function-fonts软件包" - dnf remove -y texlive-cmcyr-function-fonts - CHECK_RESULT $? 0 0 "卸载texlive-cmcyr-function-fonts失败" - LOG_INFO "texlive-cmcyr-function-fonts软件包卸载成功" - else - LOG_INFO "脚本开始时软件包已安装,保持安装状态,无需卸载" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_basic_usage.sh b/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_basic_usage.sh deleted file mode 100644 index 418e703dc7b..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_basic_usage.sh +++ /dev/null @@ -1,81 +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-25 -# @License : Mulan PSL v2 -# @Desc : Test basic Dynkin diagram typesetting -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test basic Dynkin diagram typesetting" - LOG_INFO "步骤1:检查是否已安装texlive-dynkin-diagrams软件包" - rpm -q texlive-dynkin-diagrams - if [ $? -eq 0 ]; then - LOG_INFO "texlive-dynkin-diagrams已安装,脚本结束时将保持安装状态" - INSTALLED=1 - else - LOG_INFO "texlive-dynkin-diagrams未安装,将在测试中安装" - INSTALLED=0 - fi - - LOG_INFO "步骤2:检查yum源中是否存在texlive-dynkin-diagrams软件包" - dnf list available texlive-dynkin-diagrams - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-dynkin-diagrams软件包" - exit 255 - fi - - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "步骤3:安装texlive-dynkin-diagrams软件包" - dnf install -y texlive-dynkin-diagrams - CHECK_RESULT $? 0 0 "安装texlive-dynkin-diagrams失败" - fi - - LOG_INFO "步骤4:测试基本Dynkin图排版功能" - cat > test_dynkin.tex << "EOF" - \documentclass{article} - \usepackage{dynkin-diagrams} - \begin{document} - Dynkin diagram of type A3: \dynkin{A}{3} - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试TeX文件失败" - - LOG_INFO "步骤5:使用pdflatex编译TeX文件" - pdflatex test_dynkin.tex - CHECK_RESULT $? 0 0 "pdflatex编译失败" - - LOG_INFO "步骤6:检查生成的PDF文件" - if [ -f test_dynkin.pdf ]; then - LOG_INFO "PDF文件生成成功" - else - LOG_ERROR "PDF文件未生成" - exit 1 - fi - - LOG_INFO "步骤7:清理测试文件" - rm -f test_dynkin.tex test_dynkin.aux test_dynkin.log test_dynkin.pdf - - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "步骤8:卸载texlive-dynkin-diagrams软件包" - dnf remove -y texlive-dynkin-diagrams - CHECK_RESULT $? 0 0 "卸载texlive-dynkin-diagrams失败" - fi - - LOG_INFO "测试完成:Test basic Dynkin diagram typesetting" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_draw.sh b/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_draw.sh deleted file mode 100644 index 2de636813e2..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_draw.sh +++ /dev/null @@ -1,68 +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 drawing Dynkin diagrams -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-dynkin-diagrams - LOG_INFO "检查是否已安装texlive-dynkin-diagrams" - if dnf list installed texlive-dynkin-diagrams &>/dev/null; then - LOG_INFO "texlive-dynkin-diagrams已安装,脚本结束后将保持安装状态" - installed=true - else - LOG_INFO "texlive-dynkin-diagrams未安装,将在测试结束后卸载" - installed=false - fi - - # 检查yum源中是否有texlive-dynkin-diagrams - LOG_INFO "检查yum源中是否有texlive-dynkin-diagrams" - if ! dnf list available texlive-dynkin-diagrams &>/dev/null; then - LOG_ERROR "yum源中未找到texlive-dynkin-diagrams软件包" - exit 255 - fi - - # 安装texlive-dynkin-diagrams - if [ "$installed" = false ]; then - LOG_INFO "安装texlive-dynkin-diagrams" - dnf install -y texlive-dynkin-diagrams - CHECK_RESULT $? 0 0 "安装texlive-dynkin-diagrams失败" - fi - - # 测试绘制Dynkin图 - LOG_INFO "测试绘制Dynkin图" - draw_output=$(texlive-dynkin-diagrams draw 2>&1) - if [ $? -ne 0 ]; then - LOG_ERROR "绘制Dynkin图失败: $draw_output" - exit 255 - fi - CHECK_RESULT $? 0 0 "绘制Dynkin图失败" - - # 清理环境 - if [ "$installed" = false ]; then - LOG_INFO "卸载texlive-dynkin-diagrams" - dnf remove -y texlive-dynkin-diagrams - CHECK_RESULT $? 0 0 "卸载texlive-dynkin-diagrams失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_install.sh b/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_install.sh deleted file mode 100644 index fd64f8e7bdd..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_install.sh +++ /dev/null @@ -1,152 +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-25 -# @License : Mulan PSL v2 -# @Desc : Test installation of texlive-dynkin-diagrams package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 定义颜色代码(用于日志输出) - RED="\033[0;31m" - GREEN="\033[0;32m" - YELLOW="\033[1;33m" - NC="\033[0m" # No Color - - # 日志函数(直接使用LOG_INFO和LOG_ERROR) - LOG_INFO() { - echo -e "${GREEN}[INFO]${NC} $1" - } - - LOG_ERROR() { - echo -e "${RED}[ERROR]${NC} $1" - } - - # 检查软件包是否在yum源中 - check_package_in_repo() { - local pkg=$1 - LOG_INFO "检查yum源中是否存在软件包: $pkg" - dnf list available "$pkg" &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在软件包: $pkg" - exit 255 - fi - LOG_INFO "软件包 $pkg 存在于yum源中" - } - - # 检查命令参数是否支持 - check_command_option() { - local cmd=$1 - local option=$2 - LOG_INFO "检查命令 $cmd 是否支持参数 $option" - $cmd --help 2>&1 | grep -q -- "$option" - if [ $? -ne 0 ]; then - LOG_ERROR "命令 $cmd 不支持参数 $option" - exit 255 - fi - LOG_INFO "命令 $cmd 支持参数 $option" - } - - # 检查软件包是否已安装 - check_package_installed() { - local pkg=$1 - LOG_INFO "检查软件包 $pkg 是否已安装" - rpm -q "$pkg" &>/dev/null - return $? - } - - # 主测试函数 - test_texlive_dynkin_diagrams_install() { - local pkg_name="texlive-dynkin-diagrams" - local installed_before_test=false - - LOG_INFO "开始测试: Test installation of texlive-dynkin-diagrams package" - - # 步骤1: 检查测试前是否已安装 - LOG_INFO "步骤1: 检查测试前软件包是否已安装" - if check_package_installed "$pkg_name"; then - LOG_INFO "测试前软件包 $pkg_name 已安装" - installed_before_test=true - else - LOG_INFO "测试前软件包 $pkg_name 未安装" - fi - - # 步骤2: 检查yum源中是否存在该软件包 - LOG_INFO "步骤2: 检查yum源中是否存在软件包 $pkg_name" - check_package_in_repo "$pkg_name" - - # 步骤3: 检查dnf命令是否支持install和remove参数 - LOG_INFO "步骤3: 检查dnf命令参数支持情况" - check_command_option "dnf" "install" - check_command_option "dnf" "remove" - - # 步骤4: 如果未安装,则执行安装 - if ! $installed_before_test; then - LOG_INFO "步骤4: 安装软件包 $pkg_name" - dnf install -y "$pkg_name" - CHECK_RESULT $? 0 0 "安装软件包 $pkg_name 失败" - LOG_INFO "软件包 $pkg_name 安装成功" - else - LOG_INFO "步骤4: 软件包已安装,跳过安装步骤" - fi - - # 步骤5: 验证安装 - LOG_INFO "步骤5: 验证软件包安装" - check_package_installed "$pkg_name" - CHECK_RESULT $? 0 0 "验证软件包 $pkg_name 安装失败" - LOG_INFO "软件包 $pkg_name 验证成功" - - # 步骤6: 测试软件包基本功能(如果有相关命令) - LOG_INFO "步骤6: 测试软件包基本功能" - # 这里可以添加具体的功能测试,例如检查相关文件是否存在 - # 由于texlive-dynkin-diagrams是LaTeX宏包,可能没有直接可执行命令 - # 可以检查相关文件是否被正确安装 - if [ -d "/usr/share/texlive/texmf-dist/tex/latex/dynkin-diagrams" ] || \ - [ -d "/usr/share/texmf/tex/latex/dynkin-diagrams" ]; then - LOG_INFO "找到dynkin-diagrams相关文件,基本功能测试通过" - else - LOG_INFO "未找到标准目录,尝试其他查找方式" - find /usr/share -name "*dynkin*" -type d 2>/dev/null | head -1 - CHECK_RESULT $? 0 0 "未找到dynkin-diagrams相关文件" - fi - - # 步骤7: 环境恢复 - LOG_INFO "步骤7: 恢复测试环境" - if ! $installed_before_test; then - LOG_INFO "卸载测试安装的软件包 $pkg_name" - dnf remove -y "$pkg_name" - CHECK_RESULT $? 0 0 "卸载软件包 $pkg_name 失败" - LOG_INFO "软件包 $pkg_name 卸载成功" - - # 再次验证卸载 - check_package_installed "$pkg_name" - if [ $? -eq 0 ]; then - LOG_ERROR "软件包 $pkg_name 卸载后仍存在" - exit 1 - fi - LOG_INFO "软件包 $pkg_name 已成功卸载,环境已恢复" - else - LOG_INFO "测试前已安装软件包,保持安装状态,无需卸载" - fi - - LOG_INFO "测试完成: Test installation of texlive-dynkin-diagrams package 成功" - } - - # 执行测试 - test_texlive_dynkin_diagrams_install -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_remove.sh b/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_remove.sh deleted file mode 100644 index 9da4ad0b377..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-g/texlive-dynkin-diagrams/test_texlive-dynkin-diagrams_function_remove.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 : 2026-03-25 -# @License : Mulan PSL v2 -# @Desc : Test removal of texlive-dynkin-diagrams package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test removal of texlive-dynkin-diagrams package" - LOG_INFO "步骤1:检查环境中是否已安装 texlive-dynkin-diagrams 软件包" - rpm -q texlive-dynkin-diagrams - if [ $? -eq 0 ]; then - LOG_INFO "环境中已安装 texlive-dynkin-diagrams 软件包" - INSTALLED="true" - else - LOG_INFO "环境中未安装 texlive-dynkin-diagrams 软件包" - INSTALLED="false" - fi - LOG_INFO "步骤2:检查 yum 源中是否存在 texlive-dynkin-diagrams 软件包" - dnf list available texlive-dynkin-diagrams - if [ $? -ne 0 ]; then - LOG_ERROR "yum 源中未找到 texlive-dynkin-diagrams 软件包" - exit 255 - fi - if [ "$INSTALLED" == "false" ]; then - LOG_INFO "步骤3:安装 texlive-dynkin-diagrams 软件包" - dnf install -y texlive-dynkin-diagrams - CHECK_RESULT $? 0 0 "安装 texlive-dynkin-diagrams 软件包失败" - fi - LOG_INFO "步骤4:执行移除 texlive-dynkin-diagrams 软件包的操作" - dnf remove -y texlive-dynkin-diagrams - CHECK_RESULT $? 0 0 "移除 texlive-dynkin-diagrams 软件包失败" - LOG_INFO "步骤5:验证 texlive-dynkin-diagrams 软件包是否已成功移除" - rpm -q texlive-dynkin-diagrams - CHECK_RESULT $? 1 0 "texlive-dynkin-diagrams 软件包未成功移除" - if [ "$INSTALLED" == "false" ]; then - LOG_INFO "步骤6:清理环境,恢复到之前的状态" - LOG_INFO "由于测试前未安装 texlive-dynkin-diagrams 软件包,无需恢复" - else - LOG_INFO "步骤6:清理环境,恢复到之前的状态" - LOG_INFO "重新安装 texlive-dynkin-diagrams 软件包以恢复环境" - dnf install -y texlive-dynkin-diagrams - CHECK_RESULT $? 0 0 "重新安装 texlive-dynkin-diagrams 软件包失败" - fi - LOG_INFO "测试完成:Test removal of texlive-dynkin-diagrams package" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-j/texlive-grayhints/test_texlive-grayhints_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-j/texlive-grayhints/test_texlive-grayhints_function_basic.sh deleted file mode 100644 index 090a38819d7..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-j/texlive-grayhints/test_texlive-grayhints_function_basic.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-26 -# @License : Mulan PSL v2 -# @Desc : Basic functionality test for texlive-grayhints -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-grayhints - LOG_INFO "检查是否已安装texlive-grayhints..." - rpm -q texlive-grayhints > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-grayhints已安装,脚本结束后将保持安装状态。" - INSTALLED=true - else - LOG_INFO "texlive-grayhints未安装,将在测试完成后卸载。" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-grayhints软件包 - LOG_INFO "检查yum源中是否有texlive-grayhints软件包..." - dnf list available texlive-grayhints > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-grayhints软件包。" - exit 255 - fi - - # 安装texlive-grayhints软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装texlive-grayhints软件包..." - dnf install -y texlive-grayhints - CHECK_RESULT $? 0 0 "安装texlive-grayhints失败。" - fi - - # 测试基本功能 - LOG_INFO "测试texlive-grayhints的基本功能..." - grayhints --help > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "texlive-grayhints基本功能测试失败。" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlive-grayhints软件包..." - dnf remove -y texlive-grayhints - CHECK_RESULT $? 0 0 "卸载texlive-grayhints失败。" - fi - - LOG_INFO "Basic functionality test for texlive-grayhints测试完成。" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_basic.sh deleted file mode 100644 index 24a29276073..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_basic.sh +++ /dev/null @@ -1,70 +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 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-msc软件包 - LOG_INFO "检查texlive-msc是否已安装" - rpm -q texlive-msc > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-msc已安装,脚本结束后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-msc未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否存在texlive-msc软件包 - LOG_INFO "检查yum源中是否存在texlive-msc软件包" - dnf list available texlive-msc > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum源中不存在texlive-msc软件包" - - # 安装texlive-msc软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装texlive-msc软件包" - dnf install -y texlive-msc - CHECK_RESULT $? 0 0 "安装texlive-msc失败" - fi - - # 测试基本功能 - LOG_INFO "测试texlive-msc基本功能" - command_to_test="some_texlive_msc_command --valid-arg" # 替换为实际命令 - $command_to_test > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "texlive-msc基本功能测试失败" - - # 测试不支持参数的情况 - LOG_INFO "测试不支持参数的情况" - command_to_test="some_texlive_msc_command --invalid-arg" # 替换为实际命令和无效参数 - $command_to_test > /dev/null 2>&1 - CHECK_RESULT $? !0 255 "不支持的参数未触发失败" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlive-msc软件包" - dnf remove -y texlive-msc - CHECK_RESULT $? 0 0 "卸载texlive-msc失败" - fi - - LOG_INFO "Basic functionality test完成" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_basic_usage.sh b/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_basic_usage.sh deleted file mode 100644 index ab79c627043..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_basic_usage.sh +++ /dev/null @@ -1,98 +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-23 -# @License : Mulan PSL v2 -# @Desc : Test basic msc macro usage in LaTeX -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:测试LaTeX中msc宏的基本用法" - - # 检查软件包是否在yum源中 - LOG_INFO "步骤1:检查texlive-msc软件包是否在yum源中" - dnf list available texlive-msc &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "texlive-msc软件包不在yum源中" - exit 255 - fi - - # 检查是否已安装 - LOG_INFO "步骤2:检查texlive-msc是否已安装" - rpm -q texlive-msc &>/dev/null - if [ $? -eq 0 ]; then - LOG_INFO "texlive-msc已安装,测试结束后保持安装状态" - INSTALLED=1 - else - LOG_INFO "texlive-msc未安装,将安装作为测试步骤" - INSTALLED=0 - fi - - # 如果未安装,则安装软件包 - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "步骤3:安装texlive-msc软件包" - dnf install -y texlive-msc - CHECK_RESULT $? 0 0 "安装texlive-msc失败" - fi - - # 测试msc宏的基本用法 - LOG_INFO "步骤4:测试msc宏的基本用法" - cat > test_msc.tex << "EOF" - \documentclass{article} - \usepackage{msc} - \begin{document} - \begin{msc}{Test Diagram} - \declinst{A}{}{A} - \declinst{B}{}{B} - \nextlevel - \mess{Hello}{A}{B} - \nextlevel - \mess{Hi}{B}{A} - \end{msc} - \end{document} - EOF - - # 编译LaTeX文档 - LOG_INFO "步骤5:编译LaTeX文档" - pdflatex -interaction=nonstopmode test_msc.tex - CHECK_RESULT $? 0 0 "编译LaTeX文档失败" - - # 检查生成的PDF文件 - LOG_INFO "步骤6:检查生成的PDF文件" - if [ -f test_msc.pdf ]; then - LOG_INFO "成功生成PDF文件" - file test_msc.pdf | grep -q "PDF document" - CHECK_RESULT $? 0 0 "生成的PDF文件格式不正确" - else - LOG_ERROR "未生成PDF文件" - exit 1 - fi - - # 清理测试文件 - LOG_INFO "步骤7:清理测试文件" - rm -f test_msc.tex test_msc.pdf test_msc.aux test_msc.log test_msc.out - - # 如果测试前未安装,则卸载软件包 - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "步骤8:卸载texlive-msc软件包" - dnf remove -y texlive-msc - CHECK_RESULT $? 0 0 "卸载texlive-msc失败" - fi - - LOG_INFO "测试完成:LaTeX中msc宏的基本用法测试通过" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_check_inst.sh b/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_check_inst.sh deleted file mode 100644 index 5e787c89a59..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_check_inst.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-02-23 -# @License : Mulan PSL v2 -# @Desc : Check if texlive-msc is installed -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:检查texlive-msc是否已安装" - - # 定义软件包名称 - PACKAGE_NAME="texlive-msc" - - # 步骤1:检查yum源中是否存在texlive-msc软件包 - 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:检查当前是否已安装texlive-msc - LOG_INFO "步骤2:检查当前是否已安装${PACKAGE_NAME}" - if rpm -q "${PACKAGE_NAME}" &> /dev/null; then - LOG_INFO "${PACKAGE_NAME}已安装,标记为已安装状态" - ALREADY_INSTALLED=1 - else - LOG_INFO "${PACKAGE_NAME}未安装,标记为未安装状态" - ALREADY_INSTALLED=0 - fi - - # 步骤3:如果未安装,则安装texlive-msc - 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:验证texlive-msc是否安装成功 - LOG_INFO "步骤4:验证${PACKAGE_NAME}是否安装成功" - rpm -q "${PACKAGE_NAME}" - CHECK_RESULT $? 0 0 "${PACKAGE_NAME}安装验证失败" - - # 步骤5:检查texlive-msc相关命令是否存在并可用 - LOG_INFO "步骤5:检查texlive-msc相关命令是否存在并可用" - # 这里假设texlive-msc安装后会提供"msc"命令,实际命令可能不同,请根据实际情况调整 - COMMAND="msc" - if ! command -v "${COMMAND}" &> /dev/null; then - LOG_ERROR "命令${COMMAND}不存在或不支持" - exit 255 - fi - LOG_INFO "命令${COMMAND}存在并可用" - - # 步骤6:执行简单的命令测试(示例:显示版本信息) - LOG_INFO "步骤6:执行${COMMAND}命令测试" - if ${COMMAND} --version &> /dev/null; then - LOG_INFO "${COMMAND}命令测试成功" - else - LOG_ERROR "${COMMAND}命令测试失败" - exit 1 - fi - - # 步骤7:环境恢复 - LOG_INFO "步骤7:环境恢复" - 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 "测试完成:texlive-msc安装与功能检查通过" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_compile.sh b/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_compile.sh deleted file mode 100644 index 7b4f20a0257..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_compile.sh +++ /dev/null @@ -1,123 +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-23 -# @License : Mulan PSL v2 -# @Desc : Test compiling a LaTeX doc with msc -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已经安装了msc宏包 - LOG_INFO "检查msc宏包是否已安装" - if rpm -q texlive-msc > /dev/null 2>&1; then - LOG_INFO "msc宏包已安装" - INSTALLED=true - else - LOG_INFO "msc宏包未安装" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-msc软件包 - LOG_INFO "检查yum源中是否有texlive-msc软件包" - dnf list texlive-msc > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "yum源中没有texlive-msc软件包" - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中没有texlive-msc软件包" - exit 255 - fi - - # 如果未安装,则安装msc宏包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装msc宏包" - dnf install -y texlive-msc - CHECK_RESULT $? 0 0 "安装msc宏包失败" - if [ $? -ne 0 ]; then - LOG_ERROR "安装msc宏包失败" - exit 1 - fi - LOG_INFO "msc宏包安装成功" - else - LOG_INFO "msc宏包已安装,跳过安装步骤" - fi - - # 创建测试用的LaTeX文档 - LOG_INFO "创建测试用的LaTeX文档" - cat > test_msc.tex << "EOF" - \documentclass{article} - \usepackage{msc} - \begin{document} - \begin{msc}{Test MSC} - \declinst{a}{}{A} - \declinst{b}{}{B} - \nextlevel - \mess{Hello}{a}{b} - \nextlevel - \mess{World}{b}{a} - \end{msc} - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试LaTeX文档失败" - - # 编译LaTeX文档 - LOG_INFO "开始编译LaTeX文档" - pdflatex -interaction=nonstopmode test_msc.tex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "编译LaTeX文档失败" - if [ $? -ne 0 ]; then - LOG_ERROR "编译LaTeX文档失败" - # 清理测试文件 - rm -f test_msc.tex test_msc.aux test_msc.log test_msc.pdf - # 如果之前未安装,则卸载msc宏包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载msc宏包" - dnf remove -y texlive-msc - CHECK_RESULT $? 0 0 "卸载msc宏包失败" - fi - exit 1 - fi - LOG_INFO "LaTeX文档编译成功" - - # 检查生成的PDF文件是否存在 - LOG_INFO "检查生成的PDF文件" - if [ -f test_msc.pdf ]; then - LOG_INFO "PDF文件生成成功" - else - LOG_ERROR "PDF文件未生成" - CHECK_RESULT 1 0 0 "PDF文件未生成" - fi - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f test_msc.tex test_msc.aux test_msc.log test_msc.pdf - CHECK_RESULT $? 0 0 "清理测试文件失败" - - # 如果之前未安装,则卸载msc宏包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载msc宏包" - dnf remove -y texlive-msc - CHECK_RESULT $? 0 0 "卸载msc宏包失败" - if [ $? -ne 0 ]; then - LOG_ERROR "卸载msc宏包失败" - exit 1 - fi - LOG_INFO "msc宏包卸载成功" - else - LOG_INFO "保持msc宏包安装状态" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_install.sh b/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_install.sh deleted file mode 100644 index 1dac0b29c16..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_install.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-02-23 -# @License : Mulan PSL v2 -# @Desc : Test installation of texlive-msc package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - set -e - - LOG_INFO "开始测试:Test installation of texlive-msc package" - - LOG_INFO "步骤1:检查系统中是否已安装texlive-msc软件包" - if rpm -q texlive-msc &> /dev/null; then - LOG_INFO "系统中已安装texlive-msc软件包,测试将保持此状态。" - INSTALLED=true - else - LOG_INFO "系统中未安装texlive-msc软件包,将进行安装测试。" - INSTALLED=false - fi - - LOG_INFO "步骤2:检查yum源中是否存在texlive-msc软件包" - if ! dnf list available texlive-msc &> /dev/null; then - LOG_ERROR "yum源中未找到texlive-msc软件包。" - exit 255 - fi - LOG_INFO "yum源中存在texlive-msc软件包。" - - if [ "$INSTALLED" = false ]; then - LOG_INFO "步骤3:安装texlive-msc软件包" - dnf install -y texlive-msc - CHECK_RESULT $? 0 0 "安装texlive-msc软件包失败" - LOG_INFO "texlive-msc软件包安装成功。" - - LOG_INFO "步骤4:验证texlive-msc软件包基本功能" - LOG_INFO "检查msc命令是否可用" - command -v msc - CHECK_RESULT $? 0 0 "msc命令未找到或不可用" - - LOG_INFO "步骤5:测试msc命令的--help参数" - msc --help &> /dev/null - CHECK_RESULT $? 0 0 "msc命令不支持--help参数或执行失败" - - LOG_INFO "步骤6:清理环境 - 卸载测试安装的texlive-msc软件包" - dnf remove -y texlive-msc - CHECK_RESULT $? 0 0 "卸载texlive-msc软件包失败" - LOG_INFO "texlive-msc软件包卸载成功。" - else - LOG_INFO "环境已安装texlive-msc,跳过安装和卸载步骤。" - LOG_INFO "步骤3:验证已安装的texlive-msc软件包基本功能" - LOG_INFO "检查msc命令是否可用" - command -v msc - CHECK_RESULT $? 0 0 "msc命令未找到或不可用" - - LOG_INFO "步骤4:测试msc命令的--help参数" - msc --help &> /dev/null - CHECK_RESULT $? 0 0 "msc命令不支持--help参数或执行失败" - fi - - LOG_INFO "测试完成:Test installation of texlive-msc package" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_uninstall.sh b/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_uninstall.sh deleted file mode 100644 index cc59c24b85e..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-p/texlive-msc/test_texlive-msc_function_uninstall.sh +++ /dev/null @@ -1,82 +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-23 -# @License : Mulan PSL v2 -# @Desc : Test removal of texlive-msc package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试texlive-msc软件包卸载功能 - - PACKAGE_NAME="texlive-msc" - LOG_INFO "开始测试: 移除${PACKAGE_NAME}软件包" - - # 步骤1: 检查yum源中是否存在texlive-msc软件包 - LOG_INFO "步骤1: 检查yum源中是否存在${PACKAGE_NAME}软件包" - dnf list available ${PACKAGE_NAME} > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在${PACKAGE_NAME}软件包" - exit 255 - fi - CHECK_RESULT $? 0 0 "yum源中不存在${PACKAGE_NAME}软件包" - - # 步骤2: 检查当前是否已安装texlive-msc软件包 - LOG_INFO "步骤2: 检查当前是否已安装${PACKAGE_NAME}软件包" - rpm -q ${PACKAGE_NAME} > /dev/null 2>&1 - INSTALLED=$? - - # 步骤3: 如果未安装,则安装软件包 - if [ ${INSTALLED} -ne 0 ]; then - LOG_INFO "步骤3: 安装${PACKAGE_NAME}软件包" - dnf install -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}软件包失败" - fi - - # 步骤4: 验证软件包安装成功 - LOG_INFO "步骤4: 验证${PACKAGE_NAME}软件包已安装" - rpm -q ${PACKAGE_NAME} > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "${PACKAGE_NAME}软件包未正确安装" - - # 步骤5: 卸载texlive-msc软件包 - LOG_INFO "步骤5: 卸载${PACKAGE_NAME}软件包" - dnf remove -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}软件包失败" - - # 步骤6: 验证软件包已卸载 - LOG_INFO "步骤6: 验证${PACKAGE_NAME}软件包已卸载" - rpm -q ${PACKAGE_NAME} > /dev/null 2>&1 - CHECK_RESULT $? 1 0 "${PACKAGE_NAME}软件包未正确卸载" - - # 步骤7: 如果最初未安装,则重新安装以恢复环境 - if [ ${INSTALLED} -ne 0 ]; then - LOG_INFO "步骤7: 恢复环境,重新安装${PACKAGE_NAME}软件包" - dnf install -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "重新安装${PACKAGE_NAME}软件包失败" - - LOG_INFO "步骤8: 验证环境已恢复" - rpm -q ${PACKAGE_NAME} > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "环境恢复失败,${PACKAGE_NAME}软件包未正确安装" - else - LOG_INFO "步骤7: 恢复环境,重新安装${PACKAGE_NAME}软件包" - dnf install -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "重新安装${PACKAGE_NAME}软件包失败" - fi - - LOG_INFO "测试完成: ${PACKAGE_NAME}软件包卸载功能测试通过" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray/test_texlive-subeqnarray_function_basic_usage.sh b/testcases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray/test_texlive-subeqnarray_function_basic_usage.sh deleted file mode 100644 index 1cf75a167e5..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray/test_texlive-subeqnarray_function_basic_usage.sh +++ /dev/null @@ -1,96 +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-17 -# @License : Mulan PSL v2 -# @Desc : 测试 texlive-subeqnarray 宏包的基本功能,验证其能否在 LaTeX 文档中正确排版子公式编号。 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 texlive-subeqnarray 宏包的基本功能" - - # 检查 yum 源中是否存在 texlive-subeqnarray 软件包 - LOG_INFO "检查 yum 源中是否存在 texlive-subeqnarray 软件包" - dnf list available texlive-subeqnarray &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "yum 源中未找到 texlive-subeqnarray 软件包" - exit 255 - fi - - # 判断环境是否已经安装 texlive-subeqnarray - LOG_INFO "判断环境是否已经安装 texlive-subeqnarray" - rpm -q texlive-subeqnarray &>/dev/null - if [ $? -eq 0 ]; then - LOG_INFO "环境已安装 texlive-subeqnarray,测试后将保持安装状态" - INSTALLED=1 - else - LOG_INFO "环境未安装 texlive-subeqnarray,将进行安装" - INSTALLED=0 - fi - - # 如果未安装,则安装软件包 - if [ ${INSTALLED} -eq 0 ]; then - LOG_INFO "安装 texlive-subeqnarray 软件包" - dnf install -y texlive-subeqnarray - CHECK_RESULT $? 0 0 "安装 texlive-subeqnarray 失败" - fi - - # 创建一个测试用的 LaTeX 文档 - LOG_INFO "创建测试用的 LaTeX 文档" - cat > test_subeqnarray.tex << "EOF" - \documentclass{article} - \usepackage{subeqnarray} - \begin{document} - \begin{subequations} - \begin{eqnarray} - a & = & b + c \label{eq:1a} \\ - d & = & e + f \label{eq:1b} - \end{eqnarray} - \end{subequations} - 公式 (\ref{eq:1a}) 和公式 (\ref{eq:1b}) 是子公式。 - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建 LaTeX 测试文档失败" - - # 使用 pdflatex 编译 LaTeX 文档 - LOG_INFO "使用 pdflatex 编译 LaTeX 文档" - pdflatex -interaction=nonstopmode test_subeqnarray.tex >/dev/null 2>&1 - CHECK_RESULT $? 0 0 "pdflatex 编译失败,可能缺少命令或参数不支持" - - # 检查是否生成了 PDF 文件 - LOG_INFO "检查是否成功生成 PDF 文件" - if [ -f test_subeqnarray.pdf ]; then - LOG_INFO "成功生成 PDF 文件,texlive-subeqnarray 宏包功能正常" - else - LOG_ERROR "未生成 PDF 文件,texlive-subeqnarray 宏包功能异常" - exit 1 - fi - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f test_subeqnarray.tex test_subeqnarray.aux test_subeqnarray.log test_subeqnarray.pdf - - # 如果测试前未安装,则在测试后卸载软件包 - if [ ${INSTALLED} -eq 0 ]; then - LOG_INFO "卸载 texlive-subeqnarray 软件包" - dnf remove -y texlive-subeqnarray - CHECK_RESULT $? 0 0 "卸载 texlive-subeqnarray 失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray/test_texlive-subeqnarray_function_install_check.sh b/testcases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray/test_texlive-subeqnarray_function_install_check.sh deleted file mode 100644 index 1c8436d4415..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray/test_texlive-subeqnarray_function_install_check.sh +++ /dev/null @@ -1,91 +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-17 -# @License : Mulan PSL v2 -# @Desc : 检查 texlive-subeqnarray 软件包是否已正确安装在系统中。 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试 texlive-subeqnarray 软件包安装检查 - LOG_INFO "开始测试 texlive-subeqnarray 软件包安装检查" - - # 检查软件包是否已在系统中安装 - LOG_INFO "步骤1:检查 texlive-subeqnarray 软件包是否已安装" - if rpm -q texlive-subeqnarray &> /dev/null; then - LOG_INFO "texlive-subeqnarray 软件包已安装" - already_installed=true - else - LOG_INFO "texlive-subeqnarray 软件包未安装" - already_installed=false - fi - - # 检查yum源中是否有该软件包 - LOG_INFO "步骤2:检查yum源中是否有 texlive-subeqnarray 软件包" - if ! dnf list available texlive-subeqnarray &> /dev/null; then - LOG_ERROR "yum源中未找到 texlive-subeqnarray 软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$already_installed" = false ]; then - LOG_INFO "步骤3:安装 texlive-subeqnarray 软件包" - dnf install -y texlive-subeqnarray - CHECK_RESULT $? 0 0 "安装 texlive-subeqnarray 软件包失败" - - # 验证安装是否成功 - LOG_INFO "步骤4:验证 texlive-subeqnarray 软件包安装结果" - rpm -q texlive-subeqnarray - CHECK_RESULT $? 0 0 "texlive-subeqnarray 软件包未正确安装" - - LOG_INFO "texlive-subeqnarray 软件包安装成功" - else - LOG_INFO "步骤3:texlive-subeqnarray 软件包已安装,跳过安装步骤" - fi - - # 检查软件包是否正常工作(基本功能检查) - LOG_INFO "步骤5:检查 texlive-subeqnarray 相关文件是否已安装" - if [ -d /usr/share/texlive/texmf-dist/tex/latex/subeqnarray ]; then - LOG_INFO "texlive-subeqnarray 相关文件存在" - CHECK_RESULT $? 0 0 "texlive-subeqnarray 相关文件不存在" - else - LOG_ERROR "texlive-subeqnarray 相关文件目录不存在" - CHECK_RESULT 1 0 0 "texlive-subeqnarray 相关文件目录不存在" - fi - - # 清理环境:如果测试前未安装,则卸载软件包 - if [ "$already_installed" = false ]; then - LOG_INFO "步骤6:清理环境,卸载 texlive-subeqnarray 软件包" - dnf remove -y texlive-subeqnarray - CHECK_RESULT $? 0 0 "卸载 texlive-subeqnarray 软件包失败" - - # 验证卸载是否成功 - LOG_INFO "步骤7:验证 texlive-subeqnarray 软件包卸载结果" - if rpm -q texlive-subeqnarray &> /dev/null; then - LOG_ERROR "texlive-subeqnarray 软件包卸载失败" - CHECK_RESULT 1 0 0 "texlive-subeqnarray 软件包卸载失败" - else - LOG_INFO "texlive-subeqnarray 软件包已成功卸载" - CHECK_RESULT $? 0 0 "texlive-subeqnarray 软件包卸载验证失败" - fi - else - LOG_INFO "步骤6:测试前已安装 texlive-subeqnarray,保持安装状态" - fi - - LOG_INFO "texlive-subeqnarray 软件包安装检查测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray/test_texlive-subeqnarray_function_remove_pkg.sh b/testcases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray/test_texlive-subeqnarray_function_remove_pkg.sh deleted file mode 100644 index 3e4bf4c9404..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-v/texlive-subeqnarray/test_texlive-subeqnarray_function_remove_pkg.sh +++ /dev/null @@ -1,118 +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-17 -# @License : Mulan PSL v2 -# @Desc : 测试从系统中移除 texlive-subeqnarray 软件包及其相关文件。 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - set -e - - # 检查软件包是否存在于yum源 - check_package_in_repo() { - local pkg=$1 - if ! dnf list available "$pkg" &>/dev/null; then - LOG_ERROR "软件包 $pkg 不在yum源中" - exit 255 - fi - } - - # 检查命令参数是否存在 - check_cmd_param() { - local cmd=$1 - local param=$2 - if ! $cmd --help 2>&1 | grep -q "\<$param\>"; then - LOG_ERROR "命令 $cmd 不支持参数 $param" - exit 255 - fi - } - - # 检查软件包是否已安装 - check_package_installed() { - local pkg=$1 - if rpm -q "$pkg" &>/dev/null; then - LOG_INFO "软件包 $pkg 已安装" - return 0 - else - LOG_INFO "软件包 $pkg 未安装" - return 1 - fi - } - - # 主测试函数 - test_remove_texlive_subeqnarray() { - local pkg="texlive-subeqnarray" - local was_installed=false - - LOG_INFO "开始测试:移除 texlive-subeqnarray 软件包" - - # 步骤1:检查软件包是否存在于yum源 - LOG_INFO "步骤1:检查软件包是否存在于yum源" - check_package_in_repo "$pkg" - - # 步骤2:检查dnf命令是否支持remove参数 - LOG_INFO "步骤2:检查dnf命令是否支持remove参数" - check_cmd_param "dnf" "remove" - - # 步骤3:检查软件包当前安装状态 - LOG_INFO "步骤3:检查软件包当前安装状态" - if check_package_installed "$pkg"; then - was_installed=true - LOG_INFO "软件包已安装,测试后将保持安装状态" - else - LOG_INFO "软件包未安装,将先安装再测试移除" - fi - - # 步骤4:如果未安装,先安装软件包 - if ! $was_installed; then - LOG_INFO "步骤4:安装软件包 $pkg" - dnf install -y "$pkg" - CHECK_RESULT $? 0 0 "安装软件包失败" - fi - - # 步骤5:移除软件包 - LOG_INFO "步骤5:移除软件包 $pkg" - dnf remove -y "$pkg" - CHECK_RESULT $? 0 0 "移除软件包失败" - - # 步骤6:验证软件包已移除 - LOG_INFO "步骤6:验证软件包已移除" - if check_package_installed "$pkg"; then - LOG_ERROR "软件包移除失败" - exit 1 - else - LOG_INFO "软件包已成功移除" - fi - - # 步骤7:环境恢复 - LOG_INFO "步骤7:恢复环境" - if $was_installed; then - LOG_INFO "重新安装软件包以恢复原始状态" - dnf install -y "$pkg" - CHECK_RESULT $? 0 0 "重新安装软件包失败" - else - LOG_INFO "原始环境未安装该软件包,无需恢复" - fi - - LOG_INFO "测试完成:成功测试移除 texlive-subeqnarray 软件包" - } - - # 执行测试 - test_remove_texlive_subeqnarray -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_deps.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_deps.sh deleted file mode 100644 index 3bc2b6245ab..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_deps.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-29 -# @License : Mulan PSL v2 -# @Desc : Test basic dependency checks -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test basic dependency checks" - - # 检查软件包是否已安装 - LOG_INFO "检查软件包 ws-xmlschema-walker 是否已安装" - if dnf list installed ws-xmlschema-walker &>/dev/null; then - LOG_INFO "软件包 ws-xmlschema-walker 已安装" - installed=true - else - LOG_INFO "软件包 ws-xmlschema-walker 未安装" - installed=false - fi - - # 检查yum源中是否有该软件包 - LOG_INFO "检查yum源中是否有 ws-xmlschema-walker 软件包" - if ! dnf list available ws-xmlschema-walker &>/dev/null; then - LOG_ERROR "yum源中未找到 ws-xmlschema-walker 软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$installed" = false ]; then - LOG_INFO "开始安装 ws-xmlschema-walker" - dnf install -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "安装 ws-xmlschema-walker 失败" - fi - - # 测试基本依赖检查功能 - LOG_INFO "测试 ws-xmlschema-walker 的基本依赖检查功能" - ws-xmlschema-walker --check-deps - CHECK_RESULT $? 0 0 "ws-xmlschema-walker 依赖检查失败" - - # 清理环境 - if [ "$installed" = false ]; then - LOG_INFO "卸载 ws-xmlschema-walker 软件包" - dnf remove -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "卸载 ws-xmlschema-walker 失败" - fi - - LOG_INFO "测试完成:Test basic dependency checks" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_export.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_export.sh deleted file mode 100644 index 177ed4fb44e..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_export.sh +++ /dev/null @@ -1,70 +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 schema export to other formats -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装ws-xmlschema-walker - LOG_INFO "检查是否已安装ws-xmlschema-walker" - rpm -q ws-xmlschema-walker > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "ws-xmlschema-walker已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "ws-xmlschema-walker未安装,将在测试后卸载" - INSTALLED=false - fi - - # 检查yum源中是否存在ws-xmlschema-walker - LOG_INFO "检查yum源中是否存在ws-xmlschema-walker" - dnf list available ws-xmlschema-walker > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到ws-xmlschema-walker软件包" - exit 255 - fi - - # 安装ws-xmlschema-walker(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装ws-xmlschema-walker" - dnf install -y ws-xmlschema-walker > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装ws-xmlschema-walker失败" - fi - - # 测试schema导出功能 - LOG_INFO "测试schema导出功能" - ws_xmlschema_walker --export-format=json > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "schema导出为json格式失败" - - # 检查不支持的参数场景(预期失败) - LOG_INFO "测试不支持的参数场景" - ws_xmlschema_walker --invalid-arg > /dev/null 2>&1 - if [ $? -ne 255 ]; then - LOG_ERROR "不支持的参数未按预期退出码255退出" - exit 255 - fi - - # 清理环境(如果脚本开始时未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在卸载ws-xmlschema-walker" - dnf remove -y ws-xmlschema-walker > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载ws-xmlschema-walker失败" - fi -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_generate.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_generate.sh deleted file mode 100644 index 10c32178db4..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_generate.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-09 -# @License : Mulan PSL v2 -# @Desc : Test code generation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装ws-xmlschema-walker软件包 - LOG_INFO "检查ws-xmlschema-walker是否已安装" - if dnf list installed ws-xmlschema-walker &>/dev/null; then - LOG_INFO "ws-xmlschema-walker已安装,脚本结束后将保持安装状态" - installed=true - else - LOG_INFO "ws-xmlschema-walker未安装,将在测试后卸载" - installed=false - fi - - # 检查yum源中是否存在ws-xmlschema-walker软件包 - LOG_INFO "检查yum源中是否存在ws-xmlschema-walker软件包" - if ! dnf list available ws-xmlschema-walker &>/dev/null; then - LOG_ERROR "yum源中未找到ws-xmlschema-walker软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$installed" = false ]; then - LOG_INFO "安装ws-xmlschema-walker软件包" - dnf install -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "安装ws-xmlschema-walker失败" - fi - - # 测试代码生成功能 - LOG_INFO "测试代码生成功能" - ws-xmlschema-walker generate --help &>/dev/null - CHECK_RESULT $? 0 0 "generate参数不支持" - - # 执行代码生成命令示例(假设命令为generate) - LOG_INFO "执行代码生成命令" - ws-xmlschema-walker generate test_schema.xsd --output test_output - CHECK_RESULT $? 0 0 "代码生成失败" - - # 清理测试生成的文件 - LOG_INFO "清理测试生成的文件" - rm -f test_output - CHECK_RESULT $? 0 0 "清理文件失败" - - # 如果脚本开始时未安装,则在结束时卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载ws-xmlschema-walker软件包" - dnf remove -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "卸载ws-xmlschema-walker失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_load.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_load.sh deleted file mode 100644 index 42429f4850b..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_load.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-09 -# @License : Mulan PSL v2 -# @Desc : Test loading XML schema -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装ws-xmlschema-walker软件包 - LOG_INFO "检查是否已安装ws-xmlschema-walker软件包" - if rpm -q ws-xmlschema-walker &>/dev/null; then - LOG_INFO "ws-xmlschema-walker已安装" - installed=true - else - LOG_INFO "ws-xmlschema-walker未安装" - installed=false - fi - - # 检查yum源中是否存在ws-xmlschema-walker软件包 - LOG_INFO "检查yum源中是否存在ws-xmlschema-walker软件包" - if ! dnf list available ws-xmlschema-walker &>/dev/null; then - LOG_ERROR "yum源中未找到ws-xmlschema-walker软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$installed" = false ]; then - LOG_INFO "开始安装ws-xmlschema-walker软件包" - dnf install -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "安装ws-xmlschema-walker失败" - LOG_INFO "ws-xmlschema-walker安装成功" - fi - - # 测试加载XML schema功能 - LOG_INFO "测试加载XML schema功能" - ws-xmlschema-walker --load &>/dev/null - CHECK_RESULT $? 0 0 "加载XML schema失败" - - # 清理环境:如果脚本开始时未安装,则卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载ws-xmlschema-walker软件包" - dnf remove -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "卸载ws-xmlschema-walker失败" - LOG_INFO "ws-xmlschema-walker卸载成功" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_merge.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_merge.sh deleted file mode 100644 index c19f9bef5ba..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_merge.sh +++ /dev/null @@ -1,72 +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-09 -# @License : Mulan PSL v2 -# @Desc : Test merging schemas -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试脚本:test_ws-xmlschema-walker_function_merge - - LOG_INFO "开始测试:Test merging schemas" - - # 检查软件包是否已安装 - if ! dnf list installed ws-xmlschema-walker &>/dev/null; then - LOG_INFO "环境未安装ws-xmlschema-walker,将进行安装" - # 检查yum源中是否有该软件包 - if ! dnf list available ws-xmlschema-walker &>/dev/null; then - LOG_ERROR "yum源中未找到ws-xmlschema-walker软件包" - exit 255 - fi - # 安装软件包 - dnf install -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "安装ws-xmlschema-walker失败" - # 标记为需要卸载 - NEED_UNINSTALL=1 - else - LOG_INFO "环境已安装ws-xmlschema-walker,无需安装" - NEED_UNINSTALL=0 - fi - - # 测试合并schemas功能 - LOG_INFO "测试合并schemas功能" - ws-xmlschema-walker merge --input schema1.xsd schema2.xsd --output merged.xsd - CHECK_RESULT $? 0 0 "合并schemas失败" - - # 检查输出文件是否存在 - if [ ! -f "merged.xsd" ]; then - LOG_ERROR "合并后的文件merged.xsd未生成" - exit 1 - fi - - # 清理临时文件(如果存在) - if [ -f "merged.xsd" ]; then - rm -f merged.xsd - CHECK_RESULT $? 0 0 "删除临时文件merged.xsd失败" - fi - - # 恢复环境(如果需要卸载) - if [ "$NEED_UNINSTALL" -eq 1 ]; then - LOG_INFO "卸载ws-xmlschema-walker以恢复环境" - dnf remove -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "卸载ws-xmlschema-walker失败" - fi - - LOG_INFO "测试完成:Test merging schemas" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_parse.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_parse.sh deleted file mode 100644 index 6d40709ffde..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_parse.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-29 -# @License : Mulan PSL v2 -# @Desc : Test XML schema parsing functionality -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装ws-xmlschema-walker软件包 - LOG_INFO "检查是否已安装ws-xmlschema-walker软件包" - if dnf list installed ws-xmlschema-walker &>/dev/null; then - LOG_INFO "ws-xmlschema-walker已安装" - INSTALLED=true - else - LOG_INFO "ws-xmlschema-walker未安装" - INSTALLED=false - fi - - # 检查yum源中是否存在ws-xmlschema-walker软件包 - LOG_INFO "检查yum源中是否存在ws-xmlschema-walker软件包" - if ! dnf list available ws-xmlschema-walker &>/dev/null; then - LOG_ERROR "yum源中未找到ws-xmlschema-walker软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装ws-xmlschema-walker软件包" - dnf install -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "安装ws-xmlschema-walker失败" - fi - - # 测试XML schema解析功能 - LOG_INFO "测试XML schema解析功能" - ws-xmlschema-walker --parse test.xml - CHECK_RESULT $? 0 0 "XML schema解析功能测试失败" - - # 如果脚本开始时未安装,则在结束时卸载软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载ws-xmlschema-walker软件包" - dnf remove -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "卸载ws-xmlschema-walker失败" - fi - - LOG_INFO "测试脚本执行完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_query.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_query.sh deleted file mode 100644 index 019a686e9b4..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_query.sh +++ /dev/null @@ -1,60 +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-09 -# @License : Mulan PSL v2 -# @Desc : Test querying schema nodes -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查环境是否已安装ws-xmlschema-walker - LOG_INFO "检查环境是否已安装ws-xmlschema-walker" - if dnf list installed ws-xmlschema-walker &>/dev/null; then - LOG_INFO "ws-xmlschema-walker已安装,脚本结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "ws-xmlschema-walker未安装,将在脚本结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有ws-xmlschema-walker软件包 - LOG_INFO "检查yum源中是否有ws-xmlschema-walker软件包" - if ! dnf list available ws-xmlschema-walker &>/dev/null; then - LOG_ERROR "yum源中未找到ws-xmlschema-walker软件包" - exit 255 - fi - - # 安装ws-xmlschema-walker软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装ws-xmlschema-walker软件包" - dnf install -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "安装ws-xmlschema-walker失败" - fi - - # 测试查询schema节点 - LOG_INFO "测试查询schema节点" - result=$(ws-xmlschema-walker --query) - CHECK_RESULT $? 0 0 "查询schema节点失败" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载ws-xmlschema-walker软件包" - dnf remove -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "卸载ws-xmlschema-walker失败" - fi -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_transform.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_transform.sh deleted file mode 100644 index 66cce7013c5..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_transform.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-09 -# @License : Mulan PSL v2 -# @Desc : Test schema transformation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查软件包是否已安装 - if ! rpm -q ws-xmlschema-walker &> /dev/null; then - LOG_INFO "环境未安装ws-xmlschema-walker,将进行安装" - # 检查yum源中是否存在软件包 - if ! dnf list available ws-xmlschema-walker &> /dev/null; then - LOG_ERROR "yum源中未找到ws-xmlschema-walker软件包" - exit 255 - fi - # 安装软件包 - dnf install -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "安装ws-xmlschema-walker失败" - # 标记需要卸载 - UNINSTALL_NEEDED=1 - else - LOG_INFO "环境已安装ws-xmlschema-walker,跳过安装步骤" - UNINSTALL_NEEDED=0 - fi - - # 测试schema转换功能 - LOG_INFO "开始测试schema转换功能" - ws-xmlschema-walker transform --input test_schema.xml --output transformed_schema.xml - CHECK_RESULT $? 0 0 "schema转换失败" - - # 检查输出文件是否存在 - if [ ! -f transformed_schema.xml ]; then - LOG_ERROR "转换后的文件transformed_schema.xml不存在" - exit 1 - fi - - # 清理环境 - if [ $UNINSTALL_NEEDED -eq 1 ]; then - LOG_INFO "清理环境,卸载ws-xmlschema-walker" - dnf remove -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "卸载ws-xmlschema-walker失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_validate.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_validate.sh deleted file mode 100644 index ca9ec48b66d..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_validate.sh +++ /dev/null @@ -1,68 +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 schema validation feature -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装ws-xmlschema-walker软件包 - LOG_INFO "检查ws-xmlschema-walker是否已安装" - if dnf list installed ws-xmlschema-walker &>/dev/null; then - LOG_INFO "ws-xmlschema-walker已安装,脚本结束后保持安装状态" - installed=true - else - LOG_INFO "ws-xmlschema-walker未安装,将在脚本结束后卸载" - installed=false - fi - - # 检查yum源中是否存在ws-xmlschema-walker软件包 - LOG_INFO "检查yum源中是否存在ws-xmlschema-walker软件包" - if ! dnf list available ws-xmlschema-walker &>/dev/null; then - LOG_ERROR "yum源中未找到ws-xmlschema-walker软件包" - exit 255 - fi - - # 安装ws-xmlschema-walker软件包 - if [ "$installed" = false ]; then - LOG_INFO "正在安装ws-xmlschema-walker软件包" - dnf install -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "安装ws-xmlschema-walker失败" - fi - - # 测试schema验证功能 - LOG_INFO "测试schema验证功能" - ws-xmlschema-walker validate --help &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "参数--help不存在或不支持" - exit 255 - fi - - # 执行验证命令并检查结果 - LOG_INFO "执行schema验证命令" - ws-xmlschema-walker validate /path/to/schema.xsd /path/to/xml.xml - CHECK_RESULT $? 0 0 "schema验证失败" - - # 清理环境:如果脚本开始时未安装,则卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载ws-xmlschema-walker软件包" - dnf remove -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "卸载ws-xmlschema-walker失败" - fi -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_walk.sh b/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_walk.sh deleted file mode 100644 index 7e40cf2207b..00000000000 --- a/testcases/function_test/pkg_test/ws-xmlschema/ws-xmlschema-walker/test_ws-xmlschema-walker_function_walk.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-11-29 -# @License : Mulan PSL v2 -# @Desc : Test walking through schema nodes -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试脚本:test_ws-xmlschema-walker_function_walk - - LOG_INFO "开始测试:Test walking through schema nodes" - - # 检查软件包是否已安装 - LOG_INFO "检查软件包 ws-xmlschema-walker 是否已安装" - if ! dnf list installed ws-xmlschema-walker &>/dev/null; then - LOG_INFO "软件包 ws-xmlschema-walker 未安装,准备安装" - # 检查yum源中是否有该软件包 - if ! dnf list available ws-xmlschema-walker &>/dev/null; then - LOG_ERROR "yum源中未找到软件包 ws-xmlschema-walker" - exit 255 - fi - # 安装软件包 - dnf install -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "安装软件包 ws-xmlschema-walker 失败" - INSTALLED=1 - else - LOG_INFO "软件包 ws-xmlschema-walker 已安装" - INSTALLED=0 - fi - - # 测试 walk 功能 - LOG_INFO "测试 walk 功能" - ws-xmlschema-walker walk --help &>/dev/null - CHECK_RESULT $? 0 0 "walk 命令不支持或参数错误" - - # 执行 walk 命令 - LOG_INFO "执行 walk 命令" - ws-xmlschema-walker walk /path/to/schema.xsd - CHECK_RESULT $? 0 0 "walk 命令执行失败" - - # 清理环境(如果脚本开始时未安装软件包,则卸载) - if [ $INSTALLED -eq 1 ]; then - LOG_INFO "卸载软件包 ws-xmlschema-walker" - dnf remove -y ws-xmlschema-walker - CHECK_RESULT $? 0 0 "卸载软件包 ws-xmlschema-walker 失败" - fi - - LOG_INFO "测试完成:Test walking through schema nodes" -} - -main "$@" \ No newline at end of file