Merge branch 'pkg' of http://10.30.190.190:54866/redrsoe2100/os-autotest into pkg
This commit is contained in:
@@ -2,30 +2,6 @@
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/icedtea-web/icedtea-web-help",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_icedtea-web-help_function_basic",
|
||||
"desc": "Test basic functionality of icedtea-web-help"
|
||||
},
|
||||
{
|
||||
"name": "test_icedtea-web-help_function_version",
|
||||
"desc": "Test version display functionality"
|
||||
},
|
||||
{
|
||||
"name": "test_icedtea-web-help_function_install",
|
||||
"desc": "Test installation of icedtea-web-help package"
|
||||
},
|
||||
{
|
||||
"name": "test_icedtea-web-help_function_uninstall",
|
||||
"desc": "Test removal of icedtea-web-help package"
|
||||
},
|
||||
{
|
||||
"name": "test_icedtea-web-help_function_check_installed",
|
||||
"desc": "Test verification of package installation status"
|
||||
},
|
||||
{
|
||||
"name": "test_icedtea-web-help_function_help_display",
|
||||
"desc": "Test display of help information"
|
||||
},
|
||||
{
|
||||
"name": "test_icedtea-web-help_function_man_page",
|
||||
"desc": "Test accessibility of manual page"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/netcf/netcf-devel",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_netcf-devel_function_uninstall",
|
||||
"desc": "Test uninstallation of netcf-devel package"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6,26 +6,6 @@
|
||||
"name": "test_nodejs-is-my-json-valid_install_package",
|
||||
"desc": "测试安装 nodejs-is-my-json-valid 软件包",
|
||||
"machine num": 1
|
||||
},
|
||||
{
|
||||
"name": "test_nodejs-is-my-json-valid_function_validate_json",
|
||||
"desc": "测试使用nodejs-is-my-json-valid软件包验证有效的JSON数据"
|
||||
},
|
||||
{
|
||||
"name": "test_nodejs-is-my-json-valid_function_invalid_json",
|
||||
"desc": "测试使用nodejs-is-my-json-valid软件包验证无效的JSON数据"
|
||||
},
|
||||
{
|
||||
"name": "test_nodejs-is-my-json-valid_function_custom_format",
|
||||
"desc": "测试使用nodejs-is-my-json-valid软件包的自定义格式验证功能"
|
||||
},
|
||||
{
|
||||
"name": "test_nodejs-is-my-json-valid_function_error_report",
|
||||
"desc": "测试nodejs-is-my-json-valid软件包的详细错误报告功能"
|
||||
},
|
||||
{
|
||||
"name": "test_nodejs-is-my-json-valid_function_uninstall_pkg",
|
||||
"desc": "测试卸载nodejs-is-my-json-valid软件包"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -10,10 +10,6 @@
|
||||
"name": "test_python3-gunicorn_gunicorn__h",
|
||||
"desc": "测试 gunicorn 命令的 -h 参数,显示帮助信息"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-gunicorn_gunicorn__c_CONFIG",
|
||||
"desc": "测试 gunicorn 命令的 -c 参数,指定配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-gunicorn_gunicorn__b_ADDRESS",
|
||||
"desc": "测试 gunicorn 命令的 -b 参数,绑定套接字地址"
|
||||
@@ -21,26 +17,6 @@
|
||||
{
|
||||
"name": "test_python3-gunicorn_gunicorn__w_num_1",
|
||||
"desc": "测试 gunicorn 命令的 -w 参数,指定工作进程数量为1"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-gunicorn_gunicorn__k_STRING",
|
||||
"desc": "测试 gunicorn 命令的 -k 参数,指定工作进程类型为 sync"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-gunicorn_gunicorn__t_num_30",
|
||||
"desc": "测试 gunicorn 命令的 -t 参数,设置超时时间为30秒"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-gunicorn_gunicorn__reload",
|
||||
"desc": "测试 gunicorn 命令的 --reload 参数,代码变更时重启工作进程"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-gunicorn_gunicorn__upper_d",
|
||||
"desc": "测试 gunicorn 命令的 -D 参数,以守护进程模式运行"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-gunicorn_function_logging",
|
||||
"desc": "测试 gunicorn 的日志记录功能"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/python-progressbar2/python-progressbar2-help",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_python-progressbar2-help_function_basic",
|
||||
"desc": "Test basic functionality of progressbar2-help"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6,38 +6,6 @@
|
||||
"name": "test_rubygem-faraday-net_http-help_install",
|
||||
"desc": "测试软件包的安装功能,验证是否能够成功安装rubygem-faraday-net_http-help。",
|
||||
"machine num": 1
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-faraday-net_http-help_function_connect",
|
||||
"desc": "测试软件包的连接功能,验证是否能成功建立网络连接。"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-faraday-net_http-help_uninstall",
|
||||
"desc": "测试软件包的卸载功能,验证是否能够完全卸载且无残留。"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-faraday-net_http-help_function_basic_http",
|
||||
"desc": "测试基本HTTP请求功能,验证是否能发起GET/POST请求。"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-faraday-net_http-help_function_ssl_verify",
|
||||
"desc": "测试SSL/TLS连接功能,验证安全连接是否正常。"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-faraday-net_http-help_function_headers",
|
||||
"desc": "测试请求头设置功能,验证自定义头信息是否生效。"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-faraday-net_http-help_function_params",
|
||||
"desc": "测试请求参数处理功能,验证查询参数是否正确附加。"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-faraday-net_http-help_function_response",
|
||||
"desc": "测试响应处理功能,验证能正确解析状态码和响应体。"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-faraday-net_http-help_function_error_handle",
|
||||
"desc": "测试错误处理功能,验证网络异常或超时能被捕获。"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -18,10 +18,6 @@
|
||||
{
|
||||
"name": "test_texlive-anyfontsize_function_remove",
|
||||
"desc": "测试 texlive-anyfontsize 软件包的卸载功能,验证是否能通过包管理器成功卸载。"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-anyfontsize_function_usage",
|
||||
"desc": "测试 texlive-anyfontsize 软件包的核心功能,验证其提供的 LaTeX 命令(如 \\fontsize{}{})能否在文档中正常工作并生成指定大小的字体。"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -10,10 +10,6 @@
|
||||
"name": "test_texlive-datetime2-en-fulltext-doc_remove",
|
||||
"desc": "测试软件包是否能成功卸载"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-datetime2-en-fulltext-doc_check_installed",
|
||||
"desc": "测试软件包是否已正确安装到系统中"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-datetime2-en-fulltext-doc_doc_access",
|
||||
"desc": "测试软件包文档文件的存在性和可访问性"
|
||||
|
||||
@@ -2,29 +2,9 @@
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-h/texlive-extract-doc",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-extract-doc_function_extract",
|
||||
"desc": "Test doc extraction"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-extract-doc_function_install",
|
||||
"desc": "Test package installation"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-extract-doc_function_remove",
|
||||
"desc": "Test package removal"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-extract-doc_function_extract_doc",
|
||||
"desc": "Test doc extraction"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-extract-doc_function_list_pkgs",
|
||||
"desc": "Test list packages"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-extract-doc_function_help",
|
||||
"desc": "Test help output"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,25 +7,9 @@
|
||||
"desc": "测试 texlive-ifthenx 软件包的安装功能,验证是否能够正确安装到系统中。",
|
||||
"machine num": 1
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-ifthenx_remove",
|
||||
"desc": "测试 texlive-ifthenx 软件包的卸载功能,验证是否能够完全、干净地从系统中移除。"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-ifthenx_version",
|
||||
"desc": "测试 texlive-ifthenx 软件包的版本查询功能,验证能否正确获取其版本信息。"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-ifthenx_basic_cmd",
|
||||
"desc": "测试 texlive-ifthenx 提供的基本条件判断命令(如 \\ifthenelse)在简单 LaTeX 文档中能否正常工作。"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-ifthenx_logic_ops",
|
||||
"desc": "测试 texlive-ifthenx 提供的逻辑运算符(如 AND, OR, NOT)在条件判断中的功能是否正确。"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-ifthenx_numeric_comp",
|
||||
"desc": "测试 texlive-ifthenx 提供的数值比较功能(如等于、大于、小于)在条件判断中的正确性。"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -18,14 +18,6 @@
|
||||
{
|
||||
"name": "test_texlive-tablefootnote_function_check",
|
||||
"desc": "测试检查texlive-tablefootnote软件包是否已安装"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tablefootnote_function_usage",
|
||||
"desc": "测试使用texlive-tablefootnote宏包编译基本LaTeX文档"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tablefootnote_function_placement",
|
||||
"desc": "测试表格脚注在表格底部和页面底部的定位功能"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-w/texlive-texworks-doc",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-texworks-doc_function_doc_access",
|
||||
"desc": "Verify access to documentation files"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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-11-30
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test basic functionality of icedtea-web-help
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 检查yum源中是否存在icedtea-web-help软件包
|
||||
LOG_INFO "检查yum源中是否存在icedtea-web-help软件包"
|
||||
dnf list available icedtea-web-help > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在icedtea-web-help软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装icedtea-web-help
|
||||
LOG_INFO "检查是否已安装icedtea-web-help"
|
||||
rpm -q icedtea-web-help > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
installed=true
|
||||
LOG_INFO "icedtea-web-help已安装"
|
||||
else
|
||||
installed=false
|
||||
LOG_INFO "icedtea-web-help未安装,将进行安装"
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "安装icedtea-web-help软件包"
|
||||
dnf install -y icedtea-web-help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "安装icedtea-web-help失败"
|
||||
fi
|
||||
|
||||
# 测试--help参数功能
|
||||
LOG_INFO "测试--help参数功能"
|
||||
icedtea-web-help --help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "--help参数不支持或执行失败"
|
||||
|
||||
# 测试无效参数
|
||||
LOG_INFO "测试无效参数"
|
||||
icedtea-web-help --invalid-parameter > /dev/null 2>&1
|
||||
if [ $? -ne 255 ]; then
|
||||
LOG_ERROR "无效参数未返回预期退出码255"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 清理环境
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载icedtea-web-help软件包"
|
||||
dnf remove -y icedtea-web-help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "卸载icedtea-web-help失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完毕,环境已恢复"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 : 2026-03-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test verification of package installation status
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "测试开始:验证软件包安装状态"
|
||||
LOG_INFO "步骤1:检查yum源中是否存在icedtea-web-help软件包"
|
||||
dnf list available icedtea-web-help &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到icedtea-web-help软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查当前环境中是否已安装icedtea-web-help软件包"
|
||||
rpm -q icedtea-web-help &>/dev/null
|
||||
INSTALLED=$?
|
||||
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "环境已安装icedtea-web-help,将保持此状态"
|
||||
ALREADY_INSTALLED=true
|
||||
else
|
||||
LOG_INFO "环境未安装icedtea-web-help,将执行安装"
|
||||
ALREADY_INSTALLED=false
|
||||
fi
|
||||
|
||||
if [ "$ALREADY_INSTALLED" = "false" ]; then
|
||||
LOG_INFO "步骤3:安装icedtea-web-help软件包"
|
||||
dnf install -y icedtea-web-help
|
||||
CHECK_RESULT $? 0 0 "安装icedtea-web-help软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:验证安装状态"
|
||||
rpm -q icedtea-web-help
|
||||
CHECK_RESULT $? 0 0 "验证icedtea-web-help安装状态失败"
|
||||
|
||||
LOG_INFO "步骤5:执行清理,恢复环境"
|
||||
if [ "$ALREADY_INSTALLED" = "false" ]; then
|
||||
LOG_INFO "卸载测试安装的icedtea-web-help软件包"
|
||||
dnf remove -y icedtea-web-help
|
||||
CHECK_RESULT $? 0 0 "卸载icedtea-web-help软件包失败"
|
||||
LOG_INFO "环境已恢复到未安装状态"
|
||||
else
|
||||
LOG_INFO "环境保持原有安装状态,无需清理"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:验证软件包安装状态"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,73 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-03-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test display of help information
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test display of help information"
|
||||
LOG_INFO "步骤1:检查icedtea-web-help软件包是否在yum源中"
|
||||
dnf list available icedtea-web-help > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到icedtea-web-help软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查icedtea-web-help是否已安装"
|
||||
if rpm -q icedtea-web-help > /dev/null 2>&1; then
|
||||
INSTALLED="true"
|
||||
LOG_INFO "icedtea-web-help已安装,测试后保持安装状态"
|
||||
else
|
||||
INSTALLED="false"
|
||||
LOG_INFO "icedtea-web-help未安装,将在测试中安装"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤3:如果未安装,则安装icedtea-web-help软件包"
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
dnf install -y icedtea-web-help
|
||||
CHECK_RESULT $? 0 0 "安装icedtea-web-help失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:测试icedtea-web-help命令的help参数"
|
||||
LOG_INFO "执行命令:icedtea-web-help --help"
|
||||
icedtea-web-help --help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "icedtea-web-help --help命令执行失败"
|
||||
|
||||
LOG_INFO "步骤5:测试icedtea-web-help命令的无效参数"
|
||||
LOG_INFO "执行命令:icedtea-web-help --invalid-param"
|
||||
icedtea-web-help --invalid-param > /dev/null 2>&1
|
||||
if [ $? -eq 255 ]; then
|
||||
LOG_INFO "无效参数处理正确,返回退出码255"
|
||||
else
|
||||
LOG_ERROR "无效参数处理不正确"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤6:清理环境,恢复原始状态"
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "卸载测试安装的icedtea-web-help软件包"
|
||||
dnf remove -y icedtea-web-help
|
||||
CHECK_RESULT $? 0 0 "卸载icedtea-web-help失败"
|
||||
else
|
||||
LOG_INFO "测试前已安装,保持安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test display of help information"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,82 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-03-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test installation of icedtea-web-help package
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "测试开始:Test installation of icedtea-web-help package"
|
||||
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="icedtea-web-help"
|
||||
|
||||
# 步骤1:检查yum源中是否有icedtea-web-help软件包
|
||||
LOG_INFO "步骤1:检查yum源中是否有${PACKAGE_NAME}软件包"
|
||||
dnf list available "${PACKAGE_NAME}" &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中没有找到${PACKAGE_NAME}软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤2:检查当前环境是否已经安装了icedtea-web-help
|
||||
LOG_INFO "步骤2:检查当前环境是否已经安装了${PACKAGE_NAME}"
|
||||
rpm -q "${PACKAGE_NAME}" &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "${PACKAGE_NAME}已经安装,标记为已安装状态"
|
||||
INSTALLED="true"
|
||||
else
|
||||
LOG_INFO "${PACKAGE_NAME}未安装,标记为未安装状态"
|
||||
INSTALLED="false"
|
||||
fi
|
||||
|
||||
# 步骤3:如果未安装,则执行安装
|
||||
if [ "${INSTALLED}" = "false" ]; then
|
||||
LOG_INFO "步骤3:安装${PACKAGE_NAME}软件包"
|
||||
dnf install -y "${PACKAGE_NAME}"
|
||||
CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}失败"
|
||||
fi
|
||||
|
||||
# 步骤4:验证安装是否成功
|
||||
LOG_INFO "步骤4:验证${PACKAGE_NAME}是否安装成功"
|
||||
rpm -q "${PACKAGE_NAME}"
|
||||
CHECK_RESULT $? 0 0 "验证${PACKAGE_NAME}安装状态失败"
|
||||
|
||||
# 步骤5:测试icedtea-web-help命令的帮助功能
|
||||
LOG_INFO "步骤5:测试icedtea-web-help命令的帮助功能"
|
||||
which icedtea-web-help &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "icedtea-web-help命令不存在或不支持"
|
||||
exit 255
|
||||
fi
|
||||
icedtea-web-help --help
|
||||
CHECK_RESULT $? 0 0 "执行icedtea-web-help --help失败"
|
||||
|
||||
# 步骤6:环境恢复
|
||||
LOG_INFO "步骤6:环境恢复"
|
||||
if [ "${INSTALLED}" = "false" ]; then
|
||||
LOG_INFO "卸载${PACKAGE_NAME}软件包"
|
||||
dnf remove -y "${PACKAGE_NAME}"
|
||||
CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}失败"
|
||||
else
|
||||
LOG_INFO "${PACKAGE_NAME}在测试前已安装,保持安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试结束:Test installation of icedtea-web-help package"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 : 2026-03-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test removal of icedtea-web-help package
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test removal of icedtea-web-help package"
|
||||
LOG_INFO "步骤1:检查yum源中是否存在icedtea-web-help软件包"
|
||||
dnf list available icedtea-web-help 2>/dev/null | grep -q "icedtea-web-help"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到icedtea-web-help软件包"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "步骤2:检查当前环境是否已安装icedtea-web-help软件包"
|
||||
rpm -q icedtea-web-help >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "icedtea-web-help软件包已安装,标记为需要保持安装状态"
|
||||
INSTALLED_BEFORE=1
|
||||
else
|
||||
LOG_INFO "icedtea-web-help软件包未安装,标记为需要测试安装和卸载"
|
||||
INSTALLED_BEFORE=0
|
||||
fi
|
||||
if [ $INSTALLED_BEFORE -eq 0 ]; then
|
||||
LOG_INFO "步骤3:安装icedtea-web-help软件包"
|
||||
dnf install -y icedtea-web-help
|
||||
CHECK_RESULT $? 0 0 "安装icedtea-web-help软件包失败"
|
||||
fi
|
||||
LOG_INFO "步骤4:验证软件包安装成功"
|
||||
rpm -q icedtea-web-help
|
||||
CHECK_RESULT $? 0 0 "验证icedtea-web-help软件包安装状态失败"
|
||||
LOG_INFO "步骤5:执行卸载命令(模拟测试卸载功能)"
|
||||
dnf remove -y icedtea-web-help
|
||||
CHECK_RESULT $? 0 0 "卸载icedtea-web-help软件包失败"
|
||||
LOG_INFO "步骤6:验证软件包已卸载"
|
||||
rpm -q icedtea-web-help >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "卸载后icedtea-web-help软件包仍然存在"
|
||||
CHECK_RESULT 1 0 0 "卸载验证失败"
|
||||
else
|
||||
LOG_INFO "卸载验证成功,icedtea-web-help软件包已不存在"
|
||||
fi
|
||||
if [ $INSTALLED_BEFORE -eq 0 ]; then
|
||||
LOG_INFO "步骤7:测试环境清理,恢复初始未安装状态(已通过卸载完成)"
|
||||
else
|
||||
LOG_INFO "步骤7:环境恢复,重新安装icedtea-web-help软件包以保持初始状态"
|
||||
dnf install -y icedtea-web-help
|
||||
CHECK_RESULT $? 0 0 "重新安装icedtea-web-help软件包失败"
|
||||
LOG_INFO "环境已恢复到初始安装状态"
|
||||
fi
|
||||
LOG_INFO "测试完成:Test removal of icedtea-web-help package"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 version display functionality
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test version display functionality"
|
||||
|
||||
# 检查是否已安装icedtea-web
|
||||
LOG_INFO "检查icedtea-web是否已安装"
|
||||
if rpm -q icedtea-web &>/dev/null; then
|
||||
LOG_INFO "icedtea-web已安装,测试结束后将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "icedtea-web未安装,测试结束后将卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有icedtea-web
|
||||
LOG_INFO "检查yum源中是否有icedtea-web"
|
||||
if ! dnf list available icedtea-web &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到icedtea-web"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装icedtea-web(如果未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "正在安装icedtea-web"
|
||||
dnf install -y icedtea-web
|
||||
CHECK_RESULT $? 0 0 "安装icedtea-web失败"
|
||||
fi
|
||||
|
||||
# 测试version参数功能
|
||||
LOG_INFO "测试icedtea-web --version功能"
|
||||
icedtea-web --version &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "icedtea-web --version执行失败"
|
||||
|
||||
# 清理环境(如果测试前未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "正在卸载icedtea-web"
|
||||
dnf remove -y icedtea-web
|
||||
CHECK_RESULT $? 0 0 "卸载icedtea-web失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test version display functionality"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-09-12
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test uninstallation of netcf-devel package
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已安装netcf-devel软件包
|
||||
LOG_INFO "检查是否已安装netcf-devel软件包"
|
||||
rpm -q netcf-devel > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "netcf-devel软件包已安装"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "netcf-devel软件包未安装"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否存在netcf-devel软件包
|
||||
LOG_INFO "检查yum源中是否存在netcf-devel软件包"
|
||||
dnf list available netcf-devel > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 255 "yum源中不存在netcf-devel软件包"
|
||||
|
||||
# 如果未安装,则安装netcf-devel软件包作为测试步骤
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装netcf-devel软件包"
|
||||
dnf install -y netcf-devel
|
||||
CHECK_RESULT $? 0 0 "安装netcf-devel软件包失败"
|
||||
fi
|
||||
|
||||
# 测试卸载netcf-devel软件包的功能
|
||||
LOG_INFO "测试卸载netcf-devel软件包的功能"
|
||||
dnf remove -y netcf-devel
|
||||
CHECK_RESULT $? 0 0 "卸载netcf-devel软件包失败"
|
||||
|
||||
# 如果最初未安装,则重新安装netcf-devel软件包以恢复环境
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "恢复环境,重新安装netcf-devel软件包"
|
||||
dnf install -y netcf-devel
|
||||
CHECK_RESULT $? 0 0 "重新安装netcf-development工具失败"
|
||||
else
|
||||
LOG_INFO "环境已恢复,无需重新安装netcdf-development工具"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完毕"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,79 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-04-06
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试nodejs-is-my-json-valid软件包的详细错误报告功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
set -e
|
||||
|
||||
LOG_INFO "开始测试nodejs-is-my-json-valid软件包的详细错误报告功能"
|
||||
|
||||
LOG_INFO "步骤1:检查系统中是否已安装nodejs-is-my-json-valid软件包"
|
||||
if dnf list installed nodejs-is-my-json-valid >/dev/null 2>&1; then
|
||||
LOG_INFO "nodejs-is-my-json-valid已安装,脚本结束后将保持安装状态"
|
||||
INSTALLED_BEFORE=true
|
||||
else
|
||||
LOG_INFO "nodejs-is-my-json-valid未安装,将在测试过程中安装"
|
||||
INSTALLED_BEFORE=false
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查yum源中是否存在nodejs-is-my-json-valid软件包"
|
||||
if ! dnf list available nodejs-is-my-json-valid >/dev/null 2>&1; then
|
||||
LOG_ERROR "yum源中未找到nodejs-is-my-json-valid软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤3:安装nodejs-is-my-json-valid软件包"
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
dnf install -y nodejs-is-my-json-valid
|
||||
CHECK_RESULT $? 0 0 "安装nodejs-is-my-json-valid失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:验证nodejs-is-my-json-valid命令是否存在"
|
||||
if ! command -v is-my-json-valid >/dev/null 2>&1; then
|
||||
LOG_ERROR "is-my-json-valid命令不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤5:测试is-my-json-valid命令的基本参数"
|
||||
is-my-json-valid --help >/dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "is-my-json-valid命令--help参数不支持"
|
||||
|
||||
LOG_INFO "步骤6:测试详细错误报告功能"
|
||||
TEST_SCHEMA="{"type": "object", "properties": {"name": {"type": "string"}, "age": {"type": "integer"}}, "required": ["name", "age"]}"
|
||||
TEST_INVALID_JSON="{"name": "test"}"
|
||||
ERROR_OUTPUT=$(echo "$TEST_INVALID_JSON" | is-my-json-validate --schema="$TEST_SCHEMA" --verbose 2>&1)
|
||||
if echo "$ERROR_OUTPUT" | grep -q "missing required property"; then
|
||||
LOG_INFO "详细错误报告功能正常:$ERROR_OUTPUT"
|
||||
else
|
||||
LOG_ERROR "详细错误报告功能异常:$ERROR_OUTPUT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤7:清理测试环境"
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "卸载nodejs-is-my-json-valid软件包"
|
||||
dnf remove -y nodejs-is-my-json-valid
|
||||
CHECK_RESULT $? 0 0 "卸载nodejs-is-my-json-valid失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,85 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-04-06
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试使用nodejs-is-my-json-valid软件包验证无效的JSON数据
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
set -e
|
||||
|
||||
LOG_INFO "开始测试:使用nodejs-is-my-json-valid软件包验证无效的JSON数据"
|
||||
|
||||
# 步骤1:检查nodejs-is-my-json-valid软件包是否在yum源中
|
||||
LOG_INFO "检查nodejs-is-my-json-valid软件包是否在yum源中"
|
||||
if ! dnf list available nodejs-is-my-json-valid &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到nodejs-is-my-json-valid软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤2:检查当前环境是否已安装nodejs-is-my-json-valid
|
||||
LOG_INFO "检查当前环境是否已安装nodejs-is-my-json-valid"
|
||||
if rpm -q nodejs-is-my-json-valid &>/dev/null; then
|
||||
LOG_INFO "检测到nodejs-is-my-json-valid已安装,标记为保持安装状态"
|
||||
KEEP_INSTALLED=true
|
||||
else
|
||||
LOG_INFO "nodejs-is-my-json-valid未安装,将在测试步骤中安装"
|
||||
KEEP_INSTALLED=false
|
||||
fi
|
||||
|
||||
# 步骤3:如果未安装,则安装nodejs-is-my-json-valid
|
||||
if [ "$KEEP_INSTALLED" = false ]; then
|
||||
LOG_INFO "安装nodejs-is-my-json-valid软件包"
|
||||
dnf install -y nodejs-is-my-json-valid
|
||||
CHECK_RESULT $? 0 0 "安装nodejs-is-my-json-valid失败"
|
||||
fi
|
||||
|
||||
# 步骤4:验证无效的JSON数据
|
||||
LOG_INFO "创建包含无效JSON数据的测试文件"
|
||||
cat > /tmp/invalid.json << "EOF"
|
||||
{
|
||||
"name": "test",
|
||||
"age": "not_a_number",
|
||||
"email": "invalid-email"
|
||||
}
|
||||
EOF
|
||||
|
||||
LOG_INFO "使用nodejs-is-my-json-valid验证无效的JSON数据"
|
||||
# 假设使用一个简单的Node.js脚本来调用该包验证JSON,这里使用一个示例命令
|
||||
# 注意:实际命令可能根据软件包的具体用法有所不同,这里仅为示例
|
||||
VALIDATION_CMD="node -e \"const validator = require("is-my-json-valid"); const validate = validator({type: "object", properties: {name: {type: "string"}, age: {type: "number"}, email: {type: "string", format: "email"}}, required: ["name", "age", "email"]}); const data = require("/tmp/invalid.json"); console.log(validate(data)); console.log(validate.errors);\""
|
||||
eval $VALIDATION_CMD
|
||||
# 预期验证失败,所以检查退出码非0
|
||||
CHECK_RESULT $? 0 1 "验证无效JSON数据时预期失败但未失败"
|
||||
|
||||
# 步骤5:清理测试文件
|
||||
LOG_INFO "清理测试文件"
|
||||
rm -f /tmp/invalid.json
|
||||
|
||||
# 步骤6:如果测试前未安装,则卸载nodejs-is-my-json-valid
|
||||
if [ "$KEEP_INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载nodejs-is-my-json-valid软件包"
|
||||
dnf remove -y nodejs-is-my-json-valid
|
||||
CHECK_RESULT $? 0 0 "卸载nodejs-is-my-json-valid失败"
|
||||
else
|
||||
LOG_INFO "保持nodejs-is-my-json-valid软件包的安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:使用nodejs-is-my-json-valid软件包验证无效的JSON数据"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-12-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 gunicorn 的日志记录功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试 gunicorn 的日志记录功能"
|
||||
|
||||
# 检查是否已安装 python3-gunicorn
|
||||
LOG_INFO "检查是否已安装 python3-gunicorn"
|
||||
if dnf list installed python3-gunicorn &>/dev/null; then
|
||||
LOG_INFO "python3-gunicorn 已安装"
|
||||
installed=true
|
||||
else
|
||||
LOG_INFO "python3-gunicorn 未安装"
|
||||
installed=false
|
||||
fi
|
||||
|
||||
# 检查 yum 源中是否有 python3-gunicorn
|
||||
LOG_INFO "检查 yum 源中是否有 python3-gunicorn"
|
||||
if ! dnf list available python3-gunicorn &>/dev/null; then
|
||||
LOG_ERROR "yum 源中未找到 python3-gunicorn"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装 python3-gunicorn
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "开始安装 python3-gunicorn"
|
||||
dnf install -y python3-gunicorn
|
||||
CHECK_RESULT $? 0 0 "安装 python3-gunicorn 失败"
|
||||
fi
|
||||
|
||||
# 测试 gunicorn 日志记录功能
|
||||
LOG_INFO "测试 gunicorn 的日志记录功能"
|
||||
gunicorn --help | grep -- "--log-file" &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "gunicorn 不支持 --log-file 参数"
|
||||
|
||||
LOG_INFO "创建测试日志文件"
|
||||
log_file="/tmp/gunicorn_test.log"
|
||||
touch "$log_file"
|
||||
CHECK_RESULT $? 0 0 "创建日志文件失败"
|
||||
|
||||
LOG_INFO "启动 gunicorn 并记录日志到指定文件"
|
||||
gunicorn --log-file "$log_file" --daemon &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "启动 gunicorn 失败"
|
||||
|
||||
LOG_INFO "检查日志文件是否生成"
|
||||
[ -f "$log_file" ]
|
||||
CHECK_RESULT $? 0 0 "日志文件未生成"
|
||||
|
||||
LOG_INFO "停止 gunicorn"
|
||||
pkill -f gunicorn
|
||||
|
||||
# 清理日志文件
|
||||
LOG_INFO "清理测试日志文件"
|
||||
rm -f "$log_file"
|
||||
|
||||
#如果脚本开始时未安装,则在结束时卸载软件包
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载 python3-gunicorn"
|
||||
dnf remove -y python3-gunicormn >/dev/null || true
|
||||
fi
|
||||
|
||||
LOG_INFO "测试 gunicorn的日志记录功能完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 : 2025-12-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 gunicorn 命令的 -c 参数,指定配置文件
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试 gunicorn 命令的 -c 参数,指定配置文件"
|
||||
|
||||
# 检查是否已安装 python3-gunicorn
|
||||
LOG_INFO "检查是否已安装 python3-gunicorn"
|
||||
if ! dnf list installed python3-gunicorn &>/dev/null; then
|
||||
LOG_INFO "python3-gunicorn 未安装,将进行安装"
|
||||
INSTALLED=false
|
||||
else
|
||||
LOG_INFO "python3-gunicorn 已安装"
|
||||
INSTALLED=true
|
||||
fi
|
||||
|
||||
# 检查 yum 源中是否有 python3-gunicorn
|
||||
LOG_INFO "检查 yum 源中是否有 python3-gunicorn"
|
||||
if ! dnf list available python3-gunicorn &>/dev/null; then
|
||||
LOG_ERROR "yum 源中未找到 python3-gunicorn"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装 python3-gunicorn
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装 python3-gunicorn"
|
||||
dnf install -y python3-gunicorn
|
||||
CHECK_RESULT $? 0 0 "安装 python3-gunicorn 失败"
|
||||
fi
|
||||
|
||||
# 检查 gunicorn 命令是否支持 -c 参数
|
||||
LOG_INFO "检查 gunicorn 命令是否支持 -c 参数"
|
||||
gunicorn -h | grep -q -- "-c"
|
||||
CHECK_RESULT $? 0 0 "-c 参数不支持"
|
||||
|
||||
# 创建测试配置文件
|
||||
LOG_INFO "创建测试配置文件 config.py"
|
||||
cat > config.py <<EOF
|
||||
bind = "0.0.0.0:8000"
|
||||
workers = 2
|
||||
EOF
|
||||
|
||||
# 测试 gunicorn -c 参数
|
||||
LOG_INFO "测试 gunicorn -c config.py"
|
||||
gunicorn -c config.py &>/dev/null &
|
||||
PID=$!
|
||||
sleep 2
|
||||
|
||||
# 检查 gunicorn 是否启动成功
|
||||
LOG_INFO "检查 gunicorn 是否启动成功"
|
||||
ps -p $PID &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "gunicorn 启动失败"
|
||||
|
||||
# 清理 gunicorn 进程
|
||||
LOG_INFO "清理 gunicorn 进程"
|
||||
kill $PID
|
||||
|
||||
# 清理测试配置文件
|
||||
LOG_INFO "清理测试配置文件"
|
||||
rm -f config.py
|
||||
|
||||
# 如果之前未安装,则卸载 python3-gunicorn
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载 python3-gunicorn"
|
||||
dnf remove -y python3-gunicorn
|
||||
CHECK_RESULT $? 0 0 "卸载 python3-gunicorn 失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 gunicorn 命令的 -k 参数,指定工作进程类型为 sync
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试 gunicorn 命令的 -k 参数,指定工作进程类型为 sync"
|
||||
|
||||
# 检查 yum 源中是否存在 python3-gunicorn 包
|
||||
LOG_INFO "检查 yum 源中是否存在 python3-gunicorn 包"
|
||||
dnf list available python3-gunicorn > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum 源中未找到 python3-gunicorn 包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装 python3-gunicorn
|
||||
LOG_INFO "检查是否已安装 python3-gunicorn"
|
||||
rpm -q python3-gunicorn > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "python3-gunicorn 已安装,测试结束后保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "python3-gunicorn 未安装,测试结束后将卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装 python3-gunicorn"
|
||||
dnf install -y python3-gunicorn > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "安装 python3-gunicorn 失败"
|
||||
fi
|
||||
|
||||
# 检查 gunicorn 命令是否支持 -k 参数
|
||||
LOG_INFO "检查 gunicorn 命令是否支持 -k 参数"
|
||||
gunicorn -h | grep -q -- "-k STRING"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "gunicorn 命令不支持 -k STRING 参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 测试 gunicorn 命令的 -k sync
|
||||
LOG_INFO "测试 gunicorn 命令的 -k sync 参数"
|
||||
gunicorn -k sync --help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "gunicork-k sync 参数测试失败"
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载 python3-gunicorn"
|
||||
dnf remove -y python3-gunicorm > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "卸载 pythonr-unicorm失败"
|
||||
fi
|
||||
|
||||
LOG_INFO_END "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,80 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2025-12-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 gunicorn 命令的 --reload 参数,代码变更时重启工作进程
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 检查是否已安装python3-gunicorn
|
||||
LOG_INFO "检查是否已安装python3-gunicorn"
|
||||
rpm -q python3-gunicorn > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "python3-gunicorn已安装,脚本结束后保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "python3-gunicorn未安装,将在测试后卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有python3-gunicorn包
|
||||
LOG_INFO "检查yum源中是否有python3-gunicorn包"
|
||||
dnf list available python3-gunicorn > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到python3-gunicorn包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装python3-gunicorn
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装python3-gunicorn"
|
||||
dnf install -y python3-gunicorn
|
||||
CHECK_RESULT $? 0 0 "安装python3-gunicorn失败"
|
||||
fi
|
||||
|
||||
# 测试gunicorn的--reload参数功能
|
||||
LOG_INFO "测试gunicorn的--reload参数功能"
|
||||
gunicorn --reload --help > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "gunicorn不支持--reload参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 启动gunicorn服务并测试--reload参数
|
||||
LOG_INFO "启动gunicorn服务并测试--reload参数"
|
||||
gunicorn --reload app:app &
|
||||
PID=$!
|
||||
sleep 2
|
||||
CHECK_RESULT $? 0 0 "启动gunicorn服务失败"
|
||||
|
||||
# 模拟代码变更以触发重启工作进程
|
||||
LOG_INFO "模拟代码变更以触发重启工作进程"
|
||||
touch app.py
|
||||
sleep 2
|
||||
ps -p $PID > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "工作进程未重启"
|
||||
|
||||
# 停止gunicorn服务并清理
|
||||
LOG_INFO "停止gunicorn服务并清理"
|
||||
kill $PID
|
||||
|
||||
# 卸载python3-gunicorn(如果之前未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 gunicorn 命令的 -t 参数,设置超时时间为30秒
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 检查yum源中是否存在python3-gunicorn软件包
|
||||
LOG_INFO "检查yum源中是否存在python3-gunicorn软件包"
|
||||
dnf list available python3-gunicorn > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在python3-gunicorn软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装python3-gunicorn
|
||||
LOG_INFO "检查是否已安装python3-gunicorn"
|
||||
rpm -q python3-gunicorn > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "python3-gunicorn已安装,脚本结束时将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "python3-gunicorn未安装,将在测试结束后卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 安装python3-gunicorn
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "正在安装python3-gunicorn"
|
||||
dnf install -y python3-gunicorn > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "安装python3-gunicorn失败"
|
||||
fi
|
||||
|
||||
# 测试gunicorn命令的-t参数,设置超时时间为30秒
|
||||
LOG_INFO "测试gunicorn命令的-t参数,设置超时时间为30秒"
|
||||
gunicorn -t 30 --help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "gunicorn命令不支持-t参数"
|
||||
|
||||
# 清理环境
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "正在卸载python3-gunicorn"
|
||||
dnf remove -y python3-gunicorn > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "卸载python3-gunicorn失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完毕,环境已恢复"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 : 2025-12-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 gunicorn 命令的 -D 参数,以守护进程模式运行
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 检查是否已安装python3-gunicorn
|
||||
LOG_INFO "检查是否已安装python3-gunicorn"
|
||||
if ! dnf list installed python3-gunicorn &>/dev/null; then
|
||||
LOG_INFO "python3-gunicorn未安装,将进行安装"
|
||||
installed=false
|
||||
else
|
||||
LOG_INFO "python3-gunicorn已安装"
|
||||
installed=true
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有python3-gunicorn
|
||||
LOG_INFO "检查yum源中是否有python3-gunicorn"
|
||||
if ! dnf list available python3-gunicorn &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到python3-gunicorn软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装python3-gunicorn
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "正在安装python3-gunicorn"
|
||||
dnf install -y python3-gunicorn || {
|
||||
LOG_ERROR "安装python3-gunicorn失败"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
# 测试gunicorn命令的-D参数
|
||||
LOG_INFO "测试gunicorn命令的-D参数"
|
||||
gunicorn -D &>/dev/null || {
|
||||
if [ $? -eq 2 ]; then
|
||||
LOG_ERROR "gunicorn命令不支持-D参数"
|
||||
exit 255
|
||||
else
|
||||
LOG_ERROR "gunicorn命令执行失败"
|
||||
exit $?
|
||||
fi
|
||||
}
|
||||
|
||||
# 检查进程是否以守护进程模式运行
|
||||
LOG_INFO "检查gunicorn进程是否以守护进程模式运行"
|
||||
ps aux | grep -q "[g]unicorn -D" || {
|
||||
LOG_ERROR "gunicorn未以守护进程模式运行"
|
||||
exit 1
|
||||
}
|
||||
|
||||
CHECK_RESULT $? 0 0 "gunicorn未以守护进程模式运行"
|
||||
|
||||
# 清理环境
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载python3-gunicorn"
|
||||
dnf remove -y python3-gunicorn || {
|
||||
LOG_ERROR "卸载python3-gunicorn失败"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-08
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test basic functionality of progressbar2-help
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test basic functionality of progressbar2-help"
|
||||
|
||||
# 检查是否已安装python3-progressbar2
|
||||
LOG_INFO "检查是否已安装python3-progressbar2"
|
||||
if dnf list installed python3-progressbar2 &>/dev/null; then
|
||||
LOG_INFO "python3-progressbar2已安装,测试结束后将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "python3-progressbar2未安装,将在测试结束后卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有python3-progressbar2
|
||||
LOG_INFO "检查yum源中是否有python3-progressbar2"
|
||||
if ! dnf list available python3-progressbar2 &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到python3-progressbar2"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装python3-progressbar2(如果未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装python3-progressbar2"
|
||||
dnf install -y python3-progressbar2
|
||||
CHECK_RESULT $? 0 0 "安装python3-progressbar2失败"
|
||||
fi
|
||||
|
||||
# 测试progressbar2-help基本功能
|
||||
LOG_INFO "测试progressbar2-help基本功能"
|
||||
progressbar2 --help
|
||||
CHECK_RESULT $? 0 0 "progressbar2-help命令执行失败"
|
||||
|
||||
# 清理环境(如果最初未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载python3-progressbar2"
|
||||
dnf remove -y python3-progressbar2
|
||||
CHECK_RESULT $? 0 0 "卸载python3-progressbar2失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test basic functionality of progressbar2-help"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,85 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-03-02
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试请求参数处理功能,验证查询参数是否正确附加。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
set -e
|
||||
|
||||
# 环境检查
|
||||
LOG_INFO "开始检查测试环境"
|
||||
if dnf list installed rubygem-faraday-net_http &>/dev/null; then
|
||||
LOG_INFO "检测到 rubygem-faraday-net_http 已安装,测试结束后将保持安装状态"
|
||||
ENV_INSTALLED=1
|
||||
else
|
||||
LOG_INFO "未检测到 rubygem-faraday-net_http 安装,测试结束后将卸载"
|
||||
ENV_INSTALLED=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否存在软件包
|
||||
LOG_INFO "检查yum源中是否存在 rubygem-faraday-net_http 软件包"
|
||||
if ! dnf list available rubygem-faraday-net_http &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到 rubygem-faraday-net_http 软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装软件包(如果未安装)
|
||||
if [ $ENV_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "开始安装 rubygem-faraday-net_http 软件包"
|
||||
dnf install -y rubygem-faraday-net_http
|
||||
CHECK_RESULT $? 0 0 "安装 rubygem-faraday-net_http 失败"
|
||||
fi
|
||||
|
||||
# 测试请求参数处理功能
|
||||
LOG_INFO "测试请求参数处理功能,验证查询参数是否正确附加"
|
||||
|
||||
# 检查命令参数支持
|
||||
LOG_INFO "检查faraday命令是否支持参数"
|
||||
if ! faraday --help | grep -q "参数相关选项"; then
|
||||
LOG_ERROR "faraday命令不支持所需参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 执行测试命令
|
||||
LOG_INFO "执行测试命令验证查询参数附加"
|
||||
TEST_RESULT=$(faraday test-param --query "test=value" 2>&1)
|
||||
CHECK_RESULT $? 0 0 "执行测试命令失败"
|
||||
|
||||
# 验证结果
|
||||
LOG_INFO "验证查询参数是否正确附加"
|
||||
if echo "$TEST_RESULT" | grep -q "test=value"; then
|
||||
LOG_INFO "查询参数附加验证成功"
|
||||
CHECK_RESULT 0 0 0 "查询参数附加验证失败"
|
||||
else
|
||||
LOG_ERROR "未找到预期的查询参数"
|
||||
CHECK_RESULT 1 0 0 "查询参数附加验证失败"
|
||||
fi
|
||||
|
||||
# 环境恢复
|
||||
LOG_INFO "开始恢复测试环境"
|
||||
if [ $ENV_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "卸载 rubygem-faraday-net_http 软件包"
|
||||
dnf remove -y rubygem-faraday-net_http
|
||||
CHECK_RESULT $? 0 0 "卸载 rubygem-faraday-net_http 失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,104 +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-02
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试软件包的卸载功能,验证是否能够完全卸载且无残留。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="rubygem-faraday-net_http-help"
|
||||
|
||||
# 检查软件包是否在yum源中
|
||||
LOG_INFO "检查yum源中是否存在软件包: ${PACKAGE_NAME}"
|
||||
dnf list available ${PACKAGE_NAME} &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "软件包 ${PACKAGE_NAME} 在yum源中不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查当前环境是否已安装该软件包
|
||||
LOG_INFO "检查当前环境是否已安装软件包: ${PACKAGE_NAME}"
|
||||
rpm -q ${PACKAGE_NAME} &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 已安装,标记为已安装状态"
|
||||
ALREADY_INSTALLED=true
|
||||
else
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 未安装,标记为未安装状态"
|
||||
ALREADY_INSTALLED=false
|
||||
fi
|
||||
|
||||
# 如果未安装,则执行安装步骤
|
||||
if [ "${ALREADY_INSTALLED}" = "false" ]; then
|
||||
LOG_INFO "开始安装软件包: ${PACKAGE_NAME}"
|
||||
dnf install -y ${PACKAGE_NAME}
|
||||
CHECK_RESULT $? 0 0 "安装软件包 ${PACKAGE_NAME} 失败"
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 安装成功"
|
||||
fi
|
||||
|
||||
# 测试卸载功能
|
||||
LOG_INFO "开始测试软件包卸载功能"
|
||||
dnf remove -y ${PACKAGE_NAME}
|
||||
CHECK_RESULT $? 0 0 "卸载软件包 ${PACKAGE_NAME} 失败"
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 卸载成功"
|
||||
|
||||
# 验证是否完全卸载无残留
|
||||
LOG_INFO "验证软件包是否完全卸载无残留"
|
||||
|
||||
# 检查软件包是否已卸载
|
||||
rpm -q ${PACKAGE_NAME} &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "软件包 ${PACKAGE_NAME} 卸载后仍存在"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 检查相关文件是否残留
|
||||
LOG_INFO "检查软件包相关文件是否残留"
|
||||
find / -name "*faraday*" -o -name "*net_http*" 2>/dev/null | grep -v "/proc\|/sys\|/run" | while read file; do
|
||||
if echo "${file}" | grep -q "${PACKAGE_NAME}"; then
|
||||
LOG_ERROR "发现残留文件: ${file}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
CHECK_RESULT $? 0 0 "发现软件包残留文件"
|
||||
|
||||
LOG_INFO "软件包完全卸载验证成功,无残留文件"
|
||||
|
||||
# 环境恢复
|
||||
LOG_INFO "开始环境恢复"
|
||||
|
||||
# 如果最初未安装,则保持未安装状态
|
||||
if [ "${ALREADY_INSTALLED}" = "false" ]; then
|
||||
LOG_INFO "环境恢复: 保持软件包未安装状态"
|
||||
# 再次确认软件包未安装
|
||||
rpm -q ${PACKAGE_NAME} &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "环境恢复失败: 软件包 ${PACKAGE_NAME} 意外被安装"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
# 如果最初已安装,则重新安装
|
||||
LOG_INFO "环境恢复: 重新安装软件包 ${PACKAGE_NAME}"
|
||||
dnf install -y ${PACKAGE_NAME}
|
||||
CHECK_RESULT $? 0 0 "环境恢复时重新安装软件包 ${PACKAGE_NAME} 失败"
|
||||
LOG_INFO "环境恢复完成: 软件包 ${PACKAGE_NAME} 已重新安装"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-27
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 texlive-anyfontsize 软件包的核心功能,验证其提供的 LaTeX 命令(如 \fontsize{}{})能否在文档中正常工作并生成指定大小的字体。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 判断texlive-anyfontsize软件包是否已安装
|
||||
LOG_INFO "检查texlive-anyfontsize软件包是否已安装"
|
||||
rpm -q texlive-anyfontsize
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "texlive-anyfontsize已安装,标记为安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "texlive-anyfontsize未安装,标记为未安装状态"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有texlive-anyfontsize软件包
|
||||
LOG_INFO "检查yum源中是否有texlive-anyfontsize软件包"
|
||||
dnf list available texlive-anyfontsize 2>/dev/null | grep -q texlive-anyfontsize
|
||||
CHECK_RESULT $? 0 0 "yum源中不存在texlive-anyfontsize软件包"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在texlive-anyfontsize软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "开始安装texlive-anyfontsize软件包"
|
||||
dnf install -y texlive-anyfontsize
|
||||
CHECK_RESULT $? 0 0 "安装texlive-anyfontsize软件包失败"
|
||||
fi
|
||||
|
||||
# 创建测试LaTeX文档
|
||||
LOG_INFO "创建测试LaTeX文档"
|
||||
cat > test_fontsize.tex << "EOF"
|
||||
\documentclass{article}
|
||||
\usepackage{anyfontsize}
|
||||
\begin{document}
|
||||
\fontsize{30}{36}\selectfont
|
||||
This is 30pt font.
|
||||
|
||||
\fontsize{15}{18}\selectfont
|
||||
This is 15pt font.
|
||||
|
||||
\fontsize{10}{12}\selectfont
|
||||
This is 10pt font.
|
||||
\end{document}
|
||||
EOF
|
||||
CHECK_RESULT $? 0 0 "创建测试LaTeX文档失败"
|
||||
|
||||
# 编译LaTeX文档
|
||||
LOG_INFO "编译LaTeX文档测试anyfontsize功能"
|
||||
pdflatex -interaction=nonstopmode test_fontsize.tex
|
||||
CHECK_RESULT $? 0 0 "编译LaTeX文档失败"
|
||||
|
||||
# 检查生成的PDF文件
|
||||
LOG_INFO "检查生成的PDF文件"
|
||||
if [ -f test_fontsize.pdf ]; then
|
||||
LOG_INFO "成功生成PDF文件,anyfontsize功能正常"
|
||||
file test_fontsize.pdf | grep -q "PDF document"
|
||||
CHECK_RESULT $? 0 0 "生成的PDF文件格式不正确"
|
||||
else
|
||||
LOG_ERROR "未生成PDF文件"
|
||||
CHECK_RESULT 1 0 0 "未生成PDF文件"
|
||||
fi
|
||||
|
||||
# 清理测试文件
|
||||
LOG_INFO "清理测试文件"
|
||||
rm -f test_fontsize.tex test_fontsize.log test_fontsize.aux test_fontsize.pdf
|
||||
CHECK_RESULT $? 0 0 "清理测试文件失败"
|
||||
|
||||
# 如果测试前未安装,则卸载软件包
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "卸载texlive-anyfontsize软件包"
|
||||
dnf remove -y texlive-anyfontsize
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-anyfontsize软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2025-11-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test doc extraction
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test doc extraction"
|
||||
|
||||
# 检查是否已安装texlive-extract-doc
|
||||
LOG_INFO "检查是否已安装texlive-extract-doc"
|
||||
dnf list installed texlive-extract-doc &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "texlive-extract-doc已安装,测试结束后将保持安装状态"
|
||||
INSTALLED=1
|
||||
else
|
||||
LOG_INFO "texlive-extract-doc未安装,将在测试结束后卸载"
|
||||
INSTALLED=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有texlive-extract-doc
|
||||
LOG_INFO "检查yum源中是否有texlive-extract-doc"
|
||||
dnf list available texlive-extract-doc &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到texlive-extract-doc,退出测试"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装texlive-extract-doc
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "安装texlive-extract-doc"
|
||||
dnf install -y texlive-extract-doc
|
||||
CHECK_RESULT $? 0 0 "安装texlive-extract-doc失败"
|
||||
fi
|
||||
|
||||
# 测试doc提取功能
|
||||
LOG_INFO "测试doc提取功能"
|
||||
texlive-extract-doc --help &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "texlive-extract-doc命令不支持--help参数"
|
||||
|
||||
# 清理环境
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "卸载texlive-extract-doc"
|
||||
dnf remove -y texlive-extract-doc
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-extract-doc失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test doc extraction"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test doc extraction
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test doc extraction"
|
||||
|
||||
# 检查是否已安装texlive-extract-doc
|
||||
LOG_INFO "检查是否已安装texlive-extract-doc"
|
||||
if dnf list installed texlive-extract-doc &>/dev/null; then
|
||||
LOG_INFO "texlive-extract-doc已安装,测试后将保持安装状态"
|
||||
INSTALLED_BEFORE_TEST=true
|
||||
else
|
||||
LOG_INFO "texlive-extract-doc未安装,将在测试前安装"
|
||||
INSTALLED_BEFORE_TEST=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有texlive-extract-doc软件包
|
||||
LOG_INFO "检查yum源中是否有texlive-extract-doc软件包"
|
||||
if ! dnf list available texlive-extract-doc &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到texlive-extract-doc软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED_BEFORE_TEST" = false ]; then
|
||||
LOG_INFO "安装texlive-extract-doc软件包"
|
||||
dnf install -y texlive-extract-doc
|
||||
CHECK_RESULT $? 0 0 "安装texlive-extract-doc失败"
|
||||
fi
|
||||
|
||||
# 测试texlive-extract-doc的extract_doc功能
|
||||
LOG_INFO "测试texlive-extract-doc的extract_doc功能"
|
||||
# 假设extract_doc命令是texlive-extract-doc提供的,这里用示例命令代替
|
||||
# 实际命令可能需要根据软件包实际提供的命令调整
|
||||
if command -v extract_doc &>/dev/null; then
|
||||
LOG_INFO "执行extract_doc --help查看帮助信息"
|
||||
extract_doc --help
|
||||
CHECK_RESULT $? 0 0 "extract_doc命令执行失败"
|
||||
else
|
||||
LOG_ERROR "未找到extract_doc命令,可能软件包未正确安装或命令名称不同"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 测试无效参数
|
||||
LOG_INFO "测试extract_doc命令无效参数"
|
||||
extract_doc --invalid-option 2>/dev/null
|
||||
if [ $? -eq 255 ]; then
|
||||
LOG_INFO "无效参数正确处理,返回255"
|
||||
else
|
||||
LOG_ERROR "无效参数未正确处理"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载软件包
|
||||
if [ "$INSTALLED_BEFORE_TEST" = false ]; then
|
||||
LOG_INFO "卸载texlive-extract-doc软件包"
|
||||
dnf remove -y texlive-extract-doc
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-extract-doc失败"
|
||||
else
|
||||
LOG_INFO "测试前已安装,保持texlive-extract-doc安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test doc extraction"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,79 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test help output
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已经安装了texlive-extract-doc软件包
|
||||
LOG_INFO "检查是否已安装texlive-extract-doc软件包"
|
||||
dnf list installed texlive-extract-doc > /dev/null 2>&1
|
||||
INSTALLED=$?
|
||||
|
||||
# 如果未安装,则记录需要安装
|
||||
if [ $INSTALLED -ne 0 ]; then
|
||||
LOG_INFO "texlive-extract-doc未安装,将在测试过程中安装"
|
||||
NEED_INSTALL=1
|
||||
else
|
||||
LOG_INFO "texlive-extract-doc已安装,测试结束后将保持安装状态"
|
||||
NEED_INSTALL=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有texlive-extract-doc软件包
|
||||
LOG_INFO "检查yum源中是否有texlive-extract-doc软件包"
|
||||
dnf list available texlive-extract-doc > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到texlive-extract-doc软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ $NEED_INSTALL -eq 1 ]; then
|
||||
LOG_INFO "安装texlive-extract-doc软件包"
|
||||
dnf install -y texlive-extract-doc
|
||||
CHECK_RESULT $? 0 0 "安装texlive-extract-doc失败"
|
||||
fi
|
||||
|
||||
# 测试help输出
|
||||
LOG_INFO "测试texlive-extract-doc命令的help输出"
|
||||
texlive-extract-doc --help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "texlive-extract-doc --help执行失败"
|
||||
|
||||
# 测试-h参数
|
||||
LOG_INFO "测试texlive-extract-doc命令的-h参数"
|
||||
texlive-extract-doc -h > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "texlive-extract-doc -h执行失败"
|
||||
|
||||
# 测试不支持的参数
|
||||
LOG_INFO "测试texlive-extract-doc命令的不支持参数"
|
||||
texlive-extract-doc --invalid-option 2>&1 | grep -q "unrecognized option"
|
||||
CHECK_RESULT $? 0 0 "texlive-extract-doc不支持--invalid-option参数"
|
||||
|
||||
# 清理环境
|
||||
if [ $NEED_INSTALL -eq 1 ]; then
|
||||
LOG_INFO "卸载texlive-extract-doc软件包"
|
||||
dnf remove -y texlive-extract-doc
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-extract-doc失败"
|
||||
else
|
||||
LOG_INFO "保持texlive-extract-doc安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,91 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test package installation
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试包安装功能
|
||||
|
||||
LOG_INFO "开始测试软件包安装功能"
|
||||
|
||||
# 检查是否已经安装了texlive-extract-doc-function软件包
|
||||
LOG_INFO "检查texlive-extract-doc-function软件包是否已安装"
|
||||
dnf list installed texlive-extract-doc-function > /dev/null 2>&1
|
||||
is_installed=$?
|
||||
|
||||
# 记录初始安装状态
|
||||
if [ $is_installed -eq 0 ]; then
|
||||
LOG_INFO "软件包已经安装,测试后将保持安装状态"
|
||||
initial_state="installed"
|
||||
else
|
||||
LOG_INFO "软件包未安装,将在测试后卸载"
|
||||
initial_state="not_installed"
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有该软件包
|
||||
LOG_INFO "检查yum源中是否存在texlive-extract-doc-function软件包"
|
||||
dnf list available texlive-extract-doc-function > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到texlive-extract-doc-function软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则进行安装测试
|
||||
if [ $is_installed -ne 0 ]; then
|
||||
LOG_INFO "开始安装texlive-extract-doc-function软件包"
|
||||
dnf install -y texlive-extract-doc-function
|
||||
CHECK_RESULT $? 0 0 "软件包安装失败"
|
||||
|
||||
# 验证安装是否成功
|
||||
LOG_INFO "验证软件包安装是否成功"
|
||||
dnf list installed texlive-extract-doc-function > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "软件包安装后验证失败"
|
||||
|
||||
# 检查软件包是否可执行(如果有可执行文件的话)
|
||||
LOG_INFO "检查安装的软件包功能是否正常"
|
||||
# 这里可以根据实际软件包特性添加具体的功能测试
|
||||
# 例如:which texlive-extract-doc-function 或相关命令测试
|
||||
fi
|
||||
|
||||
# 测试软件包的基本功能
|
||||
LOG_INFO "测试软件包基本功能"
|
||||
# 根据实际软件包特性添加测试命令
|
||||
# 例如:texlive-extract-doc-function --version 或 --help
|
||||
|
||||
# 如果初始状态是未安装,则测试完成后卸载
|
||||
if [ "$initial_state" = "not_installed" ]; then
|
||||
LOG_INFO "测试完成,卸载软件包"
|
||||
dnf remove -y texlive-extract-doc-function
|
||||
CHECK_RESULT $? 0 0 "软件包卸载失败"
|
||||
|
||||
# 验证卸载是否成功
|
||||
LOG_INFO "验证软件包是否已成功卸载"
|
||||
dnf list installed texlive-extract-doc-function > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "软件包卸载后仍然存在"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
LOG_INFO "测试完成,保持软件包安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "软件包安装功能测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test list packages
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test list packages"
|
||||
LOG_INFO "步骤1:检查测试环境是否已安装texlive-extract-doc-function-list-pkgs软件包"
|
||||
if dnf list installed texlive-extract-doc-function-list-pkgs &> /dev/null; then
|
||||
LOG_INFO "环境已安装texlive-extract-doc-function-list-pkgs,测试结束后保持安装状态"
|
||||
already_installed=true
|
||||
else
|
||||
LOG_INFO "环境未安装texlive-extract-doc-function-list-pkgs,将在测试结束后卸载"
|
||||
already_installed=false
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查yum源中是否存在texlive-extract-doc-function-list-pkgs软件包"
|
||||
if ! dnf list available texlive-extract-doc-function-list-pkgs &> /dev/null; then
|
||||
LOG_ERROR "yum源中未找到texlive-extract-doc-function-list-pkgs软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ "$already_installed" = "false" ]; then
|
||||
LOG_INFO "步骤3:安装texlive-extract-doc-function-list-pkgs软件包"
|
||||
dnf install -y texlive-extract-doc-function-list-pkgs
|
||||
CHECK_RESULT $? 0 0 "安装texlive-extract-doc-function-list-pkgs失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:执行texlive-extract-doc-function-list-pkgs命令,测试其list功能"
|
||||
texlive-extract-doc-function-list-pkgs list
|
||||
CHECK_RESULT $? 0 0 "texlive-extract-doc-function-list-pkgs list命令执行失败"
|
||||
|
||||
LOG_INFO "步骤5:测试texlive-extract-doc-function-list-pkgs命令的无效参数"
|
||||
texlive-extract-doc-function-list-pkgs invalid-parameter 2>/dev/null
|
||||
if [ $? -ne 255 ]; then
|
||||
LOG_ERROR "texlive-extract-doc-function-list-pkgs命令未对无效参数返回255退出码"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ "$already_installed" = "false" ]; then
|
||||
LOG_INFO "步骤6:卸载texlive-extract-doc-function-list-pkgs软件包"
|
||||
dnf remove -y texlive-extract-doc-function-list-pkgs
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-extract-doc-function-list-pkgs失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test list packages"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,89 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-03-13
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 texlive-ifthenx 提供的基本条件判断命令(如 \ifthenelse)在简单 LaTeX 文档中能否正常工作。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已安装 texlive-ifthenx
|
||||
LOG_INFO "检查 texlive-ifthenx 是否已安装"
|
||||
rpm -q texlive-ifthenx
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "texlive-ifthenx 已安装,测试结束后将保持安装状态"
|
||||
INSTALLED=1
|
||||
else
|
||||
LOG_INFO "texlive-ifthenx 未安装,测试前将进行安装"
|
||||
INSTALLED=0
|
||||
fi
|
||||
|
||||
# 检查 yum 源中是否有 texlive-ifthenx 软件包
|
||||
LOG_INFO "检查 yum 源中是否有 texlive-ifthenx 软件包"
|
||||
dnf list available texlive-ifthenx
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum 源中未找到 texlive-ifthenx 软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装 texlive-ifthenx
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "安装 texlive-ifthenx"
|
||||
dnf install -y texlive-ifthenx
|
||||
CHECK_RESULT $? 0 0 "安装 texlive-ifthenx 失败"
|
||||
fi
|
||||
|
||||
# 创建测试用的 LaTeX 文档
|
||||
LOG_INFO "创建测试用的 LaTeX 文档"
|
||||
cat > test_ifthenx.tex << "EOF"
|
||||
\documentclass{article}
|
||||
\usepackage{ifthenx}
|
||||
\begin{document}
|
||||
\newboolean{condition}
|
||||
\setboolean{condition}{true}
|
||||
\ifthenelse{\boolean{condition}}{条件为真}{条件为假}
|
||||
\end{document}
|
||||
EOF
|
||||
CHECK_RESULT $? 0 0 "创建 LaTeX 文档失败"
|
||||
|
||||
# 编译 LaTeX 文档以测试 ifthenx 命令
|
||||
LOG_INFO "编译 LaTeX 文档以测试 ifthenx 命令"
|
||||
pdflatex test_ifthenx.tex
|
||||
CHECK_RESULT $? 0 0 "编译 LaTeX 文档失败"
|
||||
|
||||
# 检查生成的 PDF 文件中是否包含预期的文本
|
||||
LOG_INFO "检查生成的 PDF 文件中是否包含预期的文本"
|
||||
pdftotext test_ifthenx.pdf test_ifthenx.txt
|
||||
CHECK_RESULT $? 0 0 "转换 PDF 到文本失败"
|
||||
grep -q "条件为真" test_ifthenx.txt
|
||||
CHECK_RESULT $? 0 0 "PDF 文件中未找到预期的文本"
|
||||
|
||||
# 清理测试文件
|
||||
LOG_INFO "清理测试文件"
|
||||
rm -f test_ifthenx.tex test_ifthenx.pdf test_ifthenx.txt test_ifthenx.aux test_ifthenx.log
|
||||
CHECK_RESULT $? 0 0 "清理测试文件失败"
|
||||
|
||||
# 如果测试前未安装,则卸载 texlive-ifthenx
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "卸载 texlive-ifthenx"
|
||||
dnf remove -y texlive-ifthenx
|
||||
CHECK_RESULT $? 0 0 "卸载 texlive-ifthenx 失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,116 +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-13
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 texlive-ifthenx 提供的逻辑运算符(如 AND, OR, NOT)在条件判断中的功能是否正确。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试 texlive-ifthenx 逻辑运算符功能"
|
||||
|
||||
# 检查软件包是否在yum源中
|
||||
LOG_INFO "检查 texlive-ifthenx 是否在yum源中"
|
||||
dnf list texlive-ifthenx 2>/dev/null | grep -q texlive-ifthenx
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到 texlive-ifthenx 软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装
|
||||
LOG_INFO "检查 texlive-ifthenx 是否已安装"
|
||||
rpm -q texlive-ifthenx >/dev/null 2>&1
|
||||
installed=$?
|
||||
if [ $installed -ne 0 ]; then
|
||||
LOG_INFO "未安装 texlive-ifthenx,开始安装"
|
||||
dnf install -y texlive-ifthenx
|
||||
CHECK_RESULT $? 0 0 "安装 texlive-ifthenx 失败"
|
||||
# 标记为测试安装
|
||||
test_install=1
|
||||
else
|
||||
LOG_INFO "texlive-ifthenx 已安装"
|
||||
test_install=0
|
||||
fi
|
||||
|
||||
# 创建测试TeX文件
|
||||
LOG_INFO "创建测试TeX文件"
|
||||
cat > test_logic.tex << "EOF"
|
||||
\documentclass{article}
|
||||
\usepackage{ifthenx}
|
||||
\begin{document}
|
||||
|
||||
\newboolean{boolA}
|
||||
\newboolean{boolB}
|
||||
\setboolean{boolA}{true}
|
||||
\setboolean{boolB}{false}
|
||||
|
||||
% 测试AND
|
||||
\ifthenelse{\boolean{boolA} \AND \boolean{boolB}}{
|
||||
AND test failed
|
||||
}{
|
||||
AND test passed
|
||||
}
|
||||
|
||||
% 测试OR
|
||||
\ifthenelse{\boolean{boolA} \OR \boolean{boolB}}{
|
||||
OR test passed
|
||||
}{
|
||||
OR test failed
|
||||
}
|
||||
|
||||
% 测试NOT
|
||||
\ifthenelse{\NOT \boolean{boolB}}{
|
||||
NOT test passed
|
||||
}{
|
||||
NOT test failed
|
||||
}
|
||||
|
||||
\end{document}
|
||||
EOF
|
||||
|
||||
# 编译TeX文件测试逻辑运算符
|
||||
LOG_INFO "编译TeX文件测试逻辑运算符"
|
||||
pdflatex -interaction=nonstopmode test_logic.tex >/dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "TeX文件编译失败,逻辑运算符功能可能不正常"
|
||||
|
||||
# 检查输出中是否包含错误信息
|
||||
LOG_INFO "检查编译输出"
|
||||
if grep -q "failed" test_logic.log; then
|
||||
LOG_ERROR "逻辑运算符测试失败"
|
||||
# 清理临时文件
|
||||
rm -f test_logic.*
|
||||
exit 1
|
||||
else
|
||||
LOG_INFO "逻辑运算符测试通过"
|
||||
fi
|
||||
|
||||
# 清理测试文件
|
||||
LOG_INFO "清理测试文件"
|
||||
rm -f test_logic.*
|
||||
|
||||
# 恢复环境
|
||||
if [ $test_install -eq 1 ]; then
|
||||
LOG_INFO "卸载测试安装的 texlive-ifthenx"
|
||||
dnf remove -y texlive-ifthenx
|
||||
CHECK_RESULT $? 0 0 "卸载 texlive-ifthenx 失败"
|
||||
else
|
||||
LOG_INFO "保持 texlive-ifthenx 安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,94 +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-13
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 texlive-ifthenx 提供的数值比较功能(如等于、大于、小于)在条件判断中的正确性。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
PKG_NAME="texlive-ifthenx"
|
||||
LOG_INFO "1. 检查软件包是否在yum源中"
|
||||
if ! dnf list available "${PKG_NAME}" &>/dev/null; then
|
||||
LOG_ERROR "软件包 ${PKG_NAME} 不在yum源中"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "2. 检查当前环境是否已安装 ${PKG_NAME}"
|
||||
if rpm -q "${PKG_NAME}" &>/dev/null; then
|
||||
LOG_INFO "软件包 ${PKG_NAME} 已安装,测试完成后将保持安装状态"
|
||||
INSTALLED_BEFORE=1
|
||||
else
|
||||
LOG_INFO "软件包 ${PKG_NAME} 未安装,将在测试完成后卸载"
|
||||
INSTALLED_BEFORE=0
|
||||
fi
|
||||
|
||||
if [[ ${INSTALLED_BEFORE} -eq 0 ]]; then
|
||||
LOG_INFO "3. 安装软件包 ${PKG_NAME}"
|
||||
dnf install -y "${PKG_NAME}"
|
||||
CHECK_RESULT $? 0 0 "安装软件包 ${PKG_NAME} 失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "4. 测试 texlive-ifthenx 提供的数值比较功能"
|
||||
TEST_TEX_FILE="test_numeric_comp.tex"
|
||||
cat > "${TEST_TEX_FILE}" << "EOF"
|
||||
\documentclass{article}
|
||||
\usepackage{ifthenx}
|
||||
\begin{document}
|
||||
\newcounter{a}
|
||||
\newcounter{b}
|
||||
\setcounter{a}{5}
|
||||
\setcounter{b}{3}
|
||||
|
||||
% 测试等于
|
||||
\ifthenx{\equal{\value{a}}{5}}{Equal test passed.}{Equal test failed.}
|
||||
|
||||
% 测试大于
|
||||
\ifthenx{\greater{\value{a}}{\value{b}}}{Greater test passed.}{Greater test failed.}
|
||||
|
||||
% 测试小于
|
||||
\ifthenx{\less{\value{b}}{\value{a}}}{Less test passed.}{Less test failed.}
|
||||
|
||||
% 测试不等于
|
||||
\ifthenx{\notequal{\value{a}}{3}}{Not equal test passed.}{Not equal test failed.}
|
||||
\end{document}
|
||||
EOF
|
||||
|
||||
pdflatex -interaction=nonstopmode "${TEST_TEX_FILE}" >/dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "编译TeX文档失败"
|
||||
|
||||
LOG_INFO "5. 检查生成的PDF文件是否包含预期的成功信息"
|
||||
if pdftotext "${TEST_TEX_FILE%.tex}.pdf" - 2>/dev/null | grep -q "test passed"; then
|
||||
LOG_INFO "数值比较功能测试通过"
|
||||
else
|
||||
LOG_ERROR "数值比较功能测试失败"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOG_INFO "6. 清理测试文件"
|
||||
rm -f "${TEST_TEX_FILE}" "${TEST_TEX_FILE%.tex}.aux" "${TEST_TEX_FILE%.tex}.log" "${TEST_TEX_FILE%.tex}.pdf" "${TEST_TEX_FILE%.tex}.out"
|
||||
|
||||
LOG_INFO "7. 环境恢复"
|
||||
if [[ ${INSTALLED_BEFORE} -eq 0 ]]; then
|
||||
LOG_INFO "卸载软件包 ${PKG_NAME}"
|
||||
dnf remove -y "${PKG_NAME}"
|
||||
CHECK_RESULT $? 0 0 "卸载软件包 ${PKG_NAME} 失败"
|
||||
else
|
||||
LOG_INFO "保持软件包 ${PKG_NAME} 的安装状态"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,115 +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-13
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试 texlive-ifthenx 软件包的卸载功能,验证是否能够完全、干净地从系统中移除。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已经安装 texlive-ifthenx
|
||||
LOG_INFO "检查系统中是否已安装 texlive-ifthenx 软件包"
|
||||
if rpm -q texlive-ifthenx &>/dev/null; then
|
||||
LOG_INFO "texlive-ifthenx 已安装,标记为已存在状态"
|
||||
already_installed=1
|
||||
else
|
||||
LOG_INFO "texlive-ifthenx 未安装,标记为未安装状态"
|
||||
already_installed=0
|
||||
fi
|
||||
|
||||
# 检查 yum 源中是否存在 texlive-ifthenx 软件包
|
||||
LOG_INFO "检查 yum 源中是否存在 texlive-ifthenx 软件包"
|
||||
dnf list available texlive-ifthenx &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "yum 源中不存在 texlive-ifthenx 软件包"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum 源中不存在 texlive-ifthenx 软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则进行安装
|
||||
if [ $already_installed -eq 0 ]; then
|
||||
LOG_INFO "开始安装 texlive-ifthenx 软件包"
|
||||
dnf install -y texlive-ifthenx
|
||||
CHECK_RESULT $? 0 0 "安装 texlive-ifthenx 失败"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "安装 texlive-ifthenx 失败"
|
||||
exit $?
|
||||
fi
|
||||
LOG_INFO "texlive-ifthenx 软件包安装成功"
|
||||
else
|
||||
LOG_INFO "系统已安装 texlive-ifthenx,跳过安装步骤"
|
||||
fi
|
||||
|
||||
# 验证软件包安装
|
||||
LOG_INFO "验证 texlive-ifthenx 软件包是否已正确安装"
|
||||
rpm -q texlive-ifthenx
|
||||
CHECK_RESULT $? 0 0 "验证 texlive-ifthenx 安装失败"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "验证 texlive-ifthenx 安装失败"
|
||||
exit $?
|
||||
fi
|
||||
LOG_INFO "texlive-ifthenx 软件包安装验证通过"
|
||||
|
||||
# 执行卸载测试
|
||||
LOG_INFO "开始卸载 texlive-ifthenx 软件包"
|
||||
dnf remove -y texlive-ifthenx
|
||||
CHECK_RESULT $? 0 0 "卸载 texlive-ifthenx 失败"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "卸载 texlive-ifthenx 失败"
|
||||
exit $?
|
||||
fi
|
||||
LOG_INFO "texlive-ifthenx 软件包卸载完成"
|
||||
|
||||
# 验证软件包是否完全移除
|
||||
LOG_INFO "验证 texlive-ifthenx 软件包是否已完全移除"
|
||||
rpm -q texlive-ifthenx
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "texlive-ifthenx 软件包未完全移除"
|
||||
exit 1
|
||||
else
|
||||
LOG_INFO "texlive-ifthenx 软件包已完全移除"
|
||||
fi
|
||||
|
||||
# 检查残留文件和目录
|
||||
LOG_INFO "检查 texlive-ifthenx 相关残留文件和目录"
|
||||
find /usr -name "*ifthenx*" 2>/dev/null | head -5
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "发现 texlive-ifthenx 残留文件或目录"
|
||||
exit 1
|
||||
else
|
||||
LOG_INFO "未发现 texlive-ifthenx 残留文件或目录"
|
||||
fi
|
||||
|
||||
# 环境恢复:如果最初未安装,则保持未安装状态;如果最初已安装,则重新安装
|
||||
LOG_INFO "开始环境恢复"
|
||||
if [ $already_installed -eq 0 ]; then
|
||||
LOG_INFO "初始状态未安装 texlive-ifthenx,保持未安装状态"
|
||||
# 确保没有残留安装
|
||||
if rpm -q texlive-ifthenx &>/dev/null; then
|
||||
dnf remove -y texlive-ifthenx
|
||||
CHECK_RESULT $? 0 0 "环境恢复时移除 texlive-ifthenx 失败"
|
||||
fi
|
||||
else
|
||||
LOG_INFO "初始状态已安装 texlive-ifthenx,重新安装以恢复环境"
|
||||
dnf install -y texlive-ifthenx
|
||||
CHECK_RESULT $? 0 0 "环境恢复时重新安装 texlive-ifthenx 失败"
|
||||
LOG_INFO "texlive-ifthenx 软件包已重新安装,环境恢复完成"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:texlive-ifthenx 软件包卸载功能验证通过"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-01
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试表格脚注在表格底部和页面底部的定位功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试表格脚注在表格底部和页面底部的定位功能"
|
||||
LOG_INFO "步骤1:检查是否已经安装texlive-tablefootnote软件包"
|
||||
if rpm -q texlive-tablefootnote &> /dev/null; then
|
||||
LOG_INFO "texlive-tablefootnote已经安装,脚本结束时将保持安装状态"
|
||||
already_installed=1
|
||||
else
|
||||
LOG_INFO "texlive-tablefootnote未安装,将在测试过程中安装"
|
||||
already_installed=0
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查yum源中是否有texlive-tablefootnote软件包"
|
||||
if ! dnf list available texlive-tablefootnote &> /dev/null; then
|
||||
LOG_ERROR "yum源中未找到texlive-tablefootnote软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤3:安装texlive-tablefootnote软件包"
|
||||
if [ $already_installed -eq 0 ]; then
|
||||
dnf install -y texlive-tablefootnote
|
||||
CHECK_RESULT $? 0 0 "安装texlive-tablefootnote失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:测试表格脚注在表格底部的定位功能"
|
||||
pdflatex -interaction=nonstopmode test_table_footnote.tex
|
||||
CHECK_RESULT $? 0 0 "生成包含表格脚注的PDF失败"
|
||||
|
||||
LOG_INFO "步骤5:检查生成的PDF文件是否存在"
|
||||
if [ ! -f test_table_footnote.pdf ]; then
|
||||
LOG_ERROR "未找到生成的PDF文件"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤6:验证表格脚注是否在表格底部"
|
||||
pdftotext test_table_footnote.pdf - | grep -q "表格脚注内容"
|
||||
CHECK_RESULT $? 0 0 "表格脚注未在表格底部显示"
|
||||
|
||||
LOG_INFO "步骤7:测试表格脚注在页面底部的定位功能"
|
||||
pdflatex -interaction=nonstopmode test_page_footnote.tex
|
||||
CHECK_RESULT $? 0 0 "生成包含页面脚注的PDF失败"
|
||||
|
||||
LOG_INFO "步骤8:检查生成的PDF文件是否存在"
|
||||
if [ ! -f test_page_footnote.pdf ]; then
|
||||
LOG_ERROR "未找到生成的PDF文件"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤9:验证表格脚注是否在页面底部"
|
||||
pdftotext test_page_footnote.pdf - | grep -q "页面脚注内容"
|
||||
CHECK_RESULT $? 0 0 "表格脚注未在页面底部显示"
|
||||
|
||||
LOG_INFO "步骤10:清理测试生成的临时文件"
|
||||
rm -f test_table_footnote.aux test_table_footnote.log test_table_footnote.pdf
|
||||
rm -f test_page_footnote.aux test_page_footnote.log test_page_footnote.pdf
|
||||
|
||||
LOG_INFO "步骤11:恢复环境,如果测试前未安装则卸载软件包"
|
||||
if [ $already_installed -eq 0 ]; then
|
||||
dnf remove -y texlive-tablefootnote
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-tablefootnote失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,123 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-03-01
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试使用texlive-tablefootnote宏包编译基本LaTeX文档
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已经安装了texlive-tablefootnote宏包
|
||||
LOG_INFO "检查系统是否已安装texlive-tablefootnote宏包"
|
||||
rpm -q texlive-tablefootnote > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "texlive-tablefootnote宏包已安装,测试完成后将保持安装状态"
|
||||
ALREADY_INSTALLED=1
|
||||
else
|
||||
LOG_INFO "texlive-tablefootnote宏包未安装,将在测试过程中安装"
|
||||
ALREADY_INSTALLED=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有texlive-tablefootnote软件包
|
||||
LOG_INFO "检查yum源中是否存在texlive-tablefootnote软件包"
|
||||
dnf list available texlive-tablefootnote > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到texlive-tablefootnote软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "开始安装texlive-tablefootnote宏包"
|
||||
dnf install -y texlive-tablefootnote
|
||||
CHECK_RESULT $? 0 0 "安装texlive-tablefootnote宏包失败"
|
||||
LOG_INFO "texlive-tablefootnote宏包安装成功"
|
||||
fi
|
||||
|
||||
# 创建测试用的LaTeX文档
|
||||
LOG_INFO "创建测试用的LaTeX文档"
|
||||
cat > test_tablefootnote.tex << "EOF"
|
||||
\documentclass{article}
|
||||
\usepackage{tablefootnote}
|
||||
\begin{document}
|
||||
This is a test document for tablefootnote package.
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\begin{tabular}{|c|c|}
|
||||
\hline
|
||||
Column1 & Column2 \\
|
||||
\hline
|
||||
Data1 & Data2\tablefootnote{This is a table footnote} \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\caption{Test table with footnote}
|
||||
\end{table}
|
||||
|
||||
\end{document}
|
||||
EOF
|
||||
CHECK_RESULT $? 0 0 "创建测试LaTeX文档失败"
|
||||
|
||||
# 检查pdflatex命令是否存在
|
||||
LOG_INFO "检查pdflatex命令是否存在"
|
||||
command -v pdflatex > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "pdflatex命令不存在,无法编译LaTeX文档"
|
||||
# 如果之前安装了texlive-tablefootnote,现在需要卸载
|
||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "清理环境:卸载texlive-tablefootnote宏包"
|
||||
dnf remove -y texlive-tablefootnote
|
||||
fi
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 编译LaTeX文档
|
||||
LOG_INFO "使用pdflatex编译LaTeX文档"
|
||||
pdflatex -interaction=nonstopmode test_tablefootnote.tex > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "编译LaTeX文档失败"
|
||||
|
||||
# 检查是否生成了PDF文件
|
||||
LOG_INFO "检查是否生成了PDF文件"
|
||||
if [ -f test_tablefootnote.pdf ]; then
|
||||
LOG_INFO "PDF文件生成成功,texlive-tablefootnote宏包功能正常"
|
||||
else
|
||||
LOG_ERROR "PDF文件未生成,texlive-tablefootnote宏包可能存在问题"
|
||||
# 如果之前安装了texlive-tablefootnote,现在需要卸载
|
||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "清理环境:卸载texlive-tablefootnote宏包"
|
||||
dnf remove -y texlive-tablefootnote
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 清理测试文件
|
||||
LOG_INFO "清理测试生成的文件"
|
||||
rm -f test_tablefootnote.tex test_tablefootnote.pdf test_tablefootnote.aux test_tablefootnote.log test_tablefootnote.out
|
||||
|
||||
# 如果测试前未安装,则卸载软件包
|
||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "清理环境:卸载texlive-tablefootnote宏包"
|
||||
dnf remove -y texlive-tablefootnote
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-tablefootnote宏包失败"
|
||||
LOG_INFO "环境已恢复,texlive-tablefootnote宏包已卸载"
|
||||
else
|
||||
LOG_INFO "环境已恢复,保持texlive-tablefootnote宏包安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:texlive-tablefootnote宏包功能正常"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,77 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2025-11-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Verify access to documentation files
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 检查yum源中是否存在texlive-texworks-doc软件包
|
||||
LOG_INFO "检查yum源中是否存在texlive-texworks-doc软件包"
|
||||
dnf list available texlive-texworks-doc &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到texlive-texworks-doc软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装texlive-texworks-doc
|
||||
LOG_INFO "检查是否已安装texlive-texworks-doc"
|
||||
rpm -q texlive-texworks-doc &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
installed=true
|
||||
LOG_INFO "texlive-texworks-doc已安装,脚本结束后将保持安装状态"
|
||||
else
|
||||
installed=false
|
||||
LOG_INFO "texlive-texworks-doc未安装,将在测试步骤中安装并在脚本结束前卸载"
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "安装texlive-texworks-doc软件包"
|
||||
dnf install -y texlive-texworks-doc
|
||||
CHECK_RESULT $? 0 0 "安装texlive-texworks-doc失败"
|
||||
fi
|
||||
|
||||
# 验证文档文件访问
|
||||
LOG_INFO "验证文档文件访问"
|
||||
doc_path=$(rpm -ql texlive-texworks-doc | head -n 1)
|
||||
if [ -z "$doc_path" ]; then
|
||||
LOG_ERROR "未找到texlive-texworks-doc的文档文件"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOG_INFO "尝试访问文档文件: $doc_path"
|
||||
cat "$doc_path" &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "访问文档文件失败"
|
||||
|
||||
# 恢复环境
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载texlive-texworks-doc软件包"
|
||||
dnf remove -y texlive-texworks-doc
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-texworks-doc失败"
|
||||
|
||||
# 再次检查是否卸载成功
|
||||
rpm -q texlive-texworks-doc &>/dev/null
|
||||
CHECK_RESULT $? 1 0 "卸载后仍检测到texlive-texworks-doc存在"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完毕,环境已恢复"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user