diff --git a/suite2cases/function_test/pkg_test/artemis/artemis-boot.json b/suite2cases/function_test/pkg_test/artemis/artemis-boot.json index b5edc9bbf00..5438df6f1ff 100644 --- a/suite2cases/function_test/pkg_test/artemis/artemis-boot.json +++ b/suite2cases/function_test/pkg_test/artemis/artemis-boot.json @@ -6,18 +6,6 @@ "name": "test_artemis-boot_install_package", "desc": "测试artemis-boot软件包的安装功能,验证是否能够成功安装。", "machine num": 1 - }, - { - "name": "test_artemis-boot_function_start", - "desc": "测试artemis-boot软件包的启动功能,验证是否能够成功启动。" - }, - { - "name": "test_artemis-boot_function_config", - "desc": "测试artemis-boot软件包的配置功能,验证配置文件的正确性。" - }, - { - "name": "test_artemis-boot_function_dep", - "desc": "测试artemis-boot软件包的基础依赖库功能,验证依赖库的完整性。" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/felix-utils/felix-utils-help.json b/suite2cases/function_test/pkg_test/felix-utils/felix-utils-help.json deleted file mode 100644 index b03d8d4149d..00000000000 --- a/suite2cases/function_test/pkg_test/felix-utils/felix-utils-help.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/felix-utils/felix-utils-help", - "machine num": 1, - "cases": [ - { - "name": "test_felix-utils-help_function_basic", - "desc": "Test basic functionality of felix-utils-help" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-codemodel.json b/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-codemodel.json index e59e6f51b79..25e611cd92e 100644 --- a/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-codemodel.json +++ b/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-codemodel.json @@ -5,10 +5,6 @@ { "name": "test_glassfish-jaxb-codemodel_function_install", "desc": "Test package installation" - }, - { - "name": "test_glassfish-jaxb-codemodel_function_generate", - "desc": "Test code generation functionality" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/jfreechart/jfreechart-javadoc.json b/suite2cases/function_test/pkg_test/jfreechart/jfreechart-javadoc.json deleted file mode 100644 index 427147849ea..00000000000 --- a/suite2cases/function_test/pkg_test/jfreechart/jfreechart-javadoc.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc", - "machine num": 1, - "cases": [ - { - "name": "test_jfreechart-javadoc_function_docgen", - "desc": "Verify documentation generation" - }, - { - "name": "test_jfreechart-javadoc_function_docformat", - "desc": "Verify documentation formatting" - }, - { - "name": "test_jfreechart-javadoc_function_doclinks", - "desc": "Check hyperlinks in docs" - }, - { - "name": "test_jfreechart-javadoc_function_docsearch", - "desc": "Test search functionality" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/python-repoze-lru/python3-repoze-lru.json b/suite2cases/function_test/pkg_test/python-repoze-lru/python3-repoze-lru.json deleted file mode 100644 index 4edd837c2e8..00000000000 --- a/suite2cases/function_test/pkg_test/python-repoze-lru/python3-repoze-lru.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/python-repoze-lru/python3-repoze-lru", - "machine num": 1, - "cases": [ - { - "name": "test_python3-repoze-lru_function_cache", - "desc": "Test basic cache functionality" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/python-rfc3986-validator/python-rfc3986-validator-help.json b/suite2cases/function_test/pkg_test/python-rfc3986-validator/python-rfc3986-validator-help.json index e53f66c483c..c1353eda8f8 100644 --- a/suite2cases/function_test/pkg_test/python-rfc3986-validator/python-rfc3986-validator-help.json +++ b/suite2cases/function_test/pkg_test/python-rfc3986-validator/python-rfc3986-validator-help.json @@ -2,29 +2,9 @@ "path": "$OET_PATH/testcases/function_test/pkg_test/python-rfc3986-validator/python-rfc3986-validator-help", "machine num": 1, "cases": [ - { - "name": "test_python-rfc3986-validator-help_function_install", - "desc": "测试软件包可以通过pip等包管理器成功安装" - }, { "name": "test_python-rfc3986-validator-help_function_import", "desc": "测试安装后可以成功导入软件包的主要模块" - }, - { - "name": "test_python-rfc3986-validator-help_function_basic_validation", - "desc": "测试软件包可以对有效的URI进行基本验证" - }, - { - "name": "test_python-rfc3986-validator-help_function_invalid_uri", - "desc": "测试软件包可以正确识别并拒绝无效的URI格式" - }, - { - "name": "test_python-rfc3986-validator-help_function_normalize", - "desc": "测试软件包可以对URI进行规范化处理" - }, - { - "name": "test_python-rfc3986-validator-help_function_uninstall", - "desc": "测试软件包可以通过包管理器成功卸载" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc.json b/suite2cases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc.json index b6792bab086..c0056517cc2 100644 --- a/suite2cases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc.json +++ b/suite2cases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc.json @@ -5,22 +5,6 @@ { "name": "test_rubygem-contracts-doc_function_install", "desc": "Test installation of the gem" - }, - { - "name": "test_rubygem-contracts-doc_function_uninstall", - "desc": "Test uninstallation of the gem" - }, - { - "name": "test_rubygem-contracts-doc_function_version", - "desc": "Test checking the installed gem version" - }, - { - "name": "test_rubygem-contracts-doc_function_doc_path", - "desc": "Test locating the gem documentation files" - }, - { - "name": "test_rubygem-contracts-doc_function_usage", - "desc": "Test basic library usage and contract validation" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-base/texlive-cslatex.json b/suite2cases/function_test/pkg_test/texlive-base/texlive-cslatex.json deleted file mode 100644 index e16f4cdf32c..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-base/texlive-cslatex.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-base/texlive-cslatex", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-cslatex_cslatex_draftmode", - "desc": "测试 draftmode 参数,生成无输出 PDF 的草稿模式" - }, - { - "name": "test_texlive-cslatex_cslatex_enc", - "desc": "测试 enc 参数,启用 encTeX 扩展" - }, - { - "name": "test_texlive-cslatex_cslatex_etex", - "desc": "测试 etex 参数,启用 e-TeX 扩展" - }, - { - "name": "test_texlive-cslatex_cslatex_no_file_line_error", - "desc": "测试 no-file-line-error 参数,禁用文件:行:错误样式消息" - }, - { - "name": "test_texlive-cslatex_cslatex_fmt_FMTNAME", - "desc": "测试 fmt 参数,使用指定的 FMTNAME 替代程序名或 %& 行" - }, - { - "name": "test_texlive-cslatex_cslatex_halt_on_error", - "desc": "测试 halt-on-error 参数,在第一个错误处停止处理" - }, - { - "name": "test_texlive-cslatex_cslatex_interaction_batchmode", - "desc": "测试 interaction 参数,设置为 batchmode 交互模式" - }, - { - "name": "test_texlive-cslatex_cslatex_jobname_STRING", - "desc": "测试 jobname 参数,设置作业名称为 STRING" - }, - { - "name": "test_texlive-cslatex_cslatex_output_directory_DIR", - "desc": "测试 output-directory 参数,使用现有 DIR 作为输出文件目录" - }, - { - "name": "test_texlive-cslatex_cslatex_output_format_pdf", - "desc": "测试 output-format 参数,设置输出格式为 PDF" - }, - { - "name": "test_texlive-cslatex_cslatex_no_parse_first_line", - "desc": "测试 no-parse-first-line 参数,禁用输入文件第一行的解析" - }, - { - "name": "test_texlive-cslatex_pdfcslatex_draftmode", - "desc": "测试 pdfcslatex 的 draftmode 参数,生成无输出 PDF 的草稿模式" - }, - { - "name": "test_texlive-cslatex_pdfcslatex_enc", - "desc": "测试 pdfcslatex 的 enc 参数,启用 encTeX 扩展" - }, - { - "name": "test_texlive-cslatex_pdfcslatex_etex", - "desc": "测试 pdfcslatex 的 etex 参数,启用 e-TeX 扩展" - }, - { - "name": "test_texlive-cslatex_pdfcslatex_file_line_error", - "desc": "测试 pdfcslatex 的 file-line-error 参数,启用文件:行:错误样式消息" - }, - { - "name": "test_texlive-cslatex_pdfcslatex_no_file_line_error", - "desc": "测试 pdfcslatex 的 no-file-line-error 参数,禁用文件:行:错误样式消息" - }, - { - "name": "test_texlive-cslatex_pdfcslatex_fmt_FMTNAME", - "desc": "测试 pdfcslatex 的 fmt=FMTNAME 参数,使用指定的 FMTNAME 格式文件" - }, - { - "name": "test_texlive-cslatex_pdfcslatex_halt_on_error", - "desc": "测试 pdfcslatex 的 halt-on-error 参数,在第一个错误处停止处理" - }, - { - "name": "test_texlive-cslatex_pdfcslatex_interaction_STRING", - "desc": "测试 pdfcslatex 的 interaction=STRING 参数,设置交互模式" - }, - { - "name": "test_texlive-cslatex_pdfcslates_jobname_STRING", - "desc": "测试 pdfcalses jobnmae=STRIGN参數 ,设置作业名称" - }, - { - "name": "test_texlive-cslatex_function_basic", - "desc": "测试 texlive-cslatex 基础功能是否正常工作" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-e/texlive-colorweb.json b/suite2cases/function_test/pkg_test/texlive-split-e/texlive-colorweb.json index f8b7cfe7d31..2a6bf3b65ff 100644 --- a/suite2cases/function_test/pkg_test/texlive-split-e/texlive-colorweb.json +++ b/suite2cases/function_test/pkg_test/texlive-split-e/texlive-colorweb.json @@ -2,10 +2,6 @@ "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb", "machine num": 1, "cases": [ - { - "name": "test_texlive-colorweb_function_basic", - "desc": "Test basic functionality of texlive-colorweb" - }, { "name": "test_texlive-colorweb_function_install", "desc": "Test installation of texlive-colorweb package" @@ -13,22 +9,6 @@ { "name": "test_texlive-colorweb_function_uninstall", "desc": "Test uninstallation of texlive-colorweb package" - }, - { - "name": "test_texlive-colorweb_function_version", - "desc": "Test checking version of texlive-colorweb" - }, - { - "name": "test_texlive-colorweb_function_doc", - "desc": "Test availability of package documentation" - }, - { - "name": "test_texlive-colorweb_function_convert", - "desc": "Test color model conversion" - }, - { - "name": "test_texlive-colorweb_function_cmyk", - "desc": "Test CMYK color definition usage" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-h/texlive-ebezier.json b/suite2cases/function_test/pkg_test/texlive-split-h/texlive-ebezier.json index a98ed7d3515..e8eaf58c08f 100644 --- a/suite2cases/function_test/pkg_test/texlive-split-h/texlive-ebezier.json +++ b/suite2cases/function_test/pkg_test/texlive-split-h/texlive-ebezier.json @@ -2,14 +2,6 @@ "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier", "machine num": 1, "cases": [ - { - "name": "test_texlive-ebezier_function_install", - "desc": "Test package installation" - }, - { - "name": "test_texlive-ebezier_function_uninstall", - "desc": "Test package removal" - }, { "name": "test_texlive-ebezier_function_version", "desc": "Check package version info" @@ -17,10 +9,6 @@ { "name": "test_texlive-ebezier_function_files", "desc": "Verify core file existence" - }, - { - "name": "test_texlive-ebezier_function_usage", - "desc": "Test basic LaTeX usage" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto.json b/suite2cases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto.json index e2f36203cb7..51b59d4abf4 100644 --- a/suite2cases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto.json +++ b/suite2cases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto.json @@ -13,14 +13,6 @@ { "name": "test_texlive-feynmp-auto_function_version", "desc": "Check package version info" - }, - { - "name": "test_texlive-feynmp-auto_function_files", - "desc": "Verify key files exist" - }, - { - "name": "test_texlive-feynmp-auto_function_compile", - "desc": "Test basic Feynmp diagram compile" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-q/texlive-oscola.json b/suite2cases/function_test/pkg_test/texlive-split-q/texlive-oscola.json deleted file mode 100644 index 9e3d7128e15..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-q/texlive-oscola.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-oscola_function_basic", - "desc": "Test basic functionality of texlive-oscola" - }, - { - "name": "test_texlive-oscola_function_install", - "desc": "Test installation of texlive-oscola package" - }, - { - "name": "test_texlive-oscola_function_check_installed", - "desc": "Verify that texlive-oscola is properly installed" - }, - { - "name": "texlive-oscola_function_compile_basic", - "desc": "Test compiling a basic LaTeX document with oscola package" - }, - { - "name": "test_texlive-oscola_function_citation_style", - "desc": "Test generation of citations using the oscola style" - }, - { - "name": "test_texlive-oscola_function_bibliography", - "desc": "Test generation of bibliography using oscola" - }, - { - "name": "test_texlive-oscola_function_remove", - "desc": "Test removal/uninstallation of texlive-oscola package" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder.json b/suite2cases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder.json index f538450df1c..2d34e74dfd9 100644 --- a/suite2cases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder.json +++ b/suite2cases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder.json @@ -2,10 +2,6 @@ "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder", "machine num": 1, "cases": [ - { - "name": "test_texlive-tikz-ladder_function_basic", - "desc": "Test basic ladder diagram generation" - }, { "name": "test_texlive-tikz-ladder_function_install", "desc": "Test if the texlive-tikz-ladder package can be successfully installed" @@ -14,26 +10,6 @@ "name": "test_texlive-tikz-ladder_function_check", "desc": "Test if the texlive-tikz-ladder package is properly installed and available" }, - { - "name": "test_texlive-tikz-ladder_function_basic_diagram", - "desc": "Test generating a basic ladder diagram with default settings" - }, - { - "name": "test_texlive-tikz-ladder_function_custom_elements", - "desc": "Test creating a ladder diagram with custom contacts and coils" - }, - { - "name": "test_texlive-tikz-ladder_function_multiple_rungs", - "desc": "Test generating a ladder diagram with multiple rungs" - }, - { - "name": "test_texlive-tikz-ladder_function_labels_annotations", - "desc": "Test adding labels and annotations to ladder diagram elements" - }, - { - "name": "test_texlive-tikz-ladder_function_compile_tex", - "desc": "Test compiling a LaTeX document containing a tikz-ladder diagram" - }, { "name": "test_texlive-tikz-ladder_function_remove", "desc": "Test if the texlive-tikz-ladder package can be cleanly removed" diff --git a/suite2cases/function_test/pkg_test/tre/tre-devel.json b/suite2cases/function_test/pkg_test/tre/tre-devel.json deleted file mode 100644 index 97d41905459..00000000000 --- a/suite2cases/function_test/pkg_test/tre/tre-devel.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/tre/tre-devel", - "machine num": 1, - "cases": [ - { - "name": "test_tre-devel_function_basic", - "desc": "Test basic functionality of tre-devel library" - } - ] -} \ No newline at end of file diff --git a/testcases/function_test/pkg_test/artemis/artemis-boot/test_artemis-boot_function_config.sh b/testcases/function_test/pkg_test/artemis/artemis-boot/test_artemis-boot_function_config.sh deleted file mode 100644 index eabcaf57010..00000000000 --- a/testcases/function_test/pkg_test/artemis/artemis-boot/test_artemis-boot_function_config.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-01 -# @License : Mulan PSL v2 -# @Desc : 测试artemis-boot软件包的配置功能,验证配置文件的正确性。 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查artemis-boot软件包是否已安装 - LOG_INFO "检查artemis-boot软件包是否已安装" - if dnf list installed artemis-boot &>/dev/null; then - LOG_INFO "artemis-boot软件包已安装" - installed=true - else - LOG_INFO "artemis-boot软件包未安装" - installed=false - fi - - # 检查yum源中是否有artemis-boot软件包 - LOG_INFO "检查yum源中是否有artemis-boot软件包" - if ! dnf list available artemis-boot &>/dev/null; then - LOG_ERROR "yum源中未找到artemis-boot软件包" - exit 255 - fi - - # 如果未安装,则安装artemis-boot软件包 - if [ "$installed" = false ]; then - LOG_INFO "开始安装artemis-boot软件包" - dnf install -y artemis-boot - CHECK_RESULT $? 0 0 "安装artemis-boot软件包失败" - fi - - # 验证配置文件的正确性 - LOG_INFO "验证配置文件的正确性" - config_file="/etc/artemis-boot/config.conf" - if [ ! -f "$config_file" ]; then - LOG_ERROR "配置文件$config_file不存在" - exit 255 - fi - - # 检查配置文件内容是否符合预期 - LOG_INFO "检查配置文件内容是否符合预期" - expected_content="some_expected_config" - actual_content=$(cat "$config_file") - if [ "$actual_content" != "$expected_content" ]; then - LOG_ERROR "配置文件内容不符合预期" - exit 1 - fi - - # 如果脚本开始时未安装,则在结束时卸载artemis-boot软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载artemis-boot软件包以恢复环境" - dnf remove -y artemis-boot - CHECK_RESULT $? 0 0 "卸载artemis-boot软件包失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/artemis/artemis-boot/test_artemis-boot_function_dep.sh b/testcases/function_test/pkg_test/artemis/artemis-boot/test_artemis-boot_function_dep.sh deleted file mode 100644 index f5fa8af4e62..00000000000 --- a/testcases/function_test/pkg_test/artemis/artemis-boot/test_artemis-boot_function_dep.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 : 2025-12-01 -# @License : Mulan PSL v2 -# @Desc : 测试artemis-boot软件包的基础依赖库功能,验证依赖库的完整性。 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 测试artemis-boot软件包的基础依赖库功能,验证依赖库的完整性 - - LOG_INFO "开始测试artemis-boot软件包的基础依赖库功能" - - # 检查是否已安装artemis-boot - if dnf list installed artemis-boot &>/dev/null; then - LOG_INFO "artemis-boot已安装,测试完成后将保持安装状态" - INSTALLED=true - else - LOG_INFO "artemis-boot未安装,将在测试完成后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有artemis-boot软件包 - LOG_INFO "检查yum源中是否存在artemis-boot软件包" - if ! dnf list available artemis-boot &>/dev/null; then - LOG_ERROR "yum源中未找到artemis-boot软件包" - exit 255 - fi - - # 安装artemis-boot软件包(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装artemis-boot软件包" - dnf install -y artemis-boot - CHECK_RESULT $? 0 0 "安装artemis-boot软件包失败" - fi - - # 验证依赖库的完整性 - LOG_INFO "验证artemis-boot依赖库的完整性" - ldd $(which artemis-boot) | grep -q "not found" - if [ $? -eq 0 ]; then - LOG_ERROR "artemis-boot依赖库不完整" - exit 1 - else - LOG_INFO "artemis-boot依赖库完整" - fi - - # 测试命令参数支持情况(示例:假设artemis-bool支持--version参数) - LOG_INFO "测试artemis-bool命令参数支持" - if ! artemis-book --version &>/dev/null; then - LOG_ERROR "--version参数不支持或命令执行失败" - exit 255 - else - LOG_INFO "--version参数支持" - fi - - # 清理环境(如果之前未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载artemix- boot软件包" - dnf remove -y artemix- boot - CHECK_RESULT $? , , ,"卸载artemix- boot失败" - fi - - LOG _INFO "测试完成" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/artemis/artemis-boot/test_artemis-boot_function_start.sh b/testcases/function_test/pkg_test/artemis/artemis-boot/test_artemis-boot_function_start.sh deleted file mode 100644 index 767ef0ca397..00000000000 --- a/testcases/function_test/pkg_test/artemis/artemis-boot/test_artemis-boot_function_start.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-01 -# @License : Mulan PSL v2 -# @Desc : 测试artemis-boot软件包的启动功能,验证是否能够成功启动。 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试artemis-boot软件包的启动功能" - - # 检查artemis-boot软件包是否已安装 - if ! dnf list installed artemis-boot &>/dev/null; then - LOG_INFO "artemis-boot软件包未安装,将进行安装" - # 检查yum源中是否有artemis-boot软件包 - if ! dnf list available artemis-boot &>/dev/null; then - LOG_ERROR "yum源中未找到artemis-boot软件包" - exit 255 - fi - # 安装artemis-boot软件包 - dnf install -y artemis-boot - CHECK_RESULT $? 0 0 "安装artemis-boot软件包失败" - else - LOG_INFO "artemis-boot软件包已安装,跳过安装步骤" - fi - - # 验证artemis-boot启动功能 - LOG_INFO "验证artemis-boot启动功能" - systemctl start artemis-boot - CHECK_RESULT $? 0 0 "启动artemis-boot失败" - - # 检查artemis-boot服务状态 - LOG_INFO "检查artemis-boot服务状态" - systemctl status artemis-boot | grep -q "active (running)" - CHECK_RESULT $? 0 0 "artemis-boot服务未正常运行" - - # 清理环境 - if ! dnf list installed artemis-boot &>/dev/null; then - LOG_INFO "清理环境,卸载artemis-boot软件包" - dnf remove -y artemis-boot - CHECK_RESULT $? 0 0 "卸载artemis-boot软件包失败" - else - LOG_INFO "artemis-boot软件包已存在,无需卸载" - fi - - LOG_INFO "artemis-bool启动功能测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/felix-utils/felix-utils-help/test_felix-utils-help_function_basic.sh b/testcases/function_test/pkg_test/felix-utils/felix-utils-help/test_felix-utils-help_function_basic.sh deleted file mode 100644 index eae965f7e21..00000000000 --- a/testcases/function_test/pkg_test/felix-utils/felix-utils-help/test_felix-utils-help_function_basic.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 basic functionality of felix-utils-help -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查环境是否已安装felix-utils-help - LOG_INFO "检查环境是否已安装felix-utils-help" - if dnf list installed felix-utils-help &>/dev/null; then - LOG_INFO "felix-utils-help已安装,脚本结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "felix-utils-help未安装,将在测试完成后卸载" - INSTALLED=false - fi - - # 检查yum源中是否存在felix-utils-help - LOG_INFO "检查yum源中是否存在felix-utils-help" - if ! dnf list available felix-utils-help &>/dev/null; then - LOG_ERROR "yum源中不存在felix-utils-help,退出" - exit 255 - fi - - # 安装felix-utils-help - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装felix-utils-help" - dnf install -y felix-utils-help - CHECK_RESULT $? 0 0 "安装felix-utils-help失败" - fi - - # 测试基本功能 - LOG_INFO "测试felix-utils-help的基本功能" - felix-utils-help --help - CHECK_RESULT $? 0 0 "执行--help参数失败" - - # 测试不支持的参数 - LOG_INFO "测试不支持的参数" - felix-utils-help --invalid &>/dev/null - if [ $? -ne 255 ]; then - LOG_ERROR "不支持参数--invalid,但未返回退出码255" - exit 255 - fi - - # 清理环境:如果脚本开始时未安装,则卸载 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载felix-utils-help" - dnf remove -y felix-utils-help - CHECK_RESULT $? 0 0 "卸载felix-utils-help失败" - fi - - LOG_INFO "测试完成" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-codemodel/test_glassfish-jaxb-codemodel_function_generate.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-codemodel/test_glassfish-jaxb-codemodel_function_generate.sh deleted file mode 100644 index 68a362e0b45..00000000000 --- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-codemodel/test_glassfish-jaxb-codemodel_function_generate.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 : Test code generation functionality -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - LOG_INFO "开始测试:Test code generation functionality" - - # 检查软件包是否在yum源中 - LOG_INFO "检查yum源中是否存在glassfish-jaxb-codemodel软件包" - if ! dnf list available glassfish-jaxb-codemodel &>/dev/null; then - LOG_ERROR "yum源中未找到glassfish-jaxb-codemodel软件包" - exit 255 - fi - - # 检查环境是否已安装软件包 - LOG_INFO "检查环境是否已安装glassfish-jaxb-codemodel" - if rpm -q glassfish-jaxb-codemodel &>/dev/null; then - LOG_INFO "环境已安装glassfish-jaxb-codemodel,测试结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "环境未安装glassfish-jaxb-codemodel,测试结束后将卸载" - INSTALLED=false - fi - - # 安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装glassfish-jaxb-codemodel软件包" - dnf install -y glassfish-jaxb-codemodel - CHECK_RESULT $? 0 0 "安装glassfish-jaxb-codemodel失败" - fi - - # 测试code generation功能 - LOG_INFO "测试code generation功能" - glassfish-jaxb-codemodel generate --help &>/dev/null - CHECK_RESULT $? 0 0 "glassfish-jaxb-codemodel generate命令不支持或参数错误" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载glassfish-jaxb-codemodel软件包" - dnf remove -y glassfish-jaxb-codemodel - CHECK_RESULT $? 0 0 "卸载glassfish-jaxb-codemodel失败" - fi - - LOG_INFO "测试完成:Test code generation functionality" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_docformat.sh b/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_docformat.sh deleted file mode 100644 index 63724342bf6..00000000000 --- a/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_docformat.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-07 -# @License : Mulan PSL v2 -# @Desc : Verify documentation formatting -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - LOG_INFO "开始测试:Verify documentation formatting" - - # 检查jfreechart-javadoc软件包是否在yum源中 - LOG_INFO "检查jfreechart-javadoc软件包是否在yum源中" - dnf list available jfreechart-javadoc &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "jfreechart-javadoc软件包不在yum源中" - exit 255 - fi - - # 检查是否已安装jfreechart-javadoc - LOG_INFO "检查是否已安装jfreechart-javadoc" - rpm -q jfreechart-javadoc &>/dev/null - if [ $? -eq 0 ]; then - installed=true - LOG_INFO "jfreechart-javadoc已安装" - else - installed=false - LOG_INFO "jfreechart-javadoc未安装" - fi - - # 如果未安装,则安装软件包 - if [ "$installed" = false ]; then - LOG_INFO "安装jfreechart-javadoc软件包" - dnf install -y jfreechart-javadoc - CHECK_RESULT $? 0 0 "安装jfreechart-javadoc失败" - fi - - # 验证文档格式 - LOG_INFO "验证jfreechart-javadoc文档格式" - javadoc -d /tmp/jfreechart-javadoc -sourcepath /usr/share/javadoc/jfreechart-javadoc -subpackages org.jfree.chart - CHECK_RESULT $? 0 0 "验证jfreechart-javadoc文档格式失败" - - # 清理临时文件 - LOG_INFO "清理临时文件" - rm -rf /tmp/jfreechart-javadoc - CHECK_RESULT $? 0 0 "清理临时文件失败" - - # 如果之前未安装,则卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载jfreechart-javadoc软件包" - dnf remove -y jfreechart-javadoc - CHECK_RESULT $? 0 0 "卸载jfreechart-javadoc失败" - fi - - LOG_INFO "测试完成:Verify documentation formatting" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_docgen.sh b/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_docgen.sh deleted file mode 100644 index fd270d0c059..00000000000 --- a/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_docgen.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-29 -# @License : Mulan PSL v2 -# @Desc : Verify documentation generation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Verify documentation generation" - - # 检查是否已安装jfreechart-javadoc - LOG_INFO "检查jfreechart-javadoc是否已安装" - if dnf list installed jfreechart-javadoc &>/dev/null; then - LOG_INFO "jfreechart-javadoc已安装,脚本结束后保持安装状态" - installed=true - else - LOG_INFO "jfreechart-javadoc未安装,将在测试结束后卸载" - installed=false - fi - - # 检查yum源中是否有jfreechart-javadoc - LOG_INFO "检查yum源中是否有jfreechart-javadoc" - if ! dnf list available jfreechart-javadoc &>/dev/null; then - LOG_ERROR "yum源中未找到jfreechart-javadoc软件包" - exit 255 - fi - - # 安装jfreechart-javadoc(如果未安装) - if [ "$installed" = false ]; then - LOG_INFO "安装jfreechart-javadoc" - dnf install -y jfreechart-javadoc - CHECK_RESULT $? 0 0 "安装jfreechart-javadoc失败" - fi - - # 验证文档生成功能 - LOG_INFO "验证文档生成功能" - javadoc -d /tmp/jfreechart-docs -sourcepath /usr/share/jfreechart/src -subpackages org.jfree.chart - CHECK_RESULT $? 0 0 "文档生成失败" - - # 清理临时文档目录(如果存在) - LOG_INFO "清理临时文档目录" - rm -rf /tmp/jfreechart-docs - CHECK_RESULT $? 0 0 "清理临时文档目录失败" - - # 卸载jfreechart-javadoc(如果脚本开始时未安装) - if [ "$installed" = false ]; then - LOG_INFO "卸载jfreechart-javadoc" - dnf remove -y jfreechart-javadoc - CHECK_RESULT $? 0 0 "卸载jfreechart-javadoc失败" - fi - - LOG_INFO "测试完成:Verify documentation generation" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_doclinks.sh b/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_doclinks.sh deleted file mode 100644 index 6c4430647e4..00000000000 --- a/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_doclinks.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-12-07 -# @License : Mulan PSL v2 -# @Desc : Check hyperlinks in docs -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查文档中的超链接 - LOG_INFO "开始检查文档中的超链接" - - # 检查软件包是否已安装 - LOG_INFO "检查jfreechart-javadoc软件包是否已安装" - dnf list installed jfreechart-javadoc > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "jfreechart-javadoc软件包已安装" - INSTALLED=true - else - LOG_INFO "jfreechart-javadoc软件包未安装" - INSTALLED=false - fi - - # 检查yum源中是否有该软件包 - LOG_INFO "检查yum源中是否有jfreechart-javadoc软件包" - dnf list available jfreechart-javadoc > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到jfreechart-javadoc软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装jfreechart-javadoc软件包" - dnf install -y jfreechart-javadoc - CHECK_RESULT $? 0 0 "安装jfreechart-javadoc软件包失败" - fi - - # 检查文档中的超链接 - LOG_INFO "检查文档中的超链接" - javadoc -link https://www.jfree.org/jfreechart/api/javadoc/ -d /tmp/jfreechart-javadoc /usr/share/javadoc/jfreechart-javadoc > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "检查文档中的超链接失败" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载jfreechart-javadoc软件包" - dnf remove -y jfreechart-javadoc - CHECK_RESULT $? 0 0 "卸载jfreechart-javadoc软件包失败" - fi - - LOG_INFO "检查文档中的超链接完成" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_docsearch.sh b/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_docsearch.sh deleted file mode 100644 index 3dd61c20b94..00000000000 --- a/testcases/function_test/pkg_test/jfreechart/jfreechart-javadoc/test_jfreechart-javadoc_function_docsearch.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-07 -# @License : Mulan PSL v2 -# @Desc : Test search functionality -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test search functionality" - - # 检查软件包是否已安装 - LOG_INFO "检查jfreechart-javadoc软件包是否已安装" - if dnf list installed jfreechart-javadoc &>/dev/null; then - LOG_INFO "jfreechart-javadoc已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "jfreechart-javadoc未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有该软件包 - LOG_INFO "检查yum源中是否有jfreechart-javadoc软件包" - if ! dnf list available jfreechart-javadoc &>/dev/null; then - LOG_ERROR "yum源中未找到jfreechart-javadoc软件包" - exit 255 - fi - - # 安装软件包(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装jfreechart-javadoc软件包" - dnf install -y jfreechart-javadoc - CHECK_RESULT $? 0 0 "安装jfreechart-javadoc失败" - fi - - # 测试搜索功能 - LOG_INFO "测试搜索功能" - javadoc -d /tmp/jfreechart-javadoc -sourcepath /usr/share/javadoc/jfreechart-javadoc -subpackages org.jfree.chart - CHECK_RESULT $? 0 0 "搜索功能测试失败" - - # 清理环境(如果最初未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载jfreechart-javadoc软件包" - dnf remove -y jfreechart-javadoc - CHECK_RESULT $? 0 0 "卸载jfreechart-javadoc失败" - fi - - LOG_INFO "测试完成:Test search functionality" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-repoze-lru/python3-repoze-lru/test_python3-repoze-lru_function_cache.sh b/testcases/function_test/pkg_test/python-repoze-lru/python3-repoze-lru/test_python3-repoze-lru_function_cache.sh deleted file mode 100644 index c7ee7fa320e..00000000000 --- a/testcases/function_test/pkg_test/python-repoze-lru/python3-repoze-lru/test_python3-repoze-lru_function_cache.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 basic cache functionality -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test basic cache functionality" - - # 检查是否已安装python3-repoze-lru - LOG_INFO "检查是否已安装python3-repoze-lru" - dnf list installed python3-repoze-lru > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "python3-repoze-lru已安装,测试完成后将保持安装状态" - INSTALLED=1 - else - LOG_INFO "python3-repoze-lru未安装,将在测试完成后卸载" - INSTALLED=0 - fi - - # 检查yum源中是否有python3-repoze-lru - LOG_INFO "检查yum源中是否有python3-repoze-lru" - dnf list available python3-repoze-lru > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到python3-repoze-lru,退出测试" - exit 255 - fi - - # 安装python3-repoze-lru(如果未安装) - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "安装python3-repoze-lru" - dnf install -y python3-repoze-lru - CHECK_RESULT $? 0 0 "安装python3-repoze-lru失败" - fi - - # 测试基本缓存功能 - LOG_INFO "测试基本缓存功能" - python3 -c "from repoze.lru import lru_cache; @lru_cache(maxsize=100); def test_func(x): return x; print(test_func(1))" > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "测试基本缓存功能失败" - - # 清理环境(如果最初未安装) - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载python3-repoze-lru" - dnf remove -y python3-repoze-lru - CHECK_RESULT $? 0 0 "卸载python3-repoze-lru失败" - fi - - LOG_INFO "测试完成:Test basic cache functionality" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_doc_path.sh b/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_doc_path.sh deleted file mode 100644 index a3ce2a2eb66..00000000000 --- a/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_doc_path.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 : 2026-02-27 -# @License : Mulan PSL v2 -# @Desc : Test locating the gem documentation files -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:定位gem文档文件" - LOG_INFO "步骤1:检查yum源中是否存在rubygem-contracts-doc软件包" - dnf list available rubygem-contracts-doc > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到rubygem-contracts-doc软件包" - exit 255 - fi - - LOG_INFO "步骤2:检查环境中是否已安装rubygem-contracts-doc" - rpm -q rubygem-contracts-doc > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "rubygem-contracts-doc已安装,将保持安装状态" - INSTALLED=1 - else - LOG_INFO "rubygem-contracts-doc未安装,将进行安装" - INSTALLED=0 - LOG_INFO "步骤3:安装rubygem-contracts-doc软件包" - dnf install -y rubygem-contracts-doc - CHECK_RESULT $? 0 0 "安装rubygem-contracts-doc失败" - fi - - LOG_INFO "步骤4:定位gem文档文件" - gem which contracts > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "无法定位contracts gem的路径" - - LOG_INFO "步骤5:检查gem文档路径" - GEM_PATH=$(gem which contracts 2>/dev/null) - if [ -n "$GEM_PATH" ]; then - LOG_INFO "找到gem文档路径: $GEM_PATH" - if [ -d "$(dirname "$GEM_PATH")/doc" ] || [ -d "$(dirname "$GEM_PATH")/docs" ]; then - LOG_INFO "gem文档目录存在" - else - LOG_INFO "gem文档目录不存在,但gem路径有效" - fi - else - LOG_ERROR "未找到gem文档路径" - exit 1 - fi - - LOG_INFO "步骤6:清理环境" - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载rubygem-contracts-doc软件包" - dnf remove -y rubygem-contracts-doc - CHECK_RESULT $? 0 0 "卸载rubygem-contracts-doc失败" - else - LOG_INFO "保持rubygem-contracts-doc安装状态" - fi - - LOG_INFO "测试完成:成功定位gem文档文件" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_uninstall.sh b/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_uninstall.sh deleted file mode 100644 index 4ad01427d72..00000000000 --- a/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_uninstall.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-02-27 -# @License : Mulan PSL v2 -# @Desc : Test uninstallation of the gem -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装rubygem-contracts-doc - LOG_INFO "检查是否已安装rubygem-contracts-doc软件包" - dnf list installed rubygem-contracts-doc >/dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "检测到rubygem-contracts-doc已安装,脚本结束时将保持安装状态" - INSTALLED_ALREADY=1 - else - LOG_INFO "检测到rubygem-contracts-doc未安装,将在测试过程中安装并在结束时卸载" - INSTALLED_ALREADY=0 - fi - - # 检查yum源中是否存在rubygem-contracts-doc软件包 - LOG_INFO "检查yum源中是否存在rubygem-contracts-doc软件包" - dnf list available rubygem-contracts-doc >/dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到rubygem-contracts-doc软件包" - exit 255 - fi - - # 如果未安装,则安装rubygem-contracts-doc - if [ ${INSTALLED_ALREADY} -eq 0 ]; then - LOG_INFO "开始安装rubygem-contracts-doc软件包" - dnf install -y rubygem-contracts-doc - CHECK_RESULT $? 0 0 "安装rubygem-contracts-doc软件包失败" - fi - - # 测试卸载gem - LOG_INFO "开始测试卸载rubygem-contracts-doc" - gem uninstall contracts-doc - CHECK_RESULT $? 0 0 "卸载rubygem-contracts-doc失败" - - # 验证卸载后软件包是否仍存在 - LOG_INFO "验证卸载后rubygem-contracts-doc是否仍存在" - dnf list installed rubygem-contracts-doc >/dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_ERROR "卸载后rubygem-contracts-doc软件包仍存在" - exit 1 - else - LOG_INFO "rubygem-contracts-doc软件包已成功卸载" - fi - - # 环境恢复:如果之前未安装,则重新安装以恢复环境 - if [ ${INSTALLED_ALREADY} -eq 0 ]; then - LOG_INFO "恢复环境:重新安装rubygem-contracts-doc" - dnf install -y rubygem-contracts-doc - CHECK_RESULT $? 0 0 "重新安装rubygem-contracts-doc软件包失败" - else - LOG_INFO "环境恢复:rubygem-contracts-doc已保持安装状态" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_usage.sh b/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_usage.sh deleted file mode 100644 index e9915008b69..00000000000 --- a/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_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-02-27 -# @License : Mulan PSL v2 -# @Desc : Test basic library usage and contract validation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - PACKAGE_NAME="rubygem-contracts-doc" - LOG_INFO "开始测试:Test basic library usage and contract validation" - LOG_INFO "步骤1:检查软件包是否在yum源中" - dnf list available "$PACKAGE_NAME" &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "软件包 $PACKAGE_NAME 不在yum源中" - exit 255 - fi - LOG_INFO "软件包 $PACKAGE_NAME 在yum源中" - 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 - if [ $ALREADY_INSTALLED -eq 0 ]; then - LOG_INFO "步骤3:安装软件包 $PACKAGE_NAME" - dnf install -y "$PACKAGE_NAME" - CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败" - fi - LOG_INFO "步骤4:验证 contracts 库基本用法" - cat > /tmp/test_contracts.rb << "EOF" - require "contracts" - class MathOperations - include Contracts::Core - include Contracts::Builtin - Contract Num, Num => Num - def add(a, b) - a + b - end - Contract Num, Num => Num - def multiply(a, b) - a * b - end - end - math = MathOperations.new - puts "Testing add method: #{math.add(5, 3)}" - puts "Testing multiply method: #{math.multiply(4, 2)}" - begin - math.add("five", 3) - rescue Contracts::Error => e - puts "Contract validation failed as expected: #{e.message}" - end - EOF - ruby /tmp/test_contracts.rb - CHECK_RESULT $? 0 0 "contracts 库基本用法测试失败" - LOG_INFO "步骤5:清理临时文件" - rm -f /tmp/test_contracts.rb - if [ $ALREADY_INSTALLED -eq 0 ]; then - LOG_INFO "步骤6:卸载软件包 $PACKAGE_NAME" - dnf remove -y "$PACKAGE_NAME" - CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败" - fi - LOG_INFO "测试完成:Test basic library usage and contract validation" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_version.sh b/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_version.sh deleted file mode 100644 index 5855ee626e3..00000000000 --- a/testcases/function_test/pkg_test/rubygem-contracts/rubygem-contracts-doc/test_rubygem-contracts-doc_function_version.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-02-27 -# @License : Mulan PSL v2 -# @Desc : Test checking the installed gem version -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:检查已安装的 gem 版本" - - # 定义软件包名 - PACKAGE="rubygem-contracts-doc" - - # 步骤1:检查 yum 源中是否有该软件包 - LOG_INFO "步骤1:检查 yum 源中是否有软件包 $PACKAGE" - dnf list available $PACKAGE &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "yum 源中未找到软件包 $PACKAGE" - exit 255 - fi - - # 步骤2:检查当前环境是否已安装该软件包 - LOG_INFO "步骤2:检查当前环境是否已安装软件包 $PACKAGE" - if rpm -q $PACKAGE &>/dev/null; then - LOG_INFO "软件包 $PACKAGE 已安装,将保持安装状态" - INSTALLED=true - else - LOG_INFO "软件包 $PACKAGE 未安装,将进行安装" - INSTALLED=false - fi - - # 步骤3:如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "步骤3:安装软件包 $PACKAGE" - dnf install -y $PACKAGE - CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE 失败" - fi - - # 步骤4:检查 gem 命令是否支持 version 参数 - LOG_INFO "步骤4:检查 gem 命令是否支持 version 参数" - gem help &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "gem 命令不存在或不支持" - exit 255 - fi - - # 步骤5:执行 gem version 命令检查已安装的 gem 版本 - LOG_INFO "步骤5:执行 gem version 命令检查已安装的 gem 版本" - gem version - CHECK_RESULT $? 0 0 "执行 gem version 命令失败" - - # 步骤6:清理环境,如果测试前未安装,则卸载软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "步骤6:卸载软件包 $PACKAGE" - dnf remove -y $PACKAGE - CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE 失败" - fi - - LOG_INFO "测试完成:检查已安装的 gem 版本" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_draftmode.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_draftmode.sh deleted file mode 100644 index 6cd21bcf25e..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_draftmode.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-27 -# @License : Mulan PSL v2 -# @Desc : 测试 draftmode 参数,生成无输出 PDF 的草稿模式 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装 texlive-cslatex 软件包 - LOG_INFO "检查是否已安装 texlive-cslatex 软件包" - if dnf list installed texlive-cslatex &>/dev/null; then - LOG_INFO "texlive-cslatex 已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cslatex 未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-cslatex 软件包 - LOG_INFO "检查 yum 源中是否有 texlive-cslatex 软件包" - if ! dnf list available texlive-cslatex &>/dev/null; then - LOG_ERROR "yum 源中未找到 texlive-cslatex 软件包" - exit 255 - fi - - # 如果未安装,则安装 texlive-cslatex - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装 texlive-cslatex 软件包" - dnf install -y texlive-cslatex - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 失败" - fi - - # 测试 draftmode 参数生成无输出 PDF 的草稿模式 - LOG_INFO "测试 draftmode 参数生成无输出 PDF 的草稿模式" - cslatex -draftmode test.tex &>/dev/null - CHECK_RESULT $? 0 0 "执行 cslatex -draftmode 失败" - - # 检查是否生成了 PDF文件(草稿模式应不生成) - LOG_INFO "检查是否未生成 PDF文件(草稿模式)" - if [ -f test.pdf ]; then - LOG_ERROR "草稿模式下不应生成 PDF文件" - exit 1 - else - LOG_INFO "草稿模式未生成 PDF文件,符合预期" - fi - - # 清理测试环境:删除测试文件 - LOG_INFO "清理测试环境:删除测试文件" - rm -f test.aux test.log test.tex - - # 如果脚本开始时未安装 texlive-cslatex,则在结束时卸载 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载 texlive-cslatex 软件包" - dnf remove -y texlive-cslatex - CHECK_RESULT $?- -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_enc.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_enc.sh deleted file mode 100644 index b7d2de3b75a..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_enc.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-27 -# @License : Mulan PSL v2 -# @Desc : 测试 enc 参数,启用 encTeX 扩展 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 enc 参数,启用 encTeX 扩展" - - # 检查是否已安装 texlive-cslatex 软件包 - LOG_INFO "检查 texlive-cslatex 是否已安装" - if dnf list installed texlive-cslatex &> /dev/null; then - LOG_INFO "texlive-cslatex 已安装,脚本结束后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cslatex 未安装,将在测试步骤中安装并在脚本结束前卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-cslatex 软件包 - LOG_INFO "检查 yum 源中是否有 texlive-cslatex" - if ! dnf list available texlive-cslatex &> /dev/null; then - LOG_ERROR "yum 源中未找到 texlive-cslatex 软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装 texlive-cslatex" - dnf install -y texlive-cslatex &> /dev/null - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 失败" - fi - - # 测试 enc 参数 - LOG_INFO "测试 enc 参数,启用 encTeX 扩展" - cslatex --enc &> /dev/null - CHECK_RESULT $? 0 0 "encTeX扩展启用失败" - - # 清理环境:如果之前未安装,则卸载软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在卸载 texlive-cslatex" - dnf remove -y texlive-cslatex &> /dev/null - CHECK_RESULT $? 0 0 "卸载 texlive-cslatex失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_etex.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_etex.sh deleted file mode 100644 index 7ee53559700..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_etex.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-11-27 -# @License : Mulan PSL v2 -# @Desc : 测试 etex 参数,启用 e-TeX 扩展 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 etex 参数,启用 e-TeX 扩展" - - # 检查是否已安装 texlive-cslatex 和 cslatex - if dnf list installed texlive-cslatex &> /dev/null && dnf list installed cslatex &> /dev/null; then - LOG_INFO "环境已安装 texlive-cslatex 和 cslatex,无需重新安装" - INSTALLED=true - else - LOG_INFO "环境未安装 texlive-cslatex 和 cslatex,将进行安装" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-cslatex 和 cslatex - if ! dnf list available texlive-cslatex &> /dev/null || ! dnf list available cslatex &> /dev/null; then - LOG_ERROR "yum 源中缺少 texlive-cslatex 或 cslatex 软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装 texlive-cslatex 和 cslatex" - dnf install -y texlive-cslatex cslatex - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 和 cslatex 失败" - fi - - # 测试 etex 参数 - LOG_INFO "测试 etex 参数,启用 e-TeX 扩展" - cslatex --etex test.tex &> /dev/null - CHECK_RESULT $? 0 0 "执行 cslatex --etex test.tex 失败" - - #清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载 texlive-cslatex 和 cslatex" - dnf remove -y texlive-cslatex cslatex &> /dev/null - CHECK_RESULT $? 0 0 "卸载 texlive-cslatex 和 cslashlatex失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_fmt_FMTNAME.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_fmt_FMTNAME.sh deleted file mode 100644 index cfdbc751b9d..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_fmt_FMTNAME.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-27 -# @License : Mulan PSL v2 -# @Desc : 测试 fmt 参数,使用指定的 FMTNAME 替代程序名或 %& 行 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 fmt 参数,使用指定的 FMTNAME 替代程序名或 %& 行" - - # 检查是否已安装 texlive-cslatex - LOG_INFO "检查是否已安装 texlive-cslatex" - dnf list installed texlive-cslatex > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-cslatex 已安装,测试完成后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cslatex 未安装,测试完成后将卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-cslatex - LOG_INFO "检查 yum 源中是否有 texlive-cslatex" - dnf list available texlive-cslatex > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum 源中未找到 texlive-cslatex" - exit 255 - fi - - # 安装 texlive-cslatex(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装 texlive-cslatex" - dnf install -y texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 失败" - fi - - # 测试 fmt 参数,使用指定的 FMTNAME - LOG_INFO "测试 fmt 参数,使用指定的 FMTNAME" - fmt_output=$(fmt FMTNAME) - CHECK_RESULT $? 0 0 "fmt FMTNAME 执行失败" - - #清理环境(如果测试前未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在卸载 texlive-cslatex" - dnf remove -y texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载 texlive-cslatex 失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_halt_on_error.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_halt_on_error.sh deleted file mode 100644 index b0f1cbc9eb8..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_halt_on_error.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-27 -# @License : Mulan PSL v2 -# @Desc : 测试 halt-on-error 参数,在第一个错误处停止处理 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - LOG_INFO "开始测试:测试 halt-on-error 参数,在第一个错误处停止处理" - - # 检查是否已安装 texlive-cslatex 包 - LOG_INFO "检查 texlive-cslatex 是否已安装" - if dnf list installed texlive-cslatex &>/dev/null; then - LOG_INFO "texlive-cslatex 已安装,测试结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cslatex 未安装,测试结束后将卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-cslatex 包 - LOG_INFO "检查 yum 源中是否有 texlive-cslatex 包" - if ! dnf list available texlive-cslatex &>/dev/null; then - LOG_ERROR "yum 源中未找到 texlive-cslatex 包" - exit 255 - fi - - # 如果未安装,则安装 texlive-cslatex - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装 texlive-cslatex" - dnf install -y texlive-cslatex - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 失败" - fi - - # 测试 halt-on-error 参数 - LOG_INFO "测试 halt-on-error 参数,在第一个错误处停止处理" - cslatex --halt-on-error testfile.tex - CHECK_RESULT $? 1 0 "halt-on-error 参数未在第一个错误处停止处理" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载 texlive-cslatex" - dnf remove -y texlive-cslatex - CHECK_RESULT $? 0 0 "卸载 texlive-cslatex 失败" - fi - - LOG_INFO "测试完成" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_interaction_batchmode.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_interaction_batchmode.sh deleted file mode 100644 index 426e27ac5cf..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_interaction_batchmode.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-27 -# @License : Mulan PSL v2 -# @Desc : 测试 interaction 参数,设置为 batchmode 交互模式 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-cslatex - LOG_INFO "检查是否已安装texlive-cslatex" - if dnf list installed texlive-cslatex &> /dev/null; then - LOG_INFO "texlive-cslatex已安装,脚本结束后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cslatex未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否存在texlive-cslatex软件包 - LOG_INFO "检查yum源中是否存在texlive-cslatex软件包" - if ! dnf list available texlive-cslatex &> /dev/null; then - LOG_ERROR "yum源中不存在texlive-cslatex软件包" - exit 255 - fi - - # 如果未安装,则安装texlive-cslatex - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装texlive-cslatex" - dnf install -y texlive-cslatex - CHECK_RESULT $? 0 0 "安装texlive-cslatex失败" - fi - - # 测试interaction参数设置为batchmode交互模式 - LOG_INFO "测试interaction参数设置为batchmode交互模式" - cslatex --interaction=batchmode test.tex &> /dev/null - CHECK_RESULT $? 0 0 "cslatex命令执行失败" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlive-cslatex" - dnf remove -y texlive-cslatex - CHECK_RESULT $? 0 0 "卸载texlive-cslatex失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_jobname_STRING.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_jobname_STRING.sh deleted file mode 100644 index dbacefa537f..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_jobname_STRING.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-27 -# @License : Mulan PSL v2 -# @Desc : 测试 jobname 参数,设置作业名称为 STRING -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-cslatex软件包 - LOG_INFO "检查texlive-cslatex软件包是否已安装" - dnf list installed texlive-cslatex &> /dev/null - if [ $? -eq 0 ]; then - LOG_INFO "texlive-cslatex已安装,脚本结束时将保持安装状态" - INSTALLED=1 - else - LOG_INFO "texlive-cslatex未安装,脚本结束时将卸载" - INSTALLED=0 - fi - - # 检查yum源中是否有texlive-cslatex软件包 - LOG_INFO "检查yum源中是否存在texlive-cslatex软件包" - dnf list available texlive-cslatex &> /dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-cslatex软件包" - exit 255 - fi - - # 安装texlive-cslatex软件包(如果未安装) - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "开始安装texlive-cslatex软件包" - dnf install -y texlive-cslatex &> /dev/null - CHECK_RESULT $? 0 0 "安装texlive-cslatex失败" - fi - - # 测试jobname参数,设置作业名称为STRING - LOG_INFO "测试jobname参数,设置作业名称为STRING" - cslatex --jobname=STRING test.tex &> /dev/null - CHECK_RESULT $? 0 0 "执行cslatex命令失败" - - # 清理环境(如果脚本开始时未安装) - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载texlive-cslatex软件包" - dnf remove -y texlive-cslatex &> /dev/null - CHECK_RESULT $? 0 0 "卸载texlive-cslatex失败" - fi - - LOG_INFO "测试完成" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_no_file_line_error.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_no_file_line_error.sh deleted file mode 100644 index a40ef29a181..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_no_file_line_error.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-27 -# @License : Mulan PSL v2 -# @Desc : 测试 no-file-line-error 参数,禁用文件:行:错误样式消息 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 no-file-line-error 参数,禁用文件:行:错误样式消息" - - # 检查是否已安装 texlive-cslatex 包 - LOG_INFO "检查是否已安装 texlive-cslatex 包" - if dnf list installed texlive-cslatex &>/dev/null; then - LOG_INFO "texlive-cslatex 已安装,保持环境状态" - installed=true - else - LOG_INFO "texlive-cslatex 未安装,将在测试后卸载" - installed=false - fi - - # 检查 yum 源中是否有 texlive-cslatex 包 - LOG_INFO "检查 yum 源中是否有 texlive-cslatex 包" - if ! dnf list available texlive-cslatex &>/dev/null; then - LOG_ERROR "yum 源中未找到 texlive-cslatex 包" - exit 255 - fi - - # 如果未安装,则安装 texlive-cslatex - if [ "$installed" = false ]; then - LOG_INFO "正在安装 texlive-cslatex" - dnf install -y texlive-cslatex - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 失败" - fi - - # 测试 no-file-line-error 参数 - LOG_INFO "测试 no-file-line-error 参数,禁用文件:行:错误样式消息" - cslatex --no-file-line-error &>/dev/null - CHECK_RESULT $? 0 0 "no-file-line-error 参数不支持或执行失败" - - # 恢复环境 - if [ "$installed" = false ]; then - LOG_INFO "卸载 texlive-cslatex" - dnf remove -y texlive-cslatex - CHECK_RESULT $? 0 0 "卸载 texlive-cslatex 失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_no_parse_first_line.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_no_parse_first_line.sh deleted file mode 100644 index 8d09c3540f5..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_no_parse_first_line.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-27 -# @License : Mulan PSL v2 -# @Desc : 测试 no-parse-first-line 参数,禁用输入文件第一行的解析 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 no-parse-first-line 参数,禁用输入文件第一行的解析" - - # 检查是否已安装 texlive-cslatex 软件包 - LOG_INFO "检查 texlive-cslatex 是否已安装" - if ! dnf list installed texlive-cslatex &>/dev/null; then - LOG_INFO "texlive-cslatex 未安装,将进行安装" - # 检查 yum 源中是否有该软件包 - if ! dnf list available texlive-cslatex &>/dev/null; then - LOG_ERROR "yum 源中未找到 texlive-cslatex 软件包" - exit 255 - fi - # 安装软件包 - dnf install -y texlive-cslatex - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 失败" - # 标记需要卸载 - NEED_UNINSTALL=1 - else - LOG_INFO "texlive-cslatex 已安装,跳过安装步骤" - NEED_UNINSTALL=0 - fi - - # 测试 no-parse-first-line 参数功能 - LOG_INFO "测试 no-parse-first-line 参数功能" - TEST_FILE="test_input.tex" - echo "% This is a comment line" > $TEST_FILE - echo "Hello, world!" >> $TEST_FILE - - # 执行 cslatex 命令并禁用第一行解析 - cslatex --no-parse-first-line $TEST_FILE &> output.log - CHECK_RESULT $? 0 0 "cslatex 命令执行失败" - - # 检查输出是否符合预期 - if grep -q "Hello, world!" output.log; then - LOG_INFO "测试通过:第一行未解析" - else - LOG_ERROR "测试失败:第一行被解析" - exit 1 - fi - - #清理临时文件 - rm -f $TEST_FILE output.log - - #根据标记卸载软件包 - if [ $NEED_UNINSTALL -eq 1 ]; then - LOG_INFO "卸载 texlive-cslatex" - dnf remove -y texlive-cslatex - CHECK_RESULT $? 0 0 "卸载 texlive-cslatex 失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_output_directory_DIR.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_output_directory_DIR.sh deleted file mode 100644 index 4cab73f98ed..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_output_directory_DIR.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-27 -# @License : Mulan PSL v2 -# @Desc : 测试 output-directory 参数,使用现有 DIR 作为输出文件目录 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-cslatex - LOG_INFO "检查是否已安装texlive-cslatex" - rpm -q texlive-cslatex - if [ $? -eq 0 ]; then - LOG_INFO "texlive-cslatex已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cslatex未安装,将在测试步骤中安装" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-cslatex软件包 - LOG_INFO "检查yum源中是否有texlive-cslatex软件包" - dnf list available texlive-cslatex > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-cslatex软件包" - exit 255 - fi - - # 安装texlive-cslatex(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装texlive-cslatex" - dnf install -y texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装texlive-cslatex失败" - fi - - # 测试output-directory参数,使用现有DIR作为输出文件目录 - LOG_INFO "测试output-directory参数,使用现有DIR作为输出文件目录" - mkdir -p DIR - cslatex --output-directory=DIR sample.tex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "cslatex命令执行失败" - - # 检查输出文件是否存在 - LOG_INFO "检查输出文件是否存在" - [ -f DIR/sample.dvi ] || [ -f DIR/sample.pdf ] - CHECK_RESULT $? 0 0 "输出文件未生成" - - # 清理测试生成的临时文件 - LOG_INFO "清理测试生成的临时文件" - rm -rf DIR - - # 卸载texlive-cslatex(如果脚本开始时未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlive-cslatex" - dnf remove -y texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载texlive-cslatex失败" - fi - - LOG_INFO "测试脚本执行完毕" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_output_format_pdf.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_output_format_pdf.sh deleted file mode 100644 index 63dac9b4359..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_cslatex_output_format_pdf.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-27 -# @License : Mulan PSL v2 -# @Desc : 测试 output-format 参数,设置输出格式为 PDF -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-cslatex - LOG_INFO "检查是否已安装texlive-cslatex" - rpm -q texlive-cslatex > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-cslatex已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cslatex未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-cslatex - LOG_INFO "检查yum源中是否有texlive-cslatex" - dnf list available texlive-cslatex > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-cslatex软件包" - exit 255 - fi - - # 安装texlive-cslatex(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装texlive-cslatex" - dnf install -y texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装texlive-cslatex失败" - fi - - # 测试output-format参数设置为PDF - LOG_INFO "测试output-format参数设置为PDF" - cslatex --output-format=pdf > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "设置输出格式为PDF失败" - - # 清理环境(如果最初未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlive-cslatex" - dnf remove -y texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载texlive-cslatex失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_function_basic.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_function_basic.sh deleted file mode 100644 index 6bda87a9975..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_function_basic.sh +++ /dev/null @@ -1,83 +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 : 测试 texlive-cslatex 基础功能是否正常工作 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试 texlive-cslatex 基础功能是否正常工作 - - LOG_INFO "开始测试 texlive-cslatex 基础功能" - - # 检查环境是否已安装 texlive-cslatex - LOG_INFO "检查 texlive-cslatex 是否已安装" - dnf list installed texlive-cslatex > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-cslatex 已安装,测试结束后保持安装状态" - already_installed=true - else - LOG_INFO "texlive-cslatex 未安装,将在测试结束后卸载" - already_installed=false - fi - - # 检查 yum 源中是否有 texlive-cslatex - LOG_INFO "检查 yum 源中是否有 texlive-cslatex" - dnf list available texlive-cslatex > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum 源中未找到 texlive-cslatex" - exit 255 - fi - - # 安装 texlive-cslatex(如果未安装) - if [ "$already_installed" = false ]; then - LOG_INFO "安装 texlive-cslatex" - dnf install -y texlive-cslatex - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 失败" - fi - - # 测试基础功能:检查命令是否存在 - LOG_INFO "测试 cslatex 命令是否存在" - command -v cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "cslatex 命令不存在" - - # (可选)测试命令参数是否支持 - LOG_INFO "测试 cslatex --version 参数" - cslatex --version > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "--version参数不支持或无效" - - # (可选)执行一个简单的 LaTeX 编译测试(假设存在测试文件) - TEST_FILE="test.tex" - if [ -f "$TEST_FILE" ]; then - LOG_INFO "使用 cslatex 编译测试文件" - cslatex "$TEST_FILE" - CHECK_RESULT $? 0 0 "cslatex 编译失败" - else - LOG_INFO "未找到测试文件,跳过编译测试" - fi - - # 清理环境(如果之前未安装) - if [ "$already_installed" = false ]; then - LOG_INFO "卸载 texlive-cslatex" - dnf remove -y texlive-cslatex - CHECK_RESULT $? 0 255 "卸载 texlive-cslatexfailed" - fi - - LOG_INFO “texlive- cslat ex 基础功能测式完成” -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslates_jobname_STRING.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslates_jobname_STRING.sh deleted file mode 100644 index 92fce8176bf..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslates_jobname_STRING.sh +++ /dev/null @@ -1,78 +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 : 测试 pdfcalses jobnmae=STRIGN参數 ,设置作业名称 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 pdfcslatex jobname=STRING 参数,设置作业名称" - - # 检查是否已安装 texlive-cslatex 和 pdfcslatex - LOG_INFO "检查 texlive-cslatex 和 pdfcslatex 是否已安装" - dnf list installed texlive-cslatex > /dev/null 2>&1 - texlive_installed=$? - dnf list installed pdfcslatex > /dev/null 2>&1 - pdfcslatex_installed=$? - - if [ $texlive_installed -eq 0 ] && [ $pdfcslatex_installed -eq 0 ]; then - LOG_INFO "texlive-cslatex 和 pdfcslatex 已安装,测试结束后保持安装状态" - need_uninstall=false - else - LOG_INFO "texlive-cslatex 或 pdfcslatex 未安装,将在测试结束后卸载" - need_uninstall=true - - # 检查 yum 源中是否有 texlive-cslatex 和 pdfcslatex - LOG_INFO "检查 yum 源中是否有 texlive-cslatex 和 pdfcslatex" - dnf search texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum源中未找到 texlive-cslatex" - dnf search pdfcslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum源中未找到 pdfcslatex" - - # 安装 texlive-cslatex 和 pdfcslatex - LOG_INFO "安装 texlive-cslatex" - dnf install -y texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? - - LOG_INFO "安装 pdfcslates" - dnf install -y pdfcsates > /dev/null 2>&1 - CHECK_RESULT $? - - fi - - # 测试 pdfcsates jobname=STRING 参数 - LOG_INFO "测试设置作业名称参数 jobname=STRING" - pdfcsates --jobname=TEST_JOB test.tex > output.log 2>&1 - CHECK_RESULT $? - - grep "TEST_JOB" output.log - CHECK_RESULT $? - - # 清理环境(如果需要) - if [ "$need_uninstall" = true ]; then - LOG_INFO "卸载之前安装的软件包以恢复环境" - dnf remove -y texlive-сsаtех >/dev/null 2>&1 - CHECK_RESULT $? - - dn f remove -у рdfсsаtеs>/dev/nul l 2> &1 - CHEC K _RESULT$ ? - fi - - LOG_INFО “测试完成” -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_draftmode.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_draftmode.sh deleted file mode 100644 index 6dcc3eacae6..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_draftmode.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-27 -# @License : Mulan PSL v2 -# @Desc : 测试 pdfcslatex 的 draftmode 参数,生成无输出 PDF 的草稿模式 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装texlive-cslatex软件包 - LOG_INFO "检查是否已安装texlive-cslatex软件包" - if ! dnf list installed texlive-cslatex &> /dev/null; then - LOG_INFO "texlive-cslatex未安装,准备安装" - # 检查yum源中是否存在texlive-cslatex - if ! dnf list available texlive-cslatex &> /dev/null; then - LOG_ERROR "yum源中未找到texlive-cslatex软件包" - exit 255 - fi - # 安装texlive-cslatex - dnf install -y texlive-cslatex - CHECK_RESULT $? 0 0 "安装texlive-cslatex失败" - INSTALLED=true - else - LOG_INFO "texlive-cslatex已安装" - INSTALLED=false - fi - - # 测试pdfcslatex的draftmode参数 - LOG_INFO "测试pdfcslatex的draftmode参数,生成无输出PDF的草稿模式" - if ! pdfcslatex --help | grep -q "draftmode"; then - LOG_ERROR "pdfcslatex不支持draftmode参数" - exit 255 - fi - - # 创建测试文件 - LOG_INFO "创建测试文件test.tex" - cat > test.tex < /dev/null - CHECK_RESULT $? 0 0 "pdfcslatex draftmode执行失败" - - # 检查是否生成了日志文件但未生成PDF - LOG_INFO "检查是否生成了日志文件但未生成PDF" - if [ ! -f test.log ]; then - LOG_ERROR "未生成日志文件test.log" - exit 1 - fi - - if [ -f test.pdf ]; then - LOG_ERROR "生成了PDF文件test.pdf,与预期不符" - exit 1 - fi - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f test.tex test.log test.aux - - # 如果脚本安装了软件包,则在结束时卸载 - if [ "$INSTALLED" = true ]; then - LOG_INFO "卸载texlive-cslatex软件包" - dnf remove -y texlive-cslatex &> /dev/null - fi -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_enc.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_enc.sh deleted file mode 100644 index b2111911c35..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_enc.sh +++ /dev/null @@ -1,58 +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 : 测试 pdfcslatex 的 enc 参数,启用 encTeX 扩展 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-cslatex和pdfcslatex - LOG_INFO "检查是否已安装texlive-cslatex和pdfcslatex" - if ! dnf list installed texlive-cslatex &> /dev/null || ! dnf list installed pdfcslatex &> /dev/null; then - LOG_INFO "环境未安装,开始安装软件包" - # 检查yum源中是否有软件包 - if ! dnf list available texlive-cslatex &> /dev/null || ! dnf list available pdfcslatex &> /dev/null; then - LOG_ERROR "yum源中缺少texlive-cslatex或pdfcslatex软件包" - exit 255 - fi - # 安装软件包 - dnf install -y texlive-cslatex pdfcslatex - CHECK_RESULT $? 0 0 "安装texlive-cslatex和pdfcslatex失败" - # 标记需要卸载 - NEED_UNINSTALL=1 - else - LOG_INFO "环境已安装,无需重复安装" - fi - - # 测试pdfcslatex的enc参数,启用encTeX扩展 - LOG_INFO "测试pdfcslatex的enc参数,启用encTeX扩展" - pdfcslatex --enc test.tex &> /dev/null - CHECK_RESULT $? 0 0 "pdfcslatex的enc参数测试失败" - - # 清理环境:如果脚本安装了软件包,则卸载 - if [ "$NEED_UNINSTALL" -eq 1 ]; then - LOG_INFO "清理环境,卸载安装的软件包" - dnf remove -y texlive-cslatex pdfcslatex - CHECK_RESULT $? 0 0 "卸载texlive-cslatex和pdfcslatex失败" - fi - - LOG_INFO "测试脚本执行完毕" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_etex.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_etex.sh deleted file mode 100644 index 56a2b22cb19..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_etex.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-11-27 -# @License : Mulan PSL v2 -# @Desc : 测试 pdfcslatex 的 etex 参数,启用 e-TeX 扩展 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已经安装texlive-cslatex和pdfcslatex - LOG_INFO "检查是否已安装texlive-cslatex和pdfcslatex" - if dnf list installed texlive-cslatex && dnf list installed pdfcslatex; then - LOG_INFO "texlive-cslatex和pdfcslatex已安装,测试结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cslatex和pdfcslatex未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-cslatex和pdfcslatex软件包 - LOG_INFO "检查yum源中是否有texlive-cslatex和pdfcslatex软件包" - if ! dnf list available texlive-cslatex || ! dnf list available pdfcslatex; then - LOG_ERROR "yum源中缺少texlive-cslatex或pdfcslatex软件包" - exit 255 - fi - - # 安装texlive-cslatex和pdfcslatex - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装texlive-cslatex和pdfcslatex" - dnf install -y texlive-cslatex pdfcslatex - CHECK_RESULT $? 0 0 "安装texlive-cslatex和pdfcslatex失败" - fi - - # 测试pdfcslatex的etex参数,启用e-TeX扩展 - LOG_INFO "测试pdfcslate的etex参数,启用e-TeX扩展" - if ! pdfcslatEX --help | grep -q "\-\-etex"; then - LOG_ERROR "pdfcslash不支持etex参数" - exit 255 - fi - - # 执行命令并检查结果 - LOG_INFO "执行带etex参数的pdfcslash命令" - pdfcslash --etex test.tex - CHECK_RESULT $? 0 0 "执行带etex参数的pdfcslash命令失败" - - # 清理环境:如果测试前未安装,则卸载软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlivE-CSlatEX和pdFCSlatEX" - dnf remove -y texlivE-CSlatEX pdFCSlatEX - CHECK_RESULT $? 0 0 “卸载texlivE-CSlatEX和pdFCSlatEX失败” - fi - - LOG_INFO “测试完成” - exit 0 - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_file_line_error.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_file_line_error.sh deleted file mode 100644 index 9d1247ab938..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_file_line_error.sh +++ /dev/null @@ -1,58 +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 : 测试 pdfcslatex 的 file-line-error 参数,启用文件:行:错误样式消息 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 pdfcslatex 的 file-line-error 参数,启用文件:行:错误样式消息" - - # 检查是否已安装 texlive-cslatex 软件包 - LOG_INFO "检查 texlive-cslatex 是否已安装" - if ! dnf list installed texlive-cslatex &> /dev/null; then - LOG_INFO "texlive-cslatex 未安装,准备安装" - # 检查 yum 源中是否有该软件包 - if ! dnf list available texlive-cslatex &> /dev/null; then - LOG_ERROR "yum 源中未找到 texlive-cslatex 软件包" - exit 255 - fi - # 安装软件包 - dnf install -y texlive-cslatex - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 失败" - # 标记需要卸载 - NEED_UNINSTALL=1 - else - LOG_INFO "texlive-cslatex 已安装" - fi - - # 测试 pdfcslatex 的 file-line-error 参数 - LOG_INFO "测试 pdfcslatex file-line-error 参数" - pdfcslatex --file-line-error test.tex - CHECK_RESULT $? 0 0 "pdfcslatex file-line-error 参数测试失败" - - #清理环境 - if [ "$NEED_UNINSTALL" -eq 1 ]; then - LOG_INFO "卸载 texlive-cslatex 软件包" - dnf remove -y texlive-cslatex - CHECK_RESULT $? 0 0 "卸载 texlive-cslatex失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_fmt_FMTNAME.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_fmt_FMTNAME.sh deleted file mode 100644 index 5f783824349..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_fmt_FMTNAME.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-27 -# @License : Mulan PSL v2 -# @Desc : 测试 pdfcslatex 的 fmt=FMTNAME 参数,使用指定的 FMTNAME 格式文件 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 pdfcslatex 的 fmt=FMTNAME 参数,使用指定的 FMTNAME 格式文件" - - # 检查是否已安装 texlive-cslatex 软件包 - LOG_INFO "检查 texlive-cslatex 是否已安装" - if ! dnf list installed texlive-cslatex &> /dev/null; then - LOG_INFO "texlive-cslatex 未安装,准备安装" - if ! dnf list available texlive-cslatex &> /dev/null; then - LOG_ERROR "yum 源中未找到 texlive-cslatex 软件包" - exit 255 - fi - dnf install -y texlive-cslatex - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 失败" - INSTALLED=true - else - LOG_INFO "texlive-cslatex 已安装" - INSTALLED=false - fi - - # 检查 FMTNAME 参数是否支持 - LOG_INFO "检查 FMTNAME 参数是否支持" - if ! pdfcslatex --help | grep -q "fmt=FMTNAME"; then - LOG_ERROR "pdfcslatex 不支持 fmt=FMTNAME 参数" - if [ "$INSTALLED" = true ]; then - dnf remove -y texlive-cslatex - CHECK_RESULT $? 0 0 "卸载 texlive-cslatex 失败" - fi - exit 255 - fi - - # 使用指定的 FMTNAME 格式文件测试 pdfcslatex - LOG_INFO "使用指定的 FMTNAME 格式文件测试 pdfcslatex" - pdfcslatex fmt=FMTNAME testfile.tex &> /dev/null - CHECK_RESULT $? 0 0 "pdfcslatex fmt=FMTNAME testfile.tex 执行失败" - - #清理环境 - if [ "$INSTALLED" = true ]; then - LOG_INFO "清理环境,卸载 texlive-cslatex" - dnf remove -y texlive-cslatex - CHECK_RESULT $? -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_halt_on_error.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_halt_on_error.sh deleted file mode 100644 index 7a496e36862..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_halt_on_error.sh +++ /dev/null @@ -1,78 +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 : 测试 pdfcslatex 的 halt-on-error 参数,在第一个错误处停止处理 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-cslatex - LOG_INFO "检查是否已安装texlive-cslatex" - rpm -q texlive-cslatex > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-cslatex已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-cslatex未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-cslatex - LOG_INFO "检查yum源中是否有texlive-cslatex" - dnf list available texlive-cslatex > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-cslatex软件包" - exit 255 - fi - - # 安装texlive-cslatex(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装texlive-cslatex" - dnf install -y texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装texlive-cslatex失败" - fi - - # 测试pdfcslatex的halt-on-error参数 - LOG_INFO "测试pdfcslatex的halt-on-error参数" - cat < test.tex - \documentclass{article} - \begin{document} - \section{Test Section} - This is a test document. - \undefinedcommand - \end{document} - EOF - - pdfcslatex -halt-on-error test.tex > /dev/null 2>&1 - CHECK_RESULT $? 1 0 "pdfcslatex未在第一个错误处停止处理" - - # 清理测试文件 - rm -f test.tex test.log test.aux - - # 卸载texlive-cslatex(如果之前未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在卸载texlive-cslatex" - dnf remove -y texlive-cslatex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载texlive-cslatex失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_interaction_STRING.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_interaction_STRING.sh deleted file mode 100644 index f5adecb60f5..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_interaction_STRING.sh +++ /dev/null @@ -1,56 +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 : 测试 pdfcslatex 的 interaction=STRING 参数,设置交互模式 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 pdfcslatex 的 interaction=STRING 参数,设置交互模式" - - # 检查是否已安装 texlive-cslatex 和 pdfcslatex - LOG_INFO "检查是否已安装 texlive-cslatex 和 pdfcslatex" - if ! dnf list installed texlive-cslatex &>/dev/null || ! dnf list installed pdfcslatex &>/dev/null; then - LOG_INFO "环境未安装,开始安装 texlive-cslatex 和 pdfcslatex" - if ! dnf list available texlive-cslatex &>/dev/null || ! dnf list available pdfcslatex &>/dev/null; then - LOG_ERROR "yum源中不存在 texlive-cslatex 或 pdfcslatex 软件包" - exit 255 - fi - dnf install -y texlive-cslatex pdfcslatex - CHECK_RESULT $? 0 0 "安装 texlive-cslatex 和 pdfcslatex 失败" - INSTALLED=true - else - LOG_INFO "环境已安装 texlive-cslatex 和 pdfcslatex" - INSTALLED=false - fi - - # 测试 interaction=STRING 参数 - LOG_INFO "测试 pdfcslatex interaction=STRING 参数" - pdfcslatex --interaction=STRING test.tex &>/dev/null - CHECK_RESULT $? 0 0 "pdfcslatex interaction=STRING 参数测试失败" - - # 清理环境 - if [ "$INSTALLED" = true ]; then - LOG_INFO "清理环境,卸载 texlive-cslatex 和 pdfcslatex" - dnf remove -y texlive-cSLATEX pdfcsLATEX - CHECK_RESULT $? 0 0 "卸载 texlive-cSLATEX和pdfcsLATEX失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_no_file_line_error.sh b/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_no_file_line_error.sh deleted file mode 100644 index 4ab53531619..00000000000 --- a/testcases/function_test/pkg_test/texlive-base/texlive-cslatex/test_texlive-cslatex_pdfcslatex_no_file_line_error.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-27 -# @License : Mulan PSL v2 -# @Desc : 测试 pdfcslatex 的 no-file-line-error 参数,禁用文件:行:错误样式消息 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装texlive-cslatex和pdfcslatex - LOG_INFO "检查是否已安装texlive-cslatex和pdfcslatex" - if ! dnf list installed texlive-cslatex &>/dev/null || ! dnf list installed pdfcslatex &>/dev/null; then - LOG_INFO "未安装texlive-cslatex或pdfcslatex,准备安装" - # 检查yum源中是否有texlive-cslatex和pdfcslatex - if ! dnf list available texlive-cslatex &>/dev/null || ! dnf list available pdfcslatex &>/dev/null; then - LOG_ERROR "yum源中缺少texlive-cslatex或pdfcslatex软件包" - exit 255 - fi - # 安装软件包 - dnf install -y texlive-cslatex pdfcslatex - CHECK_RESULT $? 0 0 "安装texlive-cslatex和pdfcslatex失败" - INSTALLED=true - else - LOG_INFO "texlive-cslatex和pdfcslatex已安装" - INSTALLED=false - fi - - # 测试pdfcslatex的no-file-line-error参数功能 - LOG_INFO "测试pdfcslatex的no-file-line-error参数功能" - # 创建一个临时测试文件 - TEST_FILE="test_no_file_line_error.tex" - cat > $TEST_FILE < output.log - CHECK_RESULT $? 0 0 "执行pdfcslatex命令失败" - - # 检查输出日志中是否包含文件:行:错误样式消息 - if grep -q "file:line:error" output.log; then - LOG_ERROR "pdfcslat -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_basic.sh deleted file mode 100644 index 57dca3fdfdc..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_basic.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-27 -# @License : Mulan PSL v2 -# @Desc : Test basic functionality of texlive-colorweb -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 texlive-colorweb 的基本功能" - - # 检查是否已安装 texlive-colorweb - LOG_INFO "检查是否已安装 texlive-colorweb" - if dnf list installed texlive-colorweb &> /dev/null; then - LOG_INFO "texlive-colorweb 已安装,测试结束后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-colorweb 未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-colorweb 软件包 - LOG_INFO "检查 yum 源中是否有 texlive-colorweb 软件包" - if ! dnf list available texlive-colorweb &> /dev/null; then - LOG_ERROR "yum 源中未找到 texlive-colorweb 软件包" - exit 255 - fi - - # 如果未安装,则安装 texlive-colorweb - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装 texlive-colorweb" - dnf install -y texlive-colorweb - CHECK_RESULT $? 0 0 "安装 texlive-colorweb 失败" - fi - - # 测试基本功能 - LOG_INFO "测试 texlive-colorweb 的基本功能" - command_to_test="texlive-colorweb --version" - eval "$command_to_test" - CHECK_RESULT $? 0 0 "texlive-colorweb 基本功能测试失败" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载 texlive-colorweb" - dnf remove -y texlive-colorweb - CHECK_RESULT $? 0 0 "卸载 texlive-colorweb 失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_cmyk.sh b/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_cmyk.sh deleted file mode 100644 index 599594ea97c..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_cmyk.sh +++ /dev/null @@ -1,106 +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-04 -# @License : Mulan PSL v2 -# @Desc : Test CMYK color definition usage -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test CMYK color definition usage" - - # 检查环境是否已安装texlive-colorweb包 - LOG_INFO "步骤1:检查texlive-colorweb包是否已安装" - if rpm -q texlive-colorweb >/dev/null 2>&1; then - LOG_INFO "texlive-colorweb包已安装,测试结束后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-colorweb包未安装,将在测试过程中安装" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-colorweb包 - LOG_INFO "步骤2:检查yum源中是否存在texlive-colorweb包" - if ! dnf list available texlive-colorweb >/dev/null 2>&1; then - LOG_ERROR "yum源中不存在texlive-colorweb包" - exit 255 - fi - - # 如果未安装,则安装texlive-colorweb包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "步骤3:安装texlive-colorweb包" - dnf install -y texlive-colorweb - CHECK_RESULT $? 0 0 "安装texlive-colorweb包失败" - fi - - # 测试CMYK颜色定义使用 - LOG_INFO "步骤4:测试CMYK颜色定义使用" - # 创建一个简单的LaTeX文件测试CMYK颜色 - TEST_TEX_FILE="test_cmyk.tex" - cat > $TEST_TEX_FILE << "EOF" - \documentclass{article} - \usepackage[usenames]{color} - \usepackage{colorweb} - \begin{document} - \textcolor[cmyk]{1,0,0,0}{This text is in CMYK color.} - \end{document} - EOF - - # 检查是否支持CMYK参数 - LOG_INFO "步骤5:检查CMYK参数支持" - if ! grep -q "cmyk" $TEST_TEX_FILE; then - LOG_ERROR "CMYK参数不支持或不存在" - # 清理测试文件 - rm -f $TEST_TEX_FILE test_cmyk.pdf test_cmyk.log test_cmyk.aux - # 如果测试期间安装了包,则卸载 - if [ "$INSTALLED" = false ]; then - LOG_INFO "清理:卸载测试期间安装的texlive-colorweb包" - dnf remove -y texlive-colorweb - fi - exit 255 - fi - - # 尝试编译LaTeX文件 - LOG_INFO "步骤6:编译测试LaTeX文件" - pdflatex -interaction=nonstopmode $TEST_TEX_FILE >/dev/null 2>&1 - CHECK_RESULT $? 0 0 "编译LaTeX文件失败" - - # 检查生成的PDF文件 - LOG_INFO "步骤7:验证PDF文件生成" - if [ -f "test_cmyk.pdf" ]; then - LOG_INFO "PDF文件成功生成,CMYK颜色定义测试通过" - else - LOG_ERROR "PDF文件生成失败" - CHECK_RESULT 1 0 0 "PDF文件生成失败" - fi - - # 清理测试文件 - LOG_INFO "步骤8:清理测试文件" - rm -f $TEST_TEX_FILE test_cmyk.pdf test_cmyk.log test_cmyk.aux test_cmyk.out - - # 如果测试期间安装了包,则卸载 - if [ "$INSTALLED" = false ]; then - LOG_INFO "步骤9:卸载测试期间安装的texlive-colorweb包" - dnf remove -y texlive-colorweb - CHECK_RESULT $? 0 0 "卸载texlive-colorweb包失败" - else - LOG_INFO "测试完成,保持texlive-colorweb包安装状态" - fi - - LOG_INFO "测试完成:CMYK颜色定义使用测试结束" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_convert.sh b/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_convert.sh deleted file mode 100644 index 92e9a032d10..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_convert.sh +++ /dev/null @@ -1,114 +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-04 -# @License : Mulan PSL v2 -# @Desc : Test color model conversion -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试颜色模型转换功能 - LOG_INFO "测试开始:Test color model conversion" - - # 检查是否已安装texlive-colorweb软件包 - LOG_INFO "检查texlive-colorweb是否已安装" - if rpm -q texlive-colorweb &> /dev/null; then - LOG_INFO "texlive-colorweb已安装" - already_installed=true - else - LOG_INFO "texlive-colorweb未安装" - already_installed=false - fi - - # 检查yum源中是否有texlive-colorweb软件包 - LOG_INFO "检查yum源中是否有texlive-colorweb" - if dnf list available texlive-colorweb &> /dev/null; then - LOG_INFO "yum源中存在texlive-colorweb软件包" - else - LOG_ERROR "yum源中不存在texlive-colorweb软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$already_installed" = false ]; then - LOG_INFO "安装texlive-colorweb软件包" - dnf install -y texlive-colorweb - CHECK_RESULT $? 0 0 "安装texlive-colorweb失败" - LOG_INFO "texlive-colorweb安装成功" - fi - - # 测试convert命令的基本功能 - LOG_INFO "测试convert命令的基本功能" - if ! command -v convert &> /dev/null; then - LOG_ERROR "convert命令不存在" - if [ "$already_installed" = false ]; then - LOG_INFO "卸载texlive-colorweb软件包" - dnf remove -y texlive-colorweb - fi - exit 255 - fi - - # 测试convert命令是否支持-help参数 - LOG_INFO "测试convert命令是否支持-help参数" - convert -help &> /dev/null - if [ $? -eq 255 ]; then - LOG_ERROR "convert命令不支持-help参数" - if [ "$already_installed" = false ]; then - LOG_INFO "卸载texlive-colorweb软件包" - dnf remove -y texlive-colorweb - fi - exit 255 - fi - LOG_INFO "convert命令支持-help参数" - - # 创建测试文件 - LOG_INFO "创建测试文件" - cat > test_color.tex << "EOF" - \documentclass{article} - \usepackage{colorweb} - \begin{document} - \textcolor{red}{红色文本} - \textcolor[rgb]{0,1,0}{绿色文本} - \textcolor[cmyk]{1,0,0,0}{青色文本} - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试文件失败" - - # 编译测试文件 - LOG_INFO "编译测试文件" - pdflatex test_color.tex &> /dev/null - CHECK_RESULT $? 0 0 "编译测试文件失败" - LOG_INFO "测试文件编译成功" - - # 清理临时文件 - LOG_INFO "清理临时文件" - rm -f test_color.tex test_color.aux test_color.log test_color.pdf - CHECK_RESULT $? 0 0 "清理临时文件失败" - - # 如果测试开始时未安装,则在测试结束后卸载软件包 - if [ "$already_installed" = false ]; then - LOG_INFO "卸载texlive-colorweb软件包" - dnf remove -y texlive-colorweb - CHECK_RESULT $? 0 0 "卸载texlive-colorweb失败" - LOG_INFO "texlive-colorweb卸载成功" - else - LOG_INFO "保持texlive-colorweb安装状态" - fi - - LOG_INFO "测试完成:Test color model conversion" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_doc.sh b/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_doc.sh deleted file mode 100644 index 9bd6c7b314b..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_doc.sh +++ /dev/null @@ -1,95 +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-04 -# @License : Mulan PSL v2 -# @Desc : Test availability of package documentation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试软件包文档可用性 - LOG_INFO "开始测试软件包文档可用性" - - # 定义软件包名称 - PACKAGE_NAME="texlive-colorweb" - - # 检查是否已安装 - LOG_INFO "检查软件包是否已安装" - if dnf list installed "$PACKAGE_NAME" &>/dev/null; then - LOG_INFO "软件包 $PACKAGE_NAME 已安装" - INSTALLED_BEFORE_TEST=true - else - LOG_INFO "软件包 $PACKAGE_NAME 未安装" - INSTALLED_BEFORE_TEST=false - fi - - # 检查yum源中是否有该软件包 - LOG_INFO "检查yum源中是否有软件包 $PACKAGE_NAME" - if ! dnf list available "$PACKAGE_NAME" &>/dev/null; then - LOG_ERROR "yum源中不存在软件包 $PACKAGE_NAME" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED_BEFORE_TEST" = false ]; then - LOG_INFO "安装软件包 $PACKAGE_NAME" - dnf install -y "$PACKAGE_NAME" - CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败" - fi - - # 测试软件包文档可用性 - LOG_INFO "测试软件包文档可用性" - # 检查文档目录是否存在 - if [ -d "/usr/share/doc/$PACKAGE_NAME" ]; then - LOG_INFO "文档目录 /usr/share/doc/$PACKAGE_NAME 存在" - # 检查文档文件是否存在 - DOC_FILES=$(find /usr/share/doc/$PACKAGE_NAME -type f -name "*.html" -o -name "*.pdf" -o -name "*.txt" | head -5) - if [ -n "$DOC_FILES" ]; then - LOG_INFO "找到文档文件:" - echo "$DOC_FILES" - CHECK_RESULT $? 0 0 "文档文件检查失败" - else - LOG_ERROR "未找到文档文件" - exit 1 - fi - else - LOG_ERROR "文档目录 /usr/share/doc/$PACKAGE_NAME 不存在" - exit 1 - fi - - # 检查man页面 - LOG_INFO "检查man页面" - if man -w "$PACKAGE_NAME" &>/dev/null; then - LOG_INFO "找到 $PACKAGE_NAME 的man页面" - CHECK_RESULT $? 0 0 "man页面检查失败" - else - LOG_INFO "未找到 $PACKAGE_NAME 的man页面,这可能正常" - fi - - # 清理环境 - LOG_INFO "清理测试环境" - if [ "$INSTALLED_BEFORE_TEST" = false ]; then - LOG_INFO "卸载测试安装的软件包 $PACKAGE_NAME" - dnf remove -y "$PACKAGE_NAME" - CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败" - else - LOG_INFO "保持软件包 $PACKAGE_NAME 的安装状态" - fi - - LOG_INFO "测试软件包文档可用性完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_version.sh b/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_version.sh deleted file mode 100644 index 9da7c61cf48..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-e/texlive-colorweb/test_texlive-colorweb_function_version.sh +++ /dev/null @@ -1,54 +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-04 -# @License : Mulan PSL v2 -# @Desc : Test checking version of texlive-colorweb -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装texlive-colorweb - LOG_INFO "检查是否已安装texlive-colorweb" - rpm -q texlive-colorweb > /dev/null 2>&1 - installed=$? - - # 如果未安装,检查yum源中是否有该软件包 - if [ $installed -ne 0 ]; then - LOG_INFO "texlive-colorweb未安装,检查yum源中是否有该软件包" - dnf list available texlive-colorweb > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum源中没有texlive-colorweb软件包" - - LOG_INFO "安装texlive-colorweb" - dnf install -y texlive-colorweb - CHECK_RESULT $? 0 0 "安装texlive-colorweb失败" - fi - - # 测试检查版本功能 - LOG_INFO "测试检查texlive-colorweb版本功能" - rpm -q texlive-colorweb --queryformat "%{VERSION}-%{RELEASE}\n" - CHECK_RESULT $? 0 0 "检查texlive-colorweb版本失败" - - # 如果测试前未安装,则在测试后卸载 - if [ $installed -ne 0 ]; then - LOG_INFO "卸载texlive-colorweb" - dnf remove -y texlive-colorweb - CHECK_RESULT $? 0 0 "卸载texlive-colorweb失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier/test_texlive-ebezier_function_install.sh b/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier/test_texlive-ebezier_function_install.sh deleted file mode 100644 index 95e16bdf110..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier/test_texlive-ebezier_function_install.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-09-18 -# @License : Mulan PSL v2 -# @Desc : Test package installation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装texlive-ebezier包 - LOG_INFO "检查texlive-ebezier是否已安装" - rpm -q texlive-ebezier - if [ $? -eq 0 ]; then - LOG_INFO "texlive-ebezier已安装,跳过安装步骤" - installed=true - else - installed=false - fi - - # 检查yum源中是否有texlive-ebezier包 - LOG_INFO "检查yum源中是否有texlive-ebezier包" - dnf list available texlive-ebezier > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum源中不存在texlive-ebezier包" - - # 若未安装,则安装texlive-ebezier包 - if [ "$installed" = false ]; then - LOG_INFO "开始安装texlive-ebezier包" - dnf install -y texlive-ebezier - CHECK_RESULT $? 0 0 "安装texlive-ebezier包失败" - fi - - # 测试命令功能是否正常(假设测试命令为"test_bezier") - LOG_INFO "测试texlive-ebezier功能" - test_bezier --version > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "texlive-ebezier功能测试失败" - - # 若之前未安装,则卸载texlive-ebezier包以恢复环境 - if [ "$installed" = false ]; then - LOG_INFO "卸载texlive-ebezier包以恢复环境" - dnf remove -y texlive-ebezier - CHECK_RESULT $? 0 0 "卸载texlive-ebezier包失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier/test_texlive-ebezier_function_uninstall.sh b/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier/test_texlive-ebezier_function_uninstall.sh deleted file mode 100644 index 4c31075a0e6..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier/test_texlive-ebezier_function_uninstall.sh +++ /dev/null @@ -1,83 +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-04-02 -# @License : Mulan PSL v2 -# @Desc : Test package removal -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - set -e - - LOG_INFO "开始测试 texlive-ebezier 软件包卸载功能" - - # 检查软件包是否在yum源中 - LOG_INFO "检查yum源中是否存在 texlive-ebezier 软件包" - dnf list available texlive-ebezier > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到 texlive-ebezier 软件包" - exit 255 - fi - - # 检查当前是否已安装 - LOG_INFO "检查当前是否已安装 texlive-ebezier" - if rpm -q texlive-ebezier > /dev/null 2>&1; then - already_installed=true - LOG_INFO "检测到 texlive-ebezier 已安装,测试结束后将保持安装状态" - else - already_installed=false - LOG_INFO "检测到 texlive-ebezier 未安装,将执行安装测试" - fi - - # 如果未安装,则先安装 - if [ "$already_installed" = "false" ]; then - LOG_INFO "执行安装 texlive-ebezier" - dnf install -y texlive-ebezier - CHECK_RESULT $? 0 0 "安装 texlive-ebezier 失败" - fi - - # 验证安装 - LOG_INFO "验证 texlive-ebezier 安装成功" - rpm -q texlive-ebezier > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "验证 texlive-ebezier 安装失败" - - # 执行卸载测试 - LOG_INFO "执行 texlive-ebezier 卸载测试" - dnf remove -y texlive-ebezier - CHECK_RESULT $? 0 0 "卸载 texlive-ebezier 失败" - - # 验证卸载 - LOG_INFO "验证 texlive-ebezier 卸载成功" - rpm -q texlive-ebezier > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_ERROR "验证 texlive-ebezier 卸载失败,软件包仍然存在" - exit 1 - fi - - # 环境恢复 - LOG_INFO "开始环境恢复" - if [ "$already_installed" = "true" ]; then - LOG_INFO "重新安装 texlive-ebezier 以恢复原始状态" - dnf install -y texlive-ebezier - CHECK_RESULT $? 0 0 "重新安装 texlive-ebezier 失败" - else - LOG_INFO "原始状态未安装,无需恢复" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier/test_texlive-ebezier_function_usage.sh b/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier/test_texlive-ebezier_function_usage.sh deleted file mode 100644 index dc16bb005df..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-h/texlive-ebezier/test_texlive-ebezier_function_usage.sh +++ /dev/null @@ -1,100 +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-04-02 -# @License : Mulan PSL v2 -# @Desc : Test basic LaTeX usage -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装TeX Live相关软件包 - LOG_INFO "检查是否已安装TeX Live相关软件包" - rpm -q texlive-ebezier &>/dev/null - if [ $? -eq 0 ]; then - LOG_INFO "检测到texlive-ebezier已安装,将保持安装状态" - INSTALLED="yes" - else - LOG_INFO "未检测到texlive-ebezier安装,将在测试过程中安装" - INSTALLED="no" - fi - - # 检查yum源中是否有texlive-ebezier软件包 - LOG_INFO "检查yum源中是否有texlive-ebezier软件包" - dnf list available texlive-ebezier &>/dev/null - CHECK_RESULT $? 0 0 "yum源中没有texlive-ebezier软件包" - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在texlive-ebezier软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = "no" ]; then - LOG_INFO "开始安装texlive-ebezier软件包" - dnf install -y texlive-ebezier - CHECK_RESULT $? 0 0 "安装texlive-ebezier失败" - LOG_INFO "texlive-ebezier安装成功" - fi - - # 测试LaTeX基本使用 - LOG_INFO "测试LaTeX基本使用" - - # 创建一个简单的LaTeX测试文件 - LOG_INFO "创建LaTeX测试文件" - cat > test_bezier.tex << "EOF" - \documentclass{article} - \usepackage{ebezier} - \begin{document} - Test basic LaTeX usage with ebezier package. - \end{document} - EOF - - # 检查ebezier包是否支持 - LOG_INFO "检查ebezier包是否支持" - grep "usepackage{ebezier}" test_bezier.tex - CHECK_RESULT $? 0 0 "ebezier包不支持" - - # 尝试编译LaTeX文件 - LOG_INFO "尝试编译LaTeX文件" - pdflatex test_bezier.tex &>/dev/null - CHECK_RESULT $? 0 0 "LaTeX编译失败" - - # 检查生成的PDF文件 - LOG_INFO "检查生成的PDF文件" - if [ -f test_bezier.pdf ]; then - LOG_INFO "成功生成PDF文件" - file test_bezier.pdf | grep -q "PDF document" - CHECK_RESULT $? 0 0 "生成的文件不是有效的PDF" - else - LOG_ERROR "未生成PDF文件" - exit 1 - fi - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f test_bezier.tex test_bezier.pdf test_bezier.log test_bezier.aux test_bezier.out - - # 如果测试前未安装,则卸载软件包 - if [ "$INSTALLED" = "no" ]; then - LOG_INFO "卸载texlive-ebezier软件包" - dnf remove -y texlive-ebezier - CHECK_RESULT $? 0 0 "卸载texlive-ebezier失败" - LOG_INFO "texlive-ebezier卸载成功" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto/test_texlive-feynmp-auto_function_compile.sh b/testcases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto/test_texlive-feynmp-auto_function_compile.sh deleted file mode 100644 index 8ad8124bd6b..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto/test_texlive-feynmp-auto_function_compile.sh +++ /dev/null @@ -1,114 +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-03 -# @License : Mulan PSL v2 -# @Desc : Test basic Feynmp diagram compile -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "测试开始:Test basic Feynmp diagram compile" - - # 步骤1:检查系统中是否已安装texlive-feynmp-auto软件包 - LOG_INFO "检查texlive-feynmp-auto是否已安装" - if rpm -q texlive-feynmp-auto &>/dev/null; then - LOG_INFO "texlive-feynmp-auto已安装,将在测试结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-feynmp-auto未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 步骤2:检查yum源中是否存在texlive-feynmp-auto软件包 - LOG_INFO "检查yum源中是否存在texlive-feynmp-auto软件包" - if ! dnf list available texlive-feynmp-auto &>/dev/null; then - LOG_ERROR "yum源中不存在texlive-feynmp-auto软件包" - exit 255 - fi - - # 步骤3:如果未安装,则安装texlive-feynmp-auto软件包 - if ! $INSTALLED; then - LOG_INFO "安装texlive-feynmp-auto软件包" - dnf install -y texlive-feynmp-auto - CHECK_RESULT $? 0 0 "安装texlive-feynmp-auto失败" - fi - - # 步骤4:创建测试用的Feynmp图LaTeX文件 - LOG_INFO "创建测试用的Feynmp图LaTeX文件" - cat > test_feynmp.tex << "EOF" - \documentclass{article} - \usepackage{feynmp-auto} - \begin{document} - \begin{fmffile}{test} - \begin{fmfgraph*}(100,50) - \fmfleft{i1,i2} - \fmfright{o1,o2} - \fmf{fermion}{i1,v1,o1} - \fmf{fermion}{i2,v2,o2} - \fmf{photon}{v1,v2} - \fmflabel{$e^-$}{i1} - \fmflabel{$e^+$}{i2} - \fmflabel{$e^-$}{o1} - \fmflabel{$e^+$}{o2} - \end{fmfgraph*} - \end{fmffile} - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建LaTeX文件失败" - - # 步骤5:使用latex命令编译Feynmp图 - LOG_INFO "使用latex命令编译Feynmp图" - latex test_feynmp.tex - CHECK_RESULT $? 0 0 "latex编译失败" - - # 步骤6:检查生成的DVI文件是否存在 - LOG_INFO "检查生成的DVI文件是否存在" - if [ -f test_feynmp.dvi ]; then - LOG_INFO "DVI文件生成成功" - else - LOG_ERROR "DVI文件未生成" - exit 1 - fi - - # 步骤7:使用dvips命令将DVI文件转换为PS文件 - LOG_INFO "使用dvips命令将DVI文件转换为PS文件" - dvips test_feynmp.dvi -o test_feynmp.ps - CHECK_RESULT $? 0 0 "dvips转换失败" - - # 步骤8:检查生成的PS文件是否存在 - LOG_INFO "检查生成的PS文件是否存在" - if [ -f test_feynmp.ps ]; then - LOG_INFO "PS文件生成成功" - else - LOG_ERROR "PS文件未生成" - exit 1 - fi - - # 步骤9:清理生成的中间文件 - LOG_INFO "清理生成的中间文件" - rm -f test_feynmp.aux test_feynmp.log test_feynmp.dvi test_feynmp.ps test_feynmp.tex - - # 步骤10:如果测试开始时未安装,则卸载texlive-feynmp-auto软件包 - if ! $INSTALLED; then - LOG_INFO "卸载texlive-feynmp-auto软件包" - dnf remove -y texlive-feynmp-auto - CHECK_RESULT $? 0 0 "卸载texlive-feynmp-auto失败" - fi - - LOG_INFO "测试完成:Test basic Feynmp diagram compile" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto/test_texlive-feynmp-auto_function_files.sh b/testcases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto/test_texlive-feynmp-auto_function_files.sh deleted file mode 100644 index 32b0f5e291d..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-i/texlive-feynmp-auto/test_texlive-feynmp-auto_function_files.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-03 -# @License : Mulan PSL v2 -# @Desc : Verify key files exist -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 定义变量 - PKG_NAME="texlive-feynmp-auto" - REPO_QUERY_CMD="dnf list available ${PKG_NAME} 2>/dev/null | grep -q ${PKG_NAME}" - INSTALLED_CHECK_CMD="rpm -q ${PKG_NAME} >/dev/null 2>&1" - - # 步骤1: 检查yum源中是否存在软件包 - LOG_INFO "1. 检查yum源中是否存在软件包 ${PKG_NAME}" - eval ${REPO_QUERY_CMD} - if [ $? -ne 0 ]; then - LOG_ERROR "软件包 ${PKG_NAME} 在yum源中不存在" - exit 255 - fi - - # 步骤2: 检查环境是否已安装软件包 - LOG_INFO "2. 检查环境是否已安装软件包 ${PKG_NAME}" - eval ${INSTALLED_CHECK_CMD} - INSTALLED=$? - NEED_CLEANUP=0 - if [ ${INSTALLED} -ne 0 ]; then - LOG_INFO "软件包 ${PKG_NAME} 未安装,将在测试过程中安装" - NEED_CLEANUP=1 - else - LOG_INFO "软件包 ${PKG_NAME} 已安装,测试结束后将保持安装状态" - fi - - # 步骤3: 如果未安装则安装软件包 - if [ ${NEED_CLEANUP} -eq 1 ]; then - LOG_INFO "3. 安装软件包 ${PKG_NAME}" - dnf install -y ${PKG_NAME} - CHECK_RESULT $? 0 0 "安装软件包 ${PKG_NAME} 失败" - fi - - # 步骤4: 验证关键文件是否存在 - LOG_INFO "4. 验证关键文件是否存在" - # 获取软件包安装的文件列表 - FILES=$(rpm -ql ${PKG_NAME} 2>/dev/null) - if [ -z "${FILES}" ]; then - LOG_ERROR "无法获取软件包 ${PKG_NAME} 的文件列表" - if [ ${NEED_CLEANUP} -eq 1 ]; then - dnf remove -y ${PKG_NAME} - fi - exit 1 - fi - - # 检查关键文件是否存在 - MISSING_FILES="" - for FILE in ${FILES}; do - if [ -f "${FILE}" ]; then - LOG_INFO "文件存在: ${FILE}" - else - MISSING_FILES="${MISSING_FILES} ${FILE}" - LOG_ERROR "文件不存在: ${FILE}" - fi - done - - if [ -n "${MISSING_FILES}" ]; then - LOG_ERROR "以下关键文件缺失: ${MISSING_FILES}" - if [ ${NEED_CLEANUP} -eq 1 ]; then - LOG_INFO "清理环境: 卸载软件包 ${PKG_NAME}" - dnf remove -y ${PKG_NAME} - fi - exit 1 - fi - - LOG_INFO "所有关键文件均存在" - - # 步骤5: 清理环境 - if [ ${NEED_CLEANUP} -eq 1 ]; then - LOG_INFO "5. 清理环境: 卸载软件包 ${PKG_NAME}" - dnf remove -y ${PKG_NAME} - CHECK_RESULT $? 0 0 "卸载软件包 ${PKG_NAME} 失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_basic.sh deleted file mode 100644 index f07306861a2..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_basic.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-01 -# @License : Mulan PSL v2 -# @Desc : Test basic functionality of texlive-oscola -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 texlive-oscola 的基本功能" - - # 检查是否已安装 texlive-oscola - LOG_INFO "检查 texlive-oscola 是否已安装" - if dnf list installed texlive-oscola &>/dev/null; then - LOG_INFO "texlive-oscola 已安装,脚本结束后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-oscola 未安装,将在测试后卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-oscola 软件包 - LOG_INFO "检查 yum 源中是否有 texlive-oscola 软件包" - if ! dnf list available texlive-oscola &>/dev/null; then - LOG_ERROR "yum 源中未找到 texlive-oscola 软件包" - exit 255 - fi - - # 安装 texlive-oscola(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装 texlive-oscola" - dnf install -y texlive-oscola - CHECK_RESULT $? 0 0 "安装 texlive-oscola 失败" - fi - - # 测试 texlive-oscola 的基本功能 - LOG_INFO "测试 texlive-oscola 的基本功能" - texlive-oscola --version - CHECK_RESULT $? 0 0 "texlive-oscola 版本检查失败" - - # 检查不支持的参数 - LOG_INFO "检查 texlive-oscola 是否支持无效参数" - texlive-oscola --invalid-parameter &>/dev/null - if [ $? -ne 255 ]; then - LOG_ERROR "texlive-oscola 未正确处理无效参数" - exit 255 - fi - - # 清理环境(如果之前未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载 texlive-oscola" - dnf remove -y texlive-oscola - CHECK_RESULT $? 0 0 "卸载 texlive-oscola 失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_bibliography.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_bibliography.sh deleted file mode 100644 index df854b62eda..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_bibliography.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-21 -# @License : Mulan PSL v2 -# @Desc : Test generation of bibliography using oscola -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装texlive-oscola - LOG_INFO "检查是否已安装texlive-oscola" - if rpm -q texlive-oscola &> /dev/null; then - LOG_INFO "texlive-oscola已安装,测试结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-oscola未安装,将在测试中安装并在结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-oscola包 - LOG_INFO "检查yum源中是否有texlive-oscola包" - if ! dnf list available texlive-oscola &> /dev/null; then - LOG_ERROR "yum源中未找到texlive-oscola包" - exit 255 - fi - - # 安装texlive-oscola(如果未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装texlive-oscola" - dnf install -y texlive-oscola - CHECK_RESULT $? 0 0 "安装texlive-oscola失败" - fi - - # 测试生成参考文献使用oscola - LOG_INFO "测试使用oscola生成参考文献" - # 创建一个简单的测试LaTeX文件 - cat > test_bibliography.tex << "EOF" - \documentclass{article} - \usepackage[style=oscola]{biblatex} - \addbibresource{test.bib} - \begin{document} - Test citation \cite{test2023}. - \printbibliography - \end{document} - EOF - - # 创建一个测试的BibTeX条目 - cat > test.bib << "EOF" - @article{test2023, - author = {Author, Test}, - title = {A Test Article}, - journal = {Test Journal}, - year = {2023}, - volume = {1}, - pages = {1-10} - } - EOF - - # 使用pdflatex编译LaTeX文件 - LOG_INFO "使用pdflatex编译LaTeX文件" - pdflatex test_bibliography.tex - CHECK_RESULT $? 0 0 "pdflatex编译失败" - - # 使用biber生成参考文献 - LOG_INFO "使用biber生成参考文献" - biber test_bibliography - CHECK_RESULT $? 0 0 "biber生成参考文献失败" - - # 再次编译以插入参考文献 - LOG_INFO "再次使用pdflatex编译以插入参考文献" - pdflatex test_bibliography.tex - CHECK_RESULT $? 0 0 "pdflatex第二次编译失败" - - # 检查生成的PDF文件是否存在 - LOG_INFO "检查生成的PDF文件是否存在" - if [ -f test_bibliography.pdf ]; then - LOG_INFO "成功生成包含参考文献的PDF文件" - else - LOG_ERROR "未生成PDF文件" - exit 1 - fi - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f test_bibliography.tex test.bib test_bibliography.aux test_bibliography.bbl test_bibliography.blg test_bibliography.log test_bibliography.pdf test_bibliography.run.xml test_bibliography.bcf - - # 如果测试前未安装,则卸载texlive-oscola - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlive-oscola" - dnf remove -y texlive-oscola - CHECK_RESULT $? 0 0 "卸载texlive-oscola失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_check_installed.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_check_installed.sh deleted file mode 100644 index 53c8413bd7e..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_check_installed.sh +++ /dev/null @@ -1,86 +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-21 -# @License : Mulan PSL v2 -# @Desc : Verify that texlive-oscola is properly installed -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - PACKAGE_NAME="texlive-oscola" - LOG_INFO "开始测试:验证 $PACKAGE_NAME 是否正确安装" - LOG_INFO "步骤1:检查当前环境是否已安装 $PACKAGE_NAME" - if dnf list installed "$PACKAGE_NAME" &>/dev/null; then - LOG_INFO "检测到 $PACKAGE_NAME 已安装,将保持此状态" - INSTALLED_BEFORE="yes" - else - LOG_INFO "检测到 $PACKAGE_NAME 未安装" - INSTALLED_BEFORE="no" - fi - LOG_INFO "步骤2:检查 yum 源中是否存在 $PACKAGE_NAME 软件包" - if ! dnf list available "$PACKAGE_NAME" &>/dev/null; then - LOG_ERROR "yum 源中未找到 $PACKAGE_NAME 软件包" - exit 255 - fi - LOG_INFO "步骤3:如果未安装,则安装 $PACKAGE_NAME" - if [ "$INSTALLED_BEFORE" = "no" ]; then - dnf install -y "$PACKAGE_NAME" - CHECK_RESULT $? 0 0 "安装 $PACKAGE_NAME 失败" - LOG_INFO "$PACKAGE_NAME 安装成功" - else - LOG_INFO "环境已安装 $PACKAGE_NAME,跳过安装步骤" - fi - LOG_INFO "步骤4:验证 $PACKAGE_NAME 安装后的基本功能" - LOG_INFO "步骤4.1:检查 texlive-oscola 相关命令是否可用" - if command -v pdflatex &>/dev/null; then - LOG_INFO "pdflatex 命令可用" - else - LOG_ERROR "pdflatex 命令未找到,安装可能不完整" - exit 1 - fi - LOG_INFO "步骤4.2:尝试运行一个简单的 LaTeX 命令检查 texlive 环境" - TEMP_TEX_FILE="/tmp/test_texlive_oscola.tex" - cat > "$TEMP_TEX_FILE" << "EOF" - \documentclass{article} - \begin{document} - Test for texlive-oscola installation. - \end{document} - EOF - pdflatex -interaction=nonstopmode "$TEMP_TEX_FILE" &>/dev/null - CHECK_RESULT $? 0 0 "pdflatex 编译简单文档失败,texlive-oscola 可能未正确安装" - LOG_INFO "pdflatex 编译测试文档成功" - rm -f "$TEMP_TEX_FILE" "${TEMP_TEX_FILE%.tex}.aux" "${TEMP_TEX_FILE%.tex}.log" "${TEMP_TEX_FILE%.tex}.pdf" 2>/dev/null - LOG_INFO "步骤5:测试 texlive-oscola 特定组件或文件" - OSCOLA_FILE_PATH="/usr/share/texlive/texmf-dist/tex/latex/oscola/oscola.cls" - if [ -f "$OSCOLA_FILE_PATH" ]; then - LOG_INFO "找到 oscola.cls 文件,路径:$OSCOLA_FILE_PATH" - else - LOG_ERROR "未找到 oscola.cls 文件,texlive-oscola 安装可能不完整" - exit 1 - fi - LOG_INFO "步骤6:环境恢复" - if [ "$INSTALLED_BEFORE" = "no" ]; 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 "测试完成:$PACKAGE_NAME 安装验证通过" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_citation_style.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_citation_style.sh deleted file mode 100644 index 4c95fa7f2ec..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_citation_style.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-21 -# @License : Mulan PSL v2 -# @Desc : Test generation of citations using the oscola style -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:使用oscola样式生成引文" - - LOG_INFO "步骤1:检查texlive-oscola软件包是否在yum源中" - dnf list texlive-oscola 2>/dev/null | grep -q texlive-oscola - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-oscola软件包" - exit 255 - fi - - LOG_INFO "步骤2:检查当前环境是否已安装texlive-oscola" - rpm -q texlive-oscola >/dev/null 2>&1 - installed=$? - - if [ $installed -eq 0 ]; then - LOG_INFO "texlive-oscola已安装,测试后将保持安装状态" - else - LOG_INFO "texlive-oscola未安装,将进行安装" - dnf install -y texlive-oscola - CHECK_RESULT $? 0 0 "安装texlive-oscola失败" - fi - - LOG_INFO "步骤3:验证oscola样式文件是否存在" - find /usr/share/texlive/texmf-dist/ -name "oscola*" -type f | head -1 | grep -q oscola - CHECK_RESULT $? 0 0 "未找到oscola样式文件" - - LOG_INFO "步骤4:创建测试文档测试引文生成" - cat > test_citation.tex << "EOF" - \documentclass{article} - \usepackage[style=oscola]{biblatex} - \addbibresource{test.bib} - \begin{document} - 测试引文生成 \cite{test2023}。 - \printbibliography - \end{document} - EOF - - cat > test.bib << "EOF" - @article{test2023, - author = {Test Author}, - title = {Test Title}, - journal = {Test Journal}, - year = {2023} - } - EOF - - LOG_INFO "步骤5:使用pdflatex编译测试文档" - pdflatex test_citation.tex >/dev/null 2>&1 - CHECK_RESULT $? 0 0 "pdflatex编译失败" - - LOG_INFO "步骤6:使用biber生成参考文献" - biber test_citation >/dev/null 2>&1 - CHECK_RESULT $? 0 0 "biber处理失败" - - LOG_INFO "步骤7:再次编译以生成引文" - pdflatex test_citation.tex >/dev/null 2>&1 - CHECK_RESULT $? 0 0 "最终编译失败" - - LOG_INFO "步骤8:检查生成的PDF文件" - [ -f test_citation.pdf ] - CHECK_RESULT $? 0 0 "未生成PDF文件" - - LOG_INFO "步骤9:清理测试文件" - rm -f test_citation.tex test.bib test_citation.aux test_citation.bbl test_citation.blg test_citation.log test_citation.pdf - - LOG_INFO "步骤10:恢复环境状态" - if [ $installed -ne 0 ]; then - LOG_INFO "卸载测试安装的texlive-oscola" - dnf remove -y texlive-oscola - CHECK_RESULT $? 0 0 "卸载texlive-oscola失败" - else - LOG_INFO "保持texlive-oscola安装状态" - fi - - LOG_INFO "测试完成:成功验证oscola样式引文生成功能" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_install.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_install.sh deleted file mode 100644 index 61a9261140b..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_install.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-21 -# @License : Mulan PSL v2 -# @Desc : Test installation of texlive-oscola package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:安装 texlive-oscola 软件包" - - # 检查软件包是否已在 yum 源中 - LOG_INFO "检查 texlive-oscola 是否在 yum 源中" - if ! dnf list available texlive-oscola &>/dev/null; then - LOG_ERROR "texlive-oscola 不在 yum 源中" - exit 255 - fi - - # 检查当前是否已安装 texlive-oscola - LOG_INFO "检查 texlive-oscola 是否已安装" - if rpm -q texlive-oscola &>/dev/null; then - LOG_INFO "texlive-oscola 已安装,测试结束后将保持安装状态" - INSTALLED_BEFORE_TEST=true - else - LOG_INFO "texlive-oscola 未安装,将在测试中安装并最终卸载" - INSTALLED_BEFORE_TEST=false - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED_BEFORE_TEST" = false ]; then - LOG_INFO "安装 texlive-oscola 软件包" - dnf install -y texlive-oscola - CHECK_RESULT $? 0 0 "安装 texlive-oscola 失败" - fi - - # 验证安装是否成功 - LOG_INFO "验证 texlive-oscola 是否安装成功" - rpm -q texlive-oscola - CHECK_RESULT $? 0 0 "texlive-oscola 安装验证失败" - - # 测试 texlive-oscola 的基本功能 - LOG_INFO "测试 texlive-oscola 基本功能" - # 假设 texlive-oscola 安装后会提供 "oscola" 命令 - if command -v oscola &>/dev/null; then - LOG_INFO "运行 "oscola --version" 检查版本" - oscola --version - CHECK_RESULT $? 0 0 "oscola 命令执行失败" - else - LOG_ERROR "oscola 命令未找到" - exit 255 - fi - - # 如果测试前未安装,则卸载软件包以清理环境 - if [ "$INSTALLED_BEFORE_TEST" = false ]; then - LOG_INFO "卸载 texlive-oscola 软件包" - dnf remove -y texlive-oscola - CHECK_RESULT $? 0 0 "卸载 texlive-oscola 失败" - fi - - LOG_INFO "测试完成:texlive-oscola 安装功能正常" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_remove.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_remove.sh deleted file mode 100644 index 165567117ad..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/test_texlive-oscola_function_remove.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-21 -# @License : Mulan PSL v2 -# @Desc : Test removal/uninstallation of texlive-oscola package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试移除/卸载texlive-oscola软件包 - LOG_INFO "开始测试:移除/卸载texlive-oscola软件包" - - # 检查是否已安装texlive-oscola - LOG_INFO "检查texlive-oscola是否已安装" - if dnf list installed texlive-oscola &>/dev/null; then - LOG_INFO "texlive-oscola已安装,测试结束后将保持安装状态" - already_installed=true - else - LOG_INFO "texlive-oscola未安装,将先安装再卸载" - already_installed=false - fi - - # 检查yum源中是否有texlive-oscola软件包 - LOG_INFO "检查yum源中是否有texlive-oscola软件包" - if ! dnf list available texlive-oscola &>/dev/null; then - LOG_ERROR "yum源中未找到texlive-oscola软件包" - exit 255 - fi - - # 如果未安装,则先安装 - if [ "$already_installed" = false ]; then - LOG_INFO "安装texlive-oscola软件包" - dnf install -y texlive-oscola - CHECK_RESULT $? 0 0 "安装texlive-oscola失败" - fi - - # 验证安装成功 - LOG_INFO "验证texlive-oscola已安装" - dnf list installed texlive-oscola &>/dev/null - CHECK_RESULT $? 0 0 "texlive-oscola安装验证失败" - - # 测试移除/卸载功能 - LOG_INFO "测试移除/卸载texlive-oscola软件包" - dnf remove -y texlive-oscola - CHECK_RESULT $? 0 0 "移除texlive-oscola失败" - - # 验证已卸载 - LOG_INFO "验证texlive-oscola已卸载" - if dnf list installed texlive-oscola &>/dev/null; then - LOG_ERROR "texlive-oscola卸载后仍显示为已安装" - CHECK_RESULT 1 0 0 "卸载验证失败" - else - LOG_INFO "texlive-oscola已成功卸载" - CHECK_RESULT 0 0 0 "" - fi - - # 环境恢复 - LOG_INFO "恢复测试环境" - if [ "$already_installed" = true ]; then - LOG_INFO "重新安装texlive-oscola以恢复原始状态" - dnf install -y texlive-oscola - CHECK_RESULT $? 0 0 "重新安装texlive-oscola失败" - LOG_INFO "环境已恢复到初始安装状态" - else - LOG_INFO "环境已恢复到初始未安装状态" - fi - - LOG_INFO "测试完成:移除/卸载texlive-oscola软件包" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/texlive-oscola_function_compile_basic.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/texlive-oscola_function_compile_basic.sh deleted file mode 100644 index aa6f89c4a11..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-oscola/texlive-oscola_function_compile_basic.sh +++ /dev/null @@ -1,171 +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-21 -# @License : Mulan PSL v2 -# @Desc : Test compiling a basic LaTeX document with oscola package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 定义日志函数 - LOG_INFO() { - echo "[INFO] $*" - } - - LOG_ERROR() { - echo "[ERROR] $*" >&2 - } - - # 检查软件包是否在yum源中 - check_package_in_repo() { - local pkg=$1 - dnf list available "$pkg" &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "软件包 $pkg 不在yum源中" - exit 255 - fi - } - - # 检查命令参数是否支持 - check_command_param() { - local cmd=$1 - local param=$2 - $cmd --help 2>&1 | grep -q "$param" - if [ $? -ne 0 ]; then - LOG_ERROR "命令 $cmd 不支持参数 $param" - exit 255 - fi - } - - # 检查命令执行结果 - check_command_result() { - local result=$1 - local expected=$2 - local error_msg=$3 - if [ $result -ne $expected ]; then - LOG_ERROR "$error_msg" - exit $result - fi - } - - # 检查环境是否已安装 - check_environment_installed() { - LOG_INFO "检查环境是否已安装" - if command -v pdflatex &>/dev/null && command -v tlmgr &>/dev/null; then - LOG_INFO "环境已安装" - ENV_INSTALLED=1 - else - LOG_INFO "环境未安装" - ENV_INSTALLED=0 - fi - } - - # 安装软件包 - install_packages() { - LOG_INFO "安装必要的软件包" - local packages=("texlive" "texlive-oscola" "texlive-latex" "texlive-xetex") - for pkg in "${packages[@]}"; do - check_package_in_repo "$pkg" - done - dnf install -y "${packages[@]}" - check_command_result $? 0 "安装软件包失败" - } - - # 卸载软件包 - uninstall_packages() { - LOG_INFO "卸载软件包" - local packages=("texlive" "texlive-oscola" "texlive-latex" "texlive-xetex") - dnf remove -y "${packages[@]}" - check_command_result $? 0 "卸载软件包失败" - } - - # 创建测试LaTeX文档 - create_test_latex_document() { - LOG_INFO "创建测试LaTeX文档" - cat > test.tex << "EOF" - \documentclass{article} - \usepackage{oscola} - \begin{document} - \title{Test Document} - \author{Test Author} - \maketitle - This is a test document using the oscola package. - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试文档失败" - } - - # 编译LaTeX文档 - compile_latex_document() { - LOG_INFO "编译LaTeX文档" - pdflatex test.tex - CHECK_RESULT $? 0 0 "编译LaTeX文档失败" - } - - # 检查生成的PDF文件 - check_generated_pdf() { - LOG_INFO "检查生成的PDF文件" - if [ -f test.pdf ]; then - LOG_INFO "PDF文件生成成功" - else - LOG_ERROR "PDF文件生成失败" - exit 1 - fi - } - - # 清理测试文件 - clean_test_files() { - LOG_INFO "清理测试文件" - rm -f test.tex test.pdf test.log test.aux test.out - } - - # 主函数 - main() { - LOG_INFO "开始测试:使用oscola包编译基本LaTeX文档" - - # 检查环境是否已安装 - check_environment_installed - - # 如果环境未安装,则安装软件包 - if [ $ENV_INSTALLED -eq 0 ]; then - install_packages - fi - - # 创建测试LaTeX文档 - create_test_latex_document - - # 编译LaTeX文档 - compile_latex_document - - # 检查生成的PDF文件 - check_generated_pdf - - # 清理测试文件 - clean_test_files - - # 如果环境未安装,则卸载软件包 - if [ $ENV_INSTALLED -eq 0 ]; then - uninstall_packages - fi - - LOG_INFO "测试完成" - } - - # 执行主函数 - main -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_basic.sh deleted file mode 100644 index 8dcff521e91..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_basic.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-26 -# @License : Mulan PSL v2 -# @Desc : Test basic ladder diagram generation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装texlive-tikz-ladder - LOG_INFO "检查是否已安装texlive-tikz-ladder" - rpm -q texlive-tikz-ladder > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-tikz-ladder已安装,脚本结束时保持安装状态" - installed=true - else - installed=false - fi - - # 检查yum源中是否有texlive-tikz-ladder软件包 - LOG_INFO "检查yum源中是否有texlive-tikz-ladder软件包" - dnf list available texlive-tikz-ladder > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-tikz-ladder软件包" - exit 255 - fi - - # 安装texlive-tikz-ladder软件包(如果未安装) - if [ "$installed" = false ]; then - LOG_INFO "安装texlive-tikz-ladder软件包" - dnf install -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "安装texlive-tikz-ladder失败" - fi - - # 测试基本的梯形图生成功能 - LOG_INFO "测试基本的梯形图生成功能" - texlua $(kpsewhich --progname=context --format=tex context.lua) --lua=/usr/share/texmf/tex/context/base/mkiv/context.mkiv --lua=/usr/share/texmf/tex/context/base/mkiv/cont-en.lua --lua=/usr/share/texmf/tex/context/base/mkiv/lpdf-ini.lua --lua=/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.lua --lua=/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.lua --lua=/usr/share/texmf/scripts/ladder/ladder.lua --diagram=basic > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "生成梯形图失败" - - # 清理环境(如果之前未安装) - if [ "$installed" = false ]; then - LOG_INFO "卸载texlive-tikz-ladder软件包" - dnf remove -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "卸载texlive-tikz-ladder失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_basic_diagram.sh b/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_basic_diagram.sh deleted file mode 100644 index 301816247b4..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_basic_diagram.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-02-23 -# @License : Mulan PSL v2 -# @Desc : Test generating a basic ladder diagram with default settings -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装texlive-tikz-ladder包 - LOG_INFO "检查是否已安装texlive-tikz-ladder包" - rpm -q texlive-tikz-ladder - if [ $? -eq 0 ]; then - LOG_INFO "texlive-tikz-ladder已安装" - INSTALLED=1 - else - LOG_INFO "texlive-tikz-ladder未安装" - INSTALLED=0 - fi - - # 检查yum源中是否有texlive-tikz-ladder包 - LOG_INFO "检查yum源中是否有texlive-tikz-ladder包" - dnf list available texlive-tikz-ladder > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-tikz-ladder包" - exit 255 - fi - - # 如果未安装,则安装texlive-tikz-ladder包 - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "安装texlive-tikz-ladder包" - dnf install -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "安装texlive-tikz-ladder包失败" - fi - - # 创建测试用的LaTeX文件 - LOG_INFO "创建测试用的LaTeX文件" - cat > test_ladder.tex << "EOF" - \documentclass{article} - \usepackage{tikz} - \usepackage{tikz-ladder} - \begin{document} - \begin{tikzpicture} - \begin{ladder}[rungs=3] - \ladderrung{A}{B} - \ladderrung{C}{D} - \ladderrung{E}{F} - \end{ladder} - \end{tikzpicture} - \end{document} - EOF - - # 检查是否创建成功 - CHECK_RESULT $? 0 0 "创建LaTeX文件失败" - - # 使用pdflatex编译LaTeX文件 - LOG_INFO "使用pdflatex编译LaTeX文件" - pdflatex -interaction=nonstopmode test_ladder.tex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "编译LaTeX文件失败" - - # 检查是否生成了PDF文件 - LOG_INFO "检查是否生成了PDF文件" - if [ -f test_ladder.pdf ]; then - LOG_INFO "成功生成了PDF文件" - CHECK_RESULT 0 0 0 "生成PDF文件失败" - else - LOG_ERROR "未生成PDF文件" - CHECK_RESULT 1 0 1 "生成PDF文件失败" - fi - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f test_ladder.tex test_ladder.log test_ladder.aux test_ladder.pdf - CHECK_RESULT $? 0 0 "清理测试文件失败" - - # 如果之前未安装,则卸载texlive-tikz-ladder包 - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载texlive-tikz-ladder包" - dnf remove -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "卸载texlive-tikz-ladder包失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_compile_tex.sh b/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_compile_tex.sh deleted file mode 100644 index 70984b20e31..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_compile_tex.sh +++ /dev/null @@ -1,95 +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 document containing a tikz-ladder diagram -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "测试编译包含tikz-ladder图的LaTeX文档" - - # 检查是否已安装texlive-tikz-ladder软件包 - LOG_INFO "检查texlive-tikz-ladder是否已安装" - rpm -q texlive-tikz-ladder > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-tikz-ladder已安装,脚本结束时将保持安装状态" - installed=true - else - LOG_INFO "texlive-tikz-ladder未安装,将在测试过程中安装" - installed=false - fi - - # 检查yum源中是否有texlive-tikz-ladder软件包 - LOG_INFO "检查yum源中是否有texlive-tikz-ladder软件包" - dnf list available texlive-tikz-ladder > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "yum源中未找到texlive-tikz-ladder软件包" - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-tikz-ladder软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$installed" = false ]; then - LOG_INFO "安装texlive-tikz-ladder软件包" - dnf install -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "安装texlive-tikz-ladder失败" - fi - - # 创建测试LaTeX文档 - LOG_INFO "创建测试LaTeX文档" - cat > test_tikz_ladder.tex << "EOF" - \documentclass{article} - \usepackage{tikz} - \usetikzlibrary{ladders} - \begin{document} - \begin{tikzpicture} - \draw[thick] (0,0) -- (2,0) -- (2,2) -- (0,2) -- cycle; - \draw (0.5,0.5) node {Test}; - \end{tikzpicture} - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试LaTeX文档失败" - - # 编译LaTeX文档 - LOG_INFO "编译LaTeX文档" - pdflatex -interaction=nonstopmode test_tikz_ladder.tex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "编译LaTeX文档失败" - - # 检查生成的PDF文件 - LOG_INFO "检查生成的PDF文件" - if [ -f test_tikz_ladder.pdf ]; then - LOG_INFO "PDF文件生成成功" - else - LOG_ERROR "PDF文件生成失败" - exit 1 - fi - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f test_tikz_ladder.tex test_tikz_ladder.pdf test_tikz_ladder.aux test_tikz_ladder.log test_tikz_ladder.out - - # 如果测试前未安装,则卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载texlive-tikz-ladder软件包" - dnf remove -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "卸载texlive-tikz-ladder失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_custom_elements.sh b/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_custom_elements.sh deleted file mode 100644 index 83cf8e95163..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_custom_elements.sh +++ /dev/null @@ -1,95 +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 creating a ladder diagram with custom contacts and coils -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test creating a ladder diagram with custom contacts and coils" - - LOG_INFO "步骤1:检查系统中是否已安装texlive-tikz-ladder软件包" - if dnf list installed texlive-tikz-ladder &>/dev/null; then - LOG_INFO "texlive-tikz-ladder软件包已安装,测试结束后将保持安装状态" - INSTALLED_BEFORE_TEST=true - else - LOG_INFO "texlive-tikz-ladder软件包未安装,将在测试中安装,并在测试结束后卸载" - INSTALLED_BEFORE_TEST=false - fi - - LOG_INFO "步骤2:检查yum源中是否有texlive-tikz-ladder软件包" - if ! dnf list available texlive-tikz-ladder &>/dev/null; then - LOG_ERROR "yum源中未找到texlive-tikz-ladder软件包" - exit 255 - fi - - if [ "$INSTALLED_BEFORE_TEST" = "false" ]; then - LOG_INFO "步骤3:安装texlive-tikz-ladder软件包" - dnf install -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "安装texlive-tikz-ladder软件包失败" - fi - - LOG_INFO "步骤4:验证ladder包是否可用并测试自定义触点/线圈功能" - TEST_TEX_FILE="/tmp/test_ladder_custom.tex" - cat > $TEST_TEX_FILE << "EOF" - \documentclass{article} - \usepackage{tikz} - \usepackage{ladder} - \begin{document} - \begin{tikzpicture} - \ladder{2} - \rung{1}{$I1$}{$Q1$} - \rung{2}{$I2$}{$Q2$} - \coil[coiltype=reverse]{1}{Q1} - \contact[contacttype=NC]{2}{I2} - \end{tikzpicture} - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试TeX文件失败" - - LOG_INFO "步骤5:使用pdflatex编译测试文件(首次编译可能生成辅助文件)" - pdflatex -interaction=nonstopmode -halt-on-error $TEST_TEX_FILE &>/tmp/pdflatex1.log - CHECK_RESULT $? 0 0 "第一次pdflatex编译失败,请检查/tmp/pdflatex1.log" - - LOG_INFO "步骤6:再次编译以确保交叉引用正确" - pdflatex -interaction=nonstopmode -halt-on-error $TEST_TEX_FILE &>/tmp/pdflatex2.log - CHECK_RESULT $? 0 0 "第二次pdflatex编译失败,请检查/tmp/pdflatex2.log" - - LOG_INFO "步骤7:检查是否成功生成PDF文件" - if [ -f "${TEST_TEX_FILE%.tex}.pdf" ]; then - LOG_INFO "成功生成包含自定义触点/线圈的梯形图PDF文件" - else - LOG_ERROR "未找到生成的PDF文件" - exit 1 - fi - - LOG_INFO "步骤8:清理生成的临时文件" - rm -f /tmp/test_ladder_custom.* /tmp/pdflatex*.log - - if [ "$INSTALLED_BEFORE_TEST" = "false" ]; then - LOG_INFO "步骤9:卸载测试安装的texlive-tikz-ladder软件包" - dnf remove -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "卸载texlive-tikz-ladder软件包失败" - LOG_INFO "环境已恢复:texlive-tikz-ladder软件包已卸载" - else - LOG_INFO "环境已恢复:保持texlive-tikz-ladder软件包安装状态" - fi - - LOG_INFO "测试完成:Test creating a ladder diagram with custom contacts and coils" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_multiple_rungs.sh b/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_multiple_rungs.sh deleted file mode 100644 index 0c8462a19b3..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-x/texlive-tikz-ladder/test_texlive-tikz-ladder_function_multiple_rungs.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-02-23 -# @License : Mulan PSL v2 -# @Desc : Test generating a ladder diagram with multiple rungs -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:生成具有多个横档的梯形图" - - # 检查是否已安装texlive-tikz-ladder包 - LOG_INFO "检查texlive-tikz-ladder软件包是否已安装" - if dnf list installed texlive-tikz-ladder &>/dev/null; then - LOG_INFO "texlive-tikz-ladder已安装,测试后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-tikz-ladder未安装,将在测试中安装并最终卸载" - INSTALLED=false - fi - - # 检查yum源中是否存在texlive-tikz-ladder包 - LOG_INFO "检查yum源中是否存在texlive-tikz-ladder软件包" - if ! dnf list available texlive-tikz-ladder &>/dev/null; then - LOG_ERROR "yum源中不存在texlive-tikz-ladder软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装texlive-tikz-ladder软件包" - dnf install -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "安装texlive-tikz-ladder失败" - fi - - # 测试生成具有多个横档的梯形图 - LOG_INFO "测试生成具有多个横档的梯形图" - cat > test_ladder.tex << "EOF" - \documentclass{article} - \usepackage{tikz} - \usetikzlibrary{ladder} - \begin{document} - \begin{tikzpicture} - \ladder{2} % 两个横档 - \end{tikzpicture} - \end{document} - EOF - - # 编译LaTeX文档 - LOG_INFO "编译LaTeX文档" - pdflatex test_ladder.tex - CHECK_RESULT $? 0 0 "编译LaTeX文档失败" - - # 检查生成的PDF文件 - LOG_INFO "检查生成的PDF文件" - if [ -f test_ladder.pdf ]; then - LOG_INFO "成功生成PDF文件" - else - LOG_ERROR "未生成PDF文件" - exit 1 - fi - - # 清理测试文件 - LOG_INFO "清理测试生成的文件" - rm -f test_ladder.tex test_ladder.log test_ladder.aux test_ladder.pdf - - # 如果测试前未安装,则卸载软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载texlive-tikz-ladder软件包" - dnf remove -y texlive-tikz-ladder - CHECK_RESULT $? 0 0 "卸载texlive-tikz-ladder失败" - fi - - LOG_INFO "测试完成:成功生成具有多个横档的梯形图" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/tre/tre-devel/test_tre-devel_function_basic.sh b/testcases/function_test/pkg_test/tre/tre-devel/test_tre-devel_function_basic.sh deleted file mode 100644 index b1ff538ccc5..00000000000 --- a/testcases/function_test/pkg_test/tre/tre-devel/test_tre-devel_function_basic.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-06 -# @License : Mulan PSL v2 -# @Desc : Test basic functionality of tre-devel library -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 测试tre-devel库的基本功能 - LOG_INFO "开始测试tre-devel库的基本功能" - - # 检查yum源中是否存在tre-devel软件包 - LOG_INFO "检查yum源中是否存在tre-devel软件包" - dnf list available tre-devel > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在tre-devel软件包" - exit 255 - fi - - # 检查是否已安装tre-devel - LOG_INFO "检查是否已安装tre-devel" - rpm -q tre-devel > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "tre-devel已安装,测试结束后保持安装状态" - installed=true - else - LOG_INFO "tre-devel未安装,将进行安装测试" - installed=false - fi - - # 安装tre-devel软件包 - if [ "$installed" = false ]; then - LOG_INFO "安装tre-devel软件包" - dnf install -y tre-devel - CHECK_RESULT $? 0 0 "安装tre-devel失败" - fi - - # 测试基本功能 - LOG_INFO "测试tre-devel库的基本功能" - # 假设有一个测试命令test_tre_functionality,这里仅为示例 - test_tre_functionality --basic > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "测试tre-devel库基本功能失败" - - # 清理环境:如果测试前未安装tre-devel,则卸载 - if [ "$installed" = false ]; then - LOG_INFO "卸载tre-devel软件包" - dnf remove -y tre-devel - CHECK_RESULT $? 0 0 "卸载tre-devel失败" - - # 确认卸载成功 - rpm -q tre-devel > /dev/null 2>&1 - CHECK_RESULT $? 1 0 "卸载后tre-devel仍存在" - fi - - LOG_INFO "完成测试tre-devel库的基本功能" - -} - -main "$@" \ No newline at end of file