diff --git a/suite2cases/function_test/pkg_test/freerdp/libwinpr-devel.json b/suite2cases/function_test/pkg_test/freerdp/libwinpr-devel.json index 53ef0947f95..7988fcd4fd9 100644 --- a/suite2cases/function_test/pkg_test/freerdp/libwinpr-devel.json +++ b/suite2cases/function_test/pkg_test/freerdp/libwinpr-devel.json @@ -6,10 +6,6 @@ "name": "test_libwinpr-devel_function_install", "desc": "Test the installation of libwinpr-devel package" }, - { - "name": "test_libwinpr-devel_function_check", - "desc": "Check if libwinpr-devel package is installed on the system" - }, { "name": "test_libwinpr-devel_function_remove", "desc": "Test the removal/uninstallation of libwinpr-devel package" @@ -17,26 +13,6 @@ { "name": "test_libwinpr-devel_function_update", "desc": "Test updating the libwinpr-devel package to the latest version" - }, - { - "name": "test_libwinpr-devel_function_verify", - "desc": "Verify the integrity of the installed libwinpr-devel package" - }, - { - "name": "test_libwinpr-devel_function_headers", - "desc": "Check the presence of essential header files after installation" - }, - { - "name": "test_libwinpr-devel_function_libs", - "desc": "Check the presence and linking of essential library files" - }, - { - "name": "test_libwinpr-devel_function_pkgconfig", - "desc": "Test pkg-config support for libwinpr-devel" - }, - { - "name": "test_libwinpr-devel_function_compile", - "desc": "Test compiling a simple program using libwinpr headers and libraries" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-bom.json b/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-bom.json index ada6000f366..4f1e8b0146f 100644 --- a/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-bom.json +++ b/suite2cases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-bom.json @@ -6,10 +6,6 @@ "name": "test_glassfish-jaxb-bom_install", "desc": "测试 glassfish-jaxb-bom 软件包的安装功能,验证安装过程是否成功。", "machine num": 1 - }, - { - "name": "test_glassfish-jaxb-bom_function_validation", - "desc": "测试 glassfish-jaxb-bom 的 XML 数据验证功能,确保其正确性。" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/gsettings-desktop-schemas/gsettings-desktop-schemas-devel.json b/suite2cases/function_test/pkg_test/gsettings-desktop-schemas/gsettings-desktop-schemas-devel.json index 2dc31dd7052..f4b35e11be4 100644 --- a/suite2cases/function_test/pkg_test/gsettings-desktop-schemas/gsettings-desktop-schemas-devel.json +++ b/suite2cases/function_test/pkg_test/gsettings-desktop-schemas/gsettings-desktop-schemas-devel.json @@ -10,10 +10,6 @@ "name": "test_gsettings-desktop-schemas-devel_verify", "desc": "验证gsettings-desktop-schemas-devel软件包是否已正确安装并包含必要的开发文件" }, - { - "name": "test_gsettings-desktop-schemas-devel_usage", - "desc": "测试使用gsettings-desktop-schemas-devel中的头文件进行简单编译" - }, { "name": "test_gsettings-desktop-schemas-devel_uninstall", "desc": "测试gsettings-desktop-schemas-devel软件包能否被成功卸载" diff --git a/suite2cases/function_test/pkg_test/libwebsockets/libwebsockets.json b/suite2cases/function_test/pkg_test/libwebsockets/libwebsockets.json index 7075db4e586..f0e94d9afbf 100644 --- a/suite2cases/function_test/pkg_test/libwebsockets/libwebsockets.json +++ b/suite2cases/function_test/pkg_test/libwebsockets/libwebsockets.json @@ -9,26 +9,6 @@ { "name": "test_libwebsockets_function_uninstall", "desc": "Test the uninstallation of libwebsockets package" - }, - { - "name": "test_libwebsockets_function_basic_echo", - "desc": "Test basic WebSocket echo server functionality" - }, - { - "name": "test_libwebsockets_function_ssl_support", - "desc": "Test WebSocket SSL/TLS secure connection" - }, - { - "name": "test_libwebsockets_function_multiple_clients", - "desc": "Test server handling multiple concurrent clients" - }, - { - "name": "test_libwebsockets_function_ping_pong", - "desc": "Test WebSocket ping-pong heartbeat mechanism" - }, - { - "name": "test_libwebsockets_function_version_check", - "desc": "Check installed libwebsockets library version" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/maven-doxia/maven-doxia-core.json b/suite2cases/function_test/pkg_test/maven-doxia/maven-doxia-core.json index b611c165b98..c11f043d2a3 100644 --- a/suite2cases/function_test/pkg_test/maven-doxia/maven-doxia-core.json +++ b/suite2cases/function_test/pkg_test/maven-doxia/maven-doxia-core.json @@ -6,10 +6,6 @@ "name": "test_maven-doxia-core_install", "desc": "测试maven-doxia-core软件包的安装功能", "machine num": 1 - }, - { - "name": "test_maven-doxia-core_function_parse", - "desc": "测试maven-doxia-core软件包的解析功能" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/python-hypothesis-fspaths/python3-hypothesis-fspaths.json b/suite2cases/function_test/pkg_test/python-hypothesis-fspaths/python3-hypothesis-fspaths.json index 4488589159d..1f6ce5846d2 100644 --- a/suite2cases/function_test/pkg_test/python-hypothesis-fspaths/python3-hypothesis-fspaths.json +++ b/suite2cases/function_test/pkg_test/python-hypothesis-fspaths/python3-hypothesis-fspaths.json @@ -6,10 +6,6 @@ "name": "test_python3-hypothesis-fspaths_install", "desc": "测试软件包 python3-hypothesis-fspaths 的安装功能,验证安装是否成功", "machine num": 1 - }, - { - "name": "test_python3-hypothesis-fspaths_function_filepath", - "desc": "测试软件包 python3-hypothesis-fspaths 的文件路径生成功能" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/python-tensorboard/python3-tensorboard.json b/suite2cases/function_test/pkg_test/python-tensorboard/python3-tensorboard.json index fe84f116a3c..76b66817505 100644 --- a/suite2cases/function_test/pkg_test/python-tensorboard/python3-tensorboard.json +++ b/suite2cases/function_test/pkg_test/python-tensorboard/python3-tensorboard.json @@ -13,50 +13,6 @@ { "name": "test_python3-tensorboard_tensorboard_bind_all", "desc": "测试使用 --bind_all 参数在所有公共接口上服务" - }, - { - "name": "test_python3-tensorboard_tensorboard_port", - "desc": "测试使用 --port 参数指定服务端口" - }, - { - "name": "test_python3-tensorboard_tensorboard_reuse_port", - "desc": "测试使用 --reuse_port 参数启用端口重用" - }, - { - "name": "test_python3-tensorboard_tensorboard_load_fast", - "desc": "测试使用 --load_fast 参数启用快速加载模式" - }, - { - "name": "test_python3-tensorboard_tensorboard_purge_orphaned_data", - "desc": "测试使用 --purge_orphaned_data 参数控制是否清除孤立数据" - }, - { - "name": "test_python3-tensorboard_tensorball_inspect", - "desc": "测试使用 --inspect 参数检查事件文件摘要" - }, - { - "name": "test_python3-tensorball_version_tb", - "desc": "测试使用 --version_tb 参数打印 TensorBoard 版本" - }, - { - "name": "test_python3-tensorboard_function_logdir_path", - "desc": "测试指定日志目录路径的功能" - }, - { - "name": "test_python3-tensorboard_tensorboard_inspect", - "desc": "测试使用 --inspect 参数检查事件文件摘要" - }, - { - "name": "test_python3-tensorboard_tensorboard_version_tb", - "desc": "测试使用 --version_tb 参数打印 TensorBoard 版本" - }, - { - "name": "test_python3-tensorboard_tensorball_path_prefix", - "desc": "测试使用 --path_prefix 参数设置相对路径前缀" - }, - { - "name": "test_python3-tensorboard_function_custom_tags", - "desc": "测试使用自定义标签的功能" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-i/texlive-fei.json b/suite2cases/function_test/pkg_test/texlive-split-i/texlive-fei.json deleted file mode 100644 index c6dec0434c2..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-i/texlive-fei.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-i/texlive-fei", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-fei_function_install", - "desc": "Test installation of texlive-fei package" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-n/texlive-ledmac.json b/suite2cases/function_test/pkg_test/texlive-split-n/texlive-ledmac.json deleted file mode 100644 index 6303184a661..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-n/texlive-ledmac.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-n/texlive-ledmac", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-ledmac_function_basic", - "desc": "Test basic functionality of texlive-ledmac" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-n/texlive-luainputenc.json b/suite2cases/function_test/pkg_test/texlive-split-n/texlive-luainputenc.json deleted file mode 100644 index 0a74c745a14..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-n/texlive-luainputenc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-n/texlive-luainputenc", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-luainputenc_function_load", - "desc": "Test loading the package" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-q/texlive-numname.json b/suite2cases/function_test/pkg_test/texlive-split-q/texlive-numname.json index a4694b0c417..8a0eb00219d 100644 --- a/suite2cases/function_test/pkg_test/texlive-split-q/texlive-numname.json +++ b/suite2cases/function_test/pkg_test/texlive-split-q/texlive-numname.json @@ -7,29 +7,9 @@ "desc": "测试texlive-numname软件包的安装功能,验证安装过程是否正常完成", "machine num": 1 }, - { - "name": "test_texlive-numname_function_render", - "desc": "测试texlive-numname软件包的渲染功能,验证是否能正确渲染数字名称" - }, { "name": "test_texlive-numname_uninstall", "desc": "测试texlive-numname软件包的卸载功能,验证卸载过程是否正常完成" - }, - { - "name": "test_texlive-numname_function_basic", - "desc": "测试texlive-numname的基本数字名称渲染功能" - }, - { - "name": "test_texlive-numname_function_format", - "desc": "测试texlive-numname的格式化选项功能" - }, - { - "name": "test_texlive-numname_function_lang", - "desc": "测试texlive-numname的多语言支持功能" - }, - { - "name": "test_texlive-numname_function_compile", - "desc": "测试texlive-numname在完整LaTeX文档中的编译功能" } ] } \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/texlive-split-z/texlive-amscdx.json b/suite2cases/function_test/pkg_test/texlive-split-z/texlive-amscdx.json deleted file mode 100644 index f1c545f6934..00000000000 --- a/suite2cases/function_test/pkg_test/texlive-split-z/texlive-amscdx.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx", - "machine num": 1, - "cases": [ - { - "name": "test_texlive-amscdx_function_compile", - "desc": "Test compilation of amscdx package" - }, - { - "name": "test_texlive-amscdx_function_install", - "desc": "Test installation of texlive-amscdx package" - }, - { - "name": "test_texlive-amscdx_function_uninstall", - "desc": "Test uninstallation of texlive-amscdx package" - }, - { - "name": "test_texlive-amscdx_function_check_installed", - "desc": "Test checking if texlive-amscdx is installed" - }, - { - "name": "test_texlive-amscdx_function_basic_usage", - "desc": "Test basic LaTeX usage of amscdx package" - }, - { - "name": "test_texlive-amscdx_function_commutative_diagram", - "desc": "Test drawing a simple commutative diagram" - } - ] -} \ No newline at end of file diff --git a/suite2cases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus.json b/suite2cases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus.json index 4ffbc6b6ab6..3a6dc5c27d8 100644 --- a/suite2cases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus.json +++ b/suite2cases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus.json @@ -2,14 +2,6 @@ "path": "$OET_PATH/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus", "machine num": 1, "cases": [ - { - "name": "test_uwsgi-plugin-cplusplus_function_load", - "desc": "Test loading the C++ plugin" - }, - { - "name": "test_uwsgi-plugin-cplusplus_function_exec", - "desc": "Test executing C++ code" - }, { "name": "test_uwsgi-plugin-cplusplus_function_config", "desc": "Test plugin configuration" @@ -21,18 +13,6 @@ { "name": "test_uwsgi-plugin-cplusplus_function_uninstall", "desc": "Test removal of the uwsgi-plugin-cplusplus package" - }, - { - "name": "test_uwsgi-plugin-cplusplus_function_version", - "desc": "Test checking the installed plugin version" - }, - { - "name": "test_uwsgi-plugin-cplusplus_function_integration", - "desc": "Test integration with uWSGI server" - }, - { - "name": "test_uwsgi-plugin-cplusplus_function_compile", - "desc": "Test compiling C++ app with plugin" } ] } \ No newline at end of file diff --git a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_check.sh b/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_check.sh deleted file mode 100644 index 27a94a8a419..00000000000 --- a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_check.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-21 -# @License : Mulan PSL v2 -# @Desc : Check if libwinpr-devel package is installed on the system -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:检查系统是否安装了libwinpr-devel软件包" - - # 检查libwinpr-devel软件包是否已安装 - LOG_INFO "检查libwinpr-devel软件包是否已安装" - rpm -q libwinpr-devel - if [ $? -eq 0 ]; then - LOG_INFO "libwinpr-devel软件包已安装" - installed=true - else - LOG_INFO "libwinpr-devel软件包未安装" - installed=false - fi - - # 检查yum源中是否有libwinpr-devel软件包 - LOG_INFO "检查yum源中是否有libwinpr-devel软件包" - dnf list available libwinpr-devel 2>/dev/null | grep -q libwinpr-devel - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中没有libwinpr-devel软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$installed" = false ]; then - LOG_INFO "安装libwinpr-devel软件包" - dnf install -y libwinpr-devel - CHECK_RESULT $? 0 0 "安装libwinpr-devel软件包失败" - fi - - # 验证软件包安装成功 - LOG_INFO "验证libwinpr-devel软件包安装成功" - rpm -q libwinpr-devel - CHECK_RESULT $? 0 0 "libwinpr-devel软件包未正确安装" - - # 测试软件包功能 - LOG_INFO "测试libwinpr-devel软件包功能" - # 这里可以添加具体的功能测试命令,例如检查头文件或库文件是否存在 - ls /usr/include/winpr2/winpr.h >/dev/null 2>&1 - CHECK_RESULT $? 0 0 "libwinpr-devel软件包功能测试失败" - - # 清理环境:如果测试前未安装,则卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载libwinpr-devel软件包" - dnf remove -y libwinpr-devel - CHECK_RESULT $? 0 0 "卸载libwinpr-devel软件包失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_compile.sh b/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_compile.sh deleted file mode 100644 index cefa45e8528..00000000000 --- a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_compile.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-21 -# @License : Mulan PSL v2 -# @Desc : Test compiling a simple program using libwinpr headers and libraries -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装libwinpr-devel - LOG_INFO "检查是否已安装libwinpr-devel软件包" - if rpm -q libwinpr-devel &> /dev/null; then - LOG_INFO "libwinpr-devel已安装,标记为保持安装状态" - KEEP_INSTALLED=1 - else - LOG_INFO "libwinpr-devel未安装,将在测试后卸载" - KEEP_INSTALLED=0 - fi - - # 检查yum源中是否有libwinpr-devel软件包 - LOG_INFO "检查yum源中是否有libwinpr-devel软件包" - if ! dnf list available libwinpr-devel &> /dev/null; then - LOG_ERROR "yum源中未找到libwinpr-devel软件包" - exit 255 - fi - - # 如果未安装,则安装libwinpr-devel - if [ $KEEP_INSTALLED -eq 0 ]; then - LOG_INFO "安装libwinpr-devel软件包" - dnf install -y libwinpr-devel - CHECK_RESULT $? 0 0 "安装libwinpr-devel失败" - fi - - # 创建测试C程序 - LOG_INFO "创建测试C程序" - cat > test_winpr.c << "EOF" - #include - #include - int main() { - printf("Testing libwinpr compilation\n"); - return 0; - } - EOF - - # 编译测试程序 - LOG_INFO "编译测试程序" - gcc -o test_winpr test_winpr.c -lwinpr - CHECK_RESULT $? 0 0 "编译测试程序失败" - - # 运行测试程序 - LOG_INFO "运行测试程序" - ./test_winpr - CHECK_RESULT $? 0 0 "运行测试程序失败" - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f test_winpr test_winpr.c - - # 如果测试前未安装,则卸载libwinpr-devel - if [ $KEEP_INSTALLED -eq 0 ]; then - LOG_INFO "卸载libwinpr-devel软件包" - dnf remove -y libwinpr-devel - CHECK_RESULT $? 0 0 "卸载libwinpr-devel失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_headers.sh b/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_headers.sh deleted file mode 100644 index 220422d17b8..00000000000 --- a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_headers.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-21 -# @License : Mulan PSL v2 -# @Desc : Check the presence of essential header files after installation -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:检查安装后必要的头文件是否存在" - - # 检查环境是否已安装libwinpr-devel - LOG_INFO "步骤1:检查libwinpr-devel是否已安装" - if dnf list installed libwinpr-devel &>/dev/null; then - LOG_INFO "libwinpr-devel已安装,测试结束后保持安装状态" - ALREADY_INSTALLED=1 - else - LOG_INFO "libwinpr-devel未安装,将在测试步骤中安装" - ALREADY_INSTALLED=0 - fi - - # 检查yum源中是否有libwinpr-devel软件包 - LOG_INFO "步骤2:检查yum源中是否存在libwinpr-devel软件包" - if ! dnf list available libwinpr-devel &>/dev/null; then - LOG_ERROR "yum源中未找到libwinpr-devel软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ $ALREADY_INSTALLED -eq 0 ]; then - LOG_INFO "步骤3:安装libwinpr-devel软件包" - dnf install -y libwinpr-devel - CHECK_RESULT $? 0 0 "安装libwinpr-devel失败" - fi - - # 检查必要的头文件是否存在 - LOG_INFO "步骤4:检查必要的头文件是否存在" - HEADER_FILES=( - "/usr/include/winpr/winpr.h" - "/usr/include/winpr/version.h" - "/usr/include/winpr/wtypes.h" - ) - - for header in "${HEADER_FILES[@]}"; do - if [ ! -f "$header" ]; then - LOG_ERROR "头文件 $header 不存在" - exit 1 - else - LOG_INFO "头文件 $header 存在" - fi - done - - LOG_INFO "步骤5:所有必要的头文件检查通过" - - # 环境恢复:如果测试前未安装,则卸载软件包 - if [ $ALREADY_INSTALLED -eq 0 ]; then - LOG_INFO "步骤6:恢复环境,卸载libwinpr-devel软件包" - dnf remove -y libwinpr-devel - CHECK_RESULT $? 0 0 "卸载libwinpr-devel失败" - LOG_INFO "环境已恢复,libwinpr-devel已卸载" - else - LOG_INFO "步骤6:保持libwinpr-devel安装状态,无需卸载" - fi - - LOG_INFO "测试完成:所有必要的头文件在安装后均存在" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_libs.sh b/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_libs.sh deleted file mode 100644 index 86b615fce8d..00000000000 --- a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_libs.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-21 -# @License : Mulan PSL v2 -# @Desc : Check the presence and linking of essential library files -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:检查必需库文件的存在和链接" - - # 定义软件包名称 - PACKAGE_NAME="libwinpr-devel" - LOG_INFO "步骤1:检查yum源中是否存在软件包 $PACKAGE_NAME" - if ! dnf list available "$PACKAGE_NAME" &>/dev/null; then - LOG_ERROR "软件包 $PACKAGE_NAME 在yum源中不存在" - exit 255 - fi - - # 检查是否已安装 - LOG_INFO "步骤2:检查系统是否已安装 $PACKAGE_NAME" - if rpm -q "$PACKAGE_NAME" &>/dev/null; then - LOG_INFO "软件包 $PACKAGE_NAME 已安装,脚本结束后将保持安装状态" - INSTALLED_BEFORE=true - else - LOG_INFO "软件包 $PACKAGE_NAME 未安装,将在测试步骤中安装" - INSTALLED_BEFORE=false - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED_BEFORE" = false ]; then - LOG_INFO "步骤3:安装软件包 $PACKAGE_NAME" - dnf install -y "$PACKAGE_NAME" - CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败" - fi - - # 检查必需库文件是否存在 - LOG_INFO "步骤4:检查必需库文件是否存在" - LIB_FILES=("/usr/lib64/libwinpr2.so" "/usr/lib64/libwinpr2.a") - for lib in "${LIB_FILES[@]}"; do - if [ -f "$lib" ]; then - LOG_INFO "库文件 $lib 存在" - else - LOG_ERROR "库文件 $lib 不存在" - exit 1 - fi - done - - # 检查库文件是否正确链接 - LOG_INFO "步骤5:检查库文件是否正确链接" - for lib in "${LIB_FILES[@]}"; do - if [ -L "$lib" ]; then - LOG_INFO "库文件 $lib 是一个符号链接" - link_target=$(readlink -f "$lib") - if [ -f "$link_target" ]; then - LOG_INFO "链接目标 $link_target 存在" - else - LOG_ERROR "链接目标 $link_target 不存在" - exit 1 - fi - else - LOG_INFO "库文件 $lib 不是一个符号链接" - fi - done - - # 清理环境:如果之前未安装,则卸载软件包 - if [ "$INSTALLED_BEFORE" = false ]; then - LOG_INFO "步骤6:卸载软件包 $PACKAGE_NAME" - dnf remove -y "$PACKAGE_NAME" - CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败" - fi - - LOG_INFO "测试完成:必需库文件的存在和链接检查通过" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_pkgconfig.sh b/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_pkgconfig.sh deleted file mode 100644 index 16027e185ea..00000000000 --- a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_pkgconfig.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-21 -# @License : Mulan PSL v2 -# @Desc : Test pkg-config support for libwinpr-devel -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查pkg-config对libwinpr-devel的支持 - LOG_INFO "开始测试:Test pkg-config support for libwinpr-devel" - - # 检查是否已安装libwinpr-devel - LOG_INFO "步骤1:检查libwinpr-devel是否已安装" - if dnf list installed libwinpr-devel &>/dev/null; then - LOG_INFO "libwinpr-devel已安装" - ALREADY_INSTALLED=true - else - LOG_INFO "libwinpr-devel未安装" - ALREADY_INSTALLED=false - fi - - # 检查yum源中是否有libwinpr-devel软件包 - LOG_INFO "步骤2:检查yum源中是否有libwinpr-devel软件包" - if ! dnf list available libwinpr-devel &>/dev/null; then - LOG_ERROR "yum源中未找到libwinpr-devel软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$ALREADY_INSTALLED" = false ]; then - LOG_INFO "步骤3:安装libwinpr-devel软件包" - dnf install -y libwinpr-devel - CHECK_RESULT $? 0 0 "安装libwinpr-devel失败" - fi - - # 测试pkg-config支持 - LOG_INFO "步骤4:测试pkg-config对libwinpr-devel的支持" - - # 检查pkg-config命令是否存在 - if ! command -v pkg-config &>/dev/null; then - LOG_ERROR "pkg-config命令不存在" - exit 255 - fi - - # 检查libwinpr-devel是否提供.pc文件 - LOG_INFO "步骤4.1:检查libwinpr-devel是否提供.pc文件" - pkg-config --list-all | grep -i winpr - CHECK_RESULT $? 0 0 "libwinpr-devel未提供pkg-config支持" - - # 测试pkg-config查询功能 - LOG_INFO "步骤4.2:测试pkg-config查询功能" - pkg-config --cflags winpr - CHECK_RESULT $? 0 0 "查询winpr的cflags失败" - - pkg-config --libs winpr - CHECK_RESULT $? 0 0 "查询winpr的libs失败" - - # 测试pkg-config版本查询 - LOG_INFO "步骤4.3:测试pkg-config版本查询" - pkg-config --modversion winpr - CHECK_RESULT $? 0 0 "查询winpr版本失败" - - # 测试pkg-config存在性检查 - LOG_INFO "步骤4.4:测试pkg-config存在性检查" - pkg-config --exists winpr - CHECK_RESULT $? 0 0 "winpr.pc文件不存在或不完整" - - # 清理环境 - LOG_INFO "步骤5:清理测试环境" - - # 如果测试前未安装,则卸载软件包 - if [ "$ALREADY_INSTALLED" = false ]; then - LOG_INFO "卸载libwinpr-devel软件包" - dnf remove -y libwinpr-devel - CHECK_RESULT $? 0 0 "卸载libwinpr-devel失败" - LOG_INFO "已恢复到测试前的环境状态" - else - LOG_INFO "保持libwinpr-devel安装状态" - fi - - LOG_INFO "测试完成:pkg-config对libwinpr-devel的支持测试通过" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_verify.sh b/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_verify.sh deleted file mode 100644 index d17892bc927..00000000000 --- a/testcases/function_test/pkg_test/freerdp/libwinpr-devel/test_libwinpr-devel_function_verify.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-21 -# @License : Mulan PSL v2 -# @Desc : Verify the integrity of the installed libwinpr-devel package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始验证 libwinpr-devel 软件包的完整性" - LOG_INFO "步骤1: 检查系统中是否已安装 libwinpr-devel 软件包" - if rpm -q libwinpr-devel > /dev/null 2>&1; then - LOG_INFO "libwinpr-devel 软件包已安装,脚本结束时将保持安装状态" - already_installed=true - else - LOG_INFO "libwinpr-devel 软件包未安装,将在测试过程中安装并在结束后卸载" - already_installed=false - fi - - LOG_INFO "步骤2: 检查 yum 源中是否存在 libwinpr-devel 软件包" - if ! dnf list available libwinpr-devel > /dev/null 2>&1; then - LOG_ERROR "yum 源中未找到 libwinpr-devel 软件包" - exit 255 - fi - - if [ "$already_installed" = "false" ]; then - LOG_INFO "步骤3: 安装 libwinpr-devel 软件包" - dnf install -y libwinpr-devel - CHECK_RESULT $? 0 0 "安装 libwinpr-devel 软件包失败" - fi - - LOG_INFO "步骤4: 验证 libwinpr-devel 软件包的文件完整性" - rpm -V libwinpr-devel - CHECK_RESULT $? 0 0 "libwinpr-devel 软件包文件完整性验证失败" - - LOG_INFO "步骤5: 验证 libwinpr-devel 软件包的头文件是否存在" - if [ -d /usr/include/winpr2 ]; then - LOG_INFO "libwinpr-devel 头文件目录存在" - if [ -f /usr/include/winpr2/winpr.h ]; then - LOG_INFO "找到 winpr.h 头文件" - else - LOG_ERROR "未找到 winpr.h 头文件" - exit 1 - fi - else - LOG_ERROR "libwinpr-devel 头文件目录不存在" - exit 1 - fi - - LOG_INFO "步骤6: 验证 libwinpr-devel 软件包的 pkg-config 文件" - if pkg-config --exists winpr2; then - LOG_INFO "winpr2 pkg-config 文件存在" - pkg-config --modversion winpr2 - CHECK_RESULT $? 0 0 "获取 winpr2 版本信息失败" - else - LOG_ERROR "winpr2 pkg-config 文件不存在" - exit 1 - fi - - LOG_INFO "步骤7: 清理测试环境" - if [ "$already_installed" = "false" ]; then - LOG_INFO "卸载测试安装的 libwinpr-devel 软件包" - dnf remove -y libwinpr-devel - CHECK_RESULT $? 0 0 "卸载 libwinpr-devel 软件包失败" - else - LOG_INFO "保持原安装状态,不卸载 libwinpr-devel 软件包" - fi - - LOG_INFO "libwinpr-devel 软件包完整性验证完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-bom/test_glassfish-jaxb-bom_function_validation.sh b/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-bom/test_glassfish-jaxb-bom_function_validation.sh deleted file mode 100644 index d2b55bc42d8..00000000000 --- a/testcases/function_test/pkg_test/glassfish-jaxb/glassfish-jaxb-bom/test_glassfish-jaxb-bom_function_validation.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-03 -# @License : Mulan PSL v2 -# @Desc : 测试 glassfish-jaxb-bom 的 XML 数据验证功能,确保其正确性。 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - LOG_INFO "开始测试 glassfish-jaxb-bom 的 XML 数据验证功能" - - # 检查软件包是否在yum源中 - LOG_INFO "检查 glassfish-jaxb-bom 是否在yum源中" - dnf list available glassfish-jaxb-bom &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "glassfish-jaxb-bom 不在yum源中" - exit 255 - fi - - # 检查环境是否已安装 glassfish-jaxb-bom - LOG_INFO "检查环境是否已安装 glassfish-jaxb-bom" - rpm -q glassfish-jaxb-bom &>/dev/null - if [ $? -eq 0 ]; then - installed=true - LOG_INFO "glassfish-jaxb-bom 已安装" - else - installed=false - LOG_INFO "glassfish-jaxb-bom 未安装,将进行安装" - fi - - # 如果未安装,则安装软件包 - if [ "$installed" = false ]; then - LOG_INFO "安装 glassfish-jaxb-bom" - dnf install -y glassfish-jaxb-bom - CHECK_RESULT $? 0 0 "安装 glassfish-jaxb-bom 失败" - fi - - # 测试 XML 数据验证功能 - LOG_INFO "测试 XML 数据验证功能" - - # 示例命令:验证XML文件 - xml_file="test.xml" - if [ ! -f "$xml_file" ]; then - LOG_ERROR "测试文件 $xml_file 不存在" - exit 255 - fi - - # 使用 jaxb 工具验证 XML(假设命令为 jaxb-validate) - jaxb-validate "$xml_file" - CHECK_RESULT $? 0 0 "XML 数据验证失败" - - # 清理环境:如果脚本开始时未安装,则卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载 glassfish-jaxb-bom" - dnf remove -y glassfish-jaxb-bom - CHECK_RESULT $? 0 0 "卸载 glassfish-jaxb-bom 失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/gsettings-desktop-schemas/gsettings-desktop-schemas-devel/test_gsettings-desktop-schemas-devel_usage.sh b/testcases/function_test/pkg_test/gsettings-desktop-schemas/gsettings-desktop-schemas-devel/test_gsettings-desktop-schemas-devel_usage.sh deleted file mode 100644 index 4cbb160f789..00000000000 --- a/testcases/function_test/pkg_test/gsettings-desktop-schemas/gsettings-desktop-schemas-devel/test_gsettings-desktop-schemas-devel_usage.sh +++ /dev/null @@ -1,93 +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-19 -# @License : Mulan PSL v2 -# @Desc : 测试使用gsettings-desktop-schemas-devel中的头文件进行简单编译 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装gsettings-desktop-schemas-devel软件包 - LOG_INFO "检查是否已安装gsettings-desktop-schemas-devel软件包" - rpm -q gsettings-desktop-schemas-devel > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "gsettings-desktop-schemas-devel软件包已安装" - INSTALLED="true" - else - LOG_INFO "gsettings-desktop-schemas-devel软件包未安装" - INSTALLED="false" - fi - - # 检查yum源中是否存在gsettings-desktop-schemas-devel软件包 - LOG_INFO "检查yum源中是否存在gsettings-desktop-schemas-devel软件包" - dnf list available gsettings-desktop-schemas-devel > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在gsettings-desktop-schemas-devel软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = "false" ]; then - LOG_INFO "开始安装gsettings-desktop-schemas-devel软件包" - dnf install -y gsettings-desktop-schemas-devel - CHECK_RESULT $? 0 0 "安装gsettings-desktop-schemas-devel软件包失败" - LOG_INFO "gsettings-desktop-schemas-devel软件包安装成功" - fi - - # 检查gsettings-desktop-schemas-devel提供的头文件是否存在 - LOG_INFO "检查gsettings-desktop-schemas-devel提供的头文件是否存在" - if [ ! -f /usr/include/gsettings-desktop-schemas/gsettings-desktop-schemas.h ]; then - LOG_ERROR "gsettings-desktop-schemas.h头文件不存在" - exit 255 - fi - LOG_INFO "gsettings-desktop-schemas.h头文件存在" - - # 创建一个简单的C程序,使用gsettings-desktop-schemas-devel的头文件 - LOG_INFO "创建测试C程序" - cat > test_gsettings.c << "EOF" - #include - #include - - int main() { - printf("gsettings-desktop-schemas-devel头文件测试成功\n"); - return 0; - } - EOF - - # 编译测试程序 - LOG_INFO "编译测试C程序" - gcc -o test_gsettings test_gsettings.c $(pkg-config --cflags --libs gsettings-desktop-schemas) - CHECK_RESULT $? 0 0 "编译测试程序失败" - - # 运行测试程序 - LOG_INFO "运行测试程序" - ./test_gsettings - CHECK_RESULT $? 0 0 "运行测试程序失败" - - # 清理测试程序 - LOG_INFO "清理测试程序" - rm -f test_gsettings test_gsettings.c - - # 如果之前未安装,则卸载软件包 - if [ "$INSTALLED" = "false" ]; then - LOG_INFO "卸载gsettings-desktop-schemas-devel软件包" - dnf remove -y gsettings-desktop-schemas-devel - CHECK_RESULT $? 0 0 "卸载gsettings-desktop-schemas-devel软件包失败" - LOG_INFO "gsettings-desktop-schemas-devel软件包卸载成功" - fi -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_basic_echo.sh b/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_basic_echo.sh deleted file mode 100644 index a6b659183b8..00000000000 --- a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_basic_echo.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-04-04 -# @License : Mulan PSL v2 -# @Desc : Test basic WebSocket echo server functionality -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - set -e - - LOG_INFO "开始测试:Test basic WebSocket echo server functionality" - - LOG_INFO "步骤1:检查libwebsockets软件包是否在yum源中" - if ! dnf list --available libwebsockets 2>&1 | grep -q "libwebsockets"; then - LOG_ERROR "yum源中未找到libwebsockets软件包" - exit 255 - fi - - LOG_INFO "步骤2:检查系统是否已安装libwebsockets" - if rpm -q libwebsockets &> /dev/null; then - INSTALLED=true - LOG_INFO "libwebsockets已安装,测试后将保持安装状态" - else - INSTALLED=false - LOG_INFO "libwebsockets未安装,将在测试前安装" - fi - - if [ "$INSTALLED" = false ]; then - LOG_INFO "步骤3:安装libwebsockets软件包" - dnf install -y libwebsockets - CHECK_RESULT $? 0 0 "安装libwebsockets失败" - fi - - LOG_INFO "步骤4:检查libwebsockets-test-server命令是否存在" - if ! command -v libwebsockets-test-server &> /dev/null; then - LOG_ERROR "libwebsockets-test-server命令不存在" - exit 255 - fi - - LOG_INFO "步骤5:启动libwebsockets echo服务器" - libwebsockets-test-server --port=7681 & - SERVER_PID=$! - sleep 2 - CHECK_RESULT $? 0 0 "启动libwebsockets echo服务器失败" - - LOG_INFO "步骤6:使用wscat工具测试WebSocket echo功能" - if ! command -v wscat &> /dev/null; then - LOG_INFO "wscat未安装,尝试安装nodejs-ws工具" - if ! dnf list --available nodejs-ws 2>&1 | grep -q "nodejs-ws"; then - LOG_ERROR "yum源中未找到nodejs-ws软件包" - kill $SERVER_PID 2>/dev/null - exit 255 - fi - dnf install -y nodejs-ws - CHECK_RESULT $? 0 0 "安装nodejs-ws失败" - WS_INSTALLED=true - else - WS_INSTALLED=false - fi - - LOG_INFO "步骤7:发送测试消息到WebSocket服务器" - echo "{"test": "message"}" | timeout 5 wscat -c ws://localhost:7681 2>&1 | grep -q "{"test": "message"}" - CHECK_RESULT $? 0 0 "WebSocket echo功能测试失败" - - LOG_INFO "步骤8:停止libwebsockets echo服务器" - kill $SERVER_PID - CHECK_RESULT $? 0 0 "停止libwebsockets echo服务器失败" - - LOG_INFO "步骤9:清理测试环境" - if [ "$WS_INSTALLED" = true ]; then - LOG_INFO "卸载测试期间安装的nodejs-ws" - dnf remove -y nodejs-ws - CHECK_RESULT $? 0 0 "卸载nodejs-ws失败" - fi - - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载测试期间安装的libwebsockets" - dnf remove -y libwebsockets - CHECK_RESULT $? 0 0 "卸载libwebsockets失败" - fi - - LOG_INFO "测试完成:WebSocket echo服务器基本功能测试通过" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_multiple_clients.sh b/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_multiple_clients.sh deleted file mode 100644 index 40ae497219b..00000000000 --- a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_multiple_clients.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-04-04 -# @License : Mulan PSL v2 -# @Desc : Test server handling multiple concurrent clients -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "测试开始:测试服务器处理多个并发客户端" - - # 检查libwebsockets软件包是否在yum源中 - LOG_INFO "步骤1:检查libwebsockets软件包是否在yum源中" - if ! dnf list available libwebsockets 2>/dev/null | grep -q libwebsockets; then - LOG_ERROR "libwebsockets软件包不在yum源中" - exit 255 - fi - - # 检查libwebsockets是否已安装 - LOG_INFO "步骤2:检查libwebsockets是否已安装" - if rpm -q libwebsockets &>/dev/null; then - LIBWEBSOCKETS_INSTALLED=true - LOG_INFO "libwebsockets已安装,脚本结束后将保持安装状态" - else - LIBWEBSOCKETS_INSTALLED=false - LOG_INFO "libwebsockets未安装,将作为测试步骤安装" - fi - - # 如果未安装,则安装libwebsockets - if [ "$LIBWEBSOCKETS_INSTALLED" = false ]; then - LOG_INFO "步骤3:安装libwebsockets" - dnf install -y libwebsockets - CHECK_RESULT $? 0 0 "安装libwebsockets失败" - fi - - # 启动libwebsockets测试服务器 - LOG_INFO "步骤4:启动libwebsockets测试服务器" - /usr/bin/libwebsockets-test-server & - SERVER_PID=$! - sleep 2 - CHECK_RESULT $? 0 0 "启动libwebsockets测试服务器失败" - - # 测试多个并发客户端连接 - LOG_INFO "步骤5:测试多个并发客户端连接" - for i in {1..5}; do - /usr/bin/libwebsockets-test-client & - CLIENT_PIDS[$i]=$! - done - - # 等待所有客户端进程完成 - for pid in ${CLIENT_PIDS[@]}; do - wait $pid - CHECK_RESULT $? 0 0 "客户端连接失败" - done - - # 停止测试服务器 - LOG_INFO "步骤6:停止libwebsockets测试服务器" - kill $SERVER_PID - wait $SERVER_PID 2>/dev/null - CHECK_RESULT $? 0 0 "停止libwebsockets测试服务器失败" - - # 如果测试前未安装,则卸载libwebsockets - if [ "$LIBWEBSOCKETS_INSTALLED" = false ]; then - LOG_INFO "步骤7:卸载libwebsockets" - dnf remove -y libwebsockets - CHECK_RESULT $? 0 0 "卸载libwebsockets失败" - fi - - LOG_INFO "测试结束:服务器成功处理多个并发客户端" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_ping_pong.sh b/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_ping_pong.sh deleted file mode 100644 index 88c3fe01f95..00000000000 --- a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_ping_pong.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-04-04 -# @License : Mulan PSL v2 -# @Desc : Test WebSocket ping-pong heartbeat mechanism -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test WebSocket ping-pong heartbeat mechanism" - - # 定义软件包名称 - PACKAGE_NAME="libwebsockets" - LOG_INFO "检查系统中是否已安装 $PACKAGE_NAME" - if rpm -q $PACKAGE_NAME &> /dev/null; then - LOG_INFO "$PACKAGE_NAME 已安装,脚本结束后将保持安装状态" - INSTALLED_BEFORE=true - else - LOG_INFO "$PACKAGE_NAME 未安装,将在测试前安装,测试后卸载" - INSTALLED_BEFORE=false - fi - - # 检查yum源中是否存在该软件包 - LOG_INFO "检查yum源中是否存在 $PACKAGE_NAME 软件包" - if ! dnf list available $PACKAGE_NAME &> /dev/null; then - LOG_ERROR "yum源中未找到 $PACKAGE_NAME 软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED_BEFORE" = false ]; then - LOG_INFO "安装 $PACKAGE_NAME 软件包" - dnf install -y $PACKAGE_NAME - CHECK_RESULT $? 0 0 "安装 $PACKAGE_NAME 失败" - fi - - # 检查libwebsockets是否支持ping-pong参数 - LOG_INFO "检查libwebsockets是否支持ping-pong参数" - if ! libwebsockets-test-server --help 2>&1 | grep -q "ping-pong"; then - LOG_ERROR "libwebsockets不支持ping-pong参数" - exit 255 - fi - - # 启动libwebsockets测试服务器 - LOG_INFO "启动libwebsockets测试服务器" - libwebsockets-test-server --ping-pong & - SERVER_PID=$! - sleep 2 - CHECK_RESULT $? 0 0 "启动libwebsockets测试服务器失败" - - # 使用libwebsockets测试客户端发送ping消息 - LOG_INFO "使用libwebsockets测试客户端发送ping消息" - libwebsockets-test-client --ping - CHECK_RESULT $? 0 0 "发送ping消息失败" - - # 检查服务器是否收到ping并回复pong - LOG_INFO "检查服务器是否收到ping并回复pong" - if ps -p $SERVER_PID > /dev/null; then - LOG_INFO "服务器正常运行,ping-pong机制正常" - else - LOG_ERROR "服务器异常退出,ping-pong机制可能存在问题" - exit 1 - fi - - # 停止测试服务器 - LOG_INFO "停止测试服务器" - kill $SERVER_PID - CHECK_RESULT $? 0 0 "停止测试服务器失败" - - # 清理环境:如果之前未安装,则卸载软件包 - if [ "$INSTALLED_BEFORE" = 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 WebSocket ping-pong heartbeat mechanism" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_ssl_support.sh b/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_ssl_support.sh deleted file mode 100644 index 4f835ae2c7e..00000000000 --- a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_ssl_support.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-04-04 -# @License : Mulan PSL v2 -# @Desc : Test WebSocket SSL/TLS secure connection -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试WebSocket SSL/TLS安全连接功能" - LOG_INFO "步骤1: 检查系统中是否已安装libwebsockets软件包" - rpm -q libwebsockets >/dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "libwebsockets软件包已安装,测试结束后保持安装状态" - INSTALLED=true - else - LOG_INFO "libwebsockets软件包未安装,将在测试过程中安装" - INSTALLED=false - fi - - LOG_INFO "步骤2: 检查yum源中是否存在libwebsockets软件包" - dnf list available libwebsockets >/dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum源中未找到libwebsockets软件包" - - if [ "$INSTALLED" = "false" ]; then - LOG_INFO "步骤3: 安装libwebsockets软件包" - dnf install -y libwebsockets >/dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装libwebsockets软件包失败" - fi - - LOG_INFO "步骤4: 检查libwebsockets是否支持SSL/TLS" - libwebsockets-test-server --help 2>&1 | grep -q -- "--ssl" - CHECK_RESULT $? 0 255 "libwebsockets不支持SSL/TLS参数" - - LOG_INFO "步骤5: 启动支持SSL/TLS的WebSocket测试服务器" - libwebsockets-test-server --port 7681 --ssl & - SERVER_PID=$! - sleep 2 - - LOG_INFO "步骤6: 检查WebSocket测试服务器进程是否正常运行" - ps -p $SERVER_PID >/dev/null 2>&1 - CHECK_RESULT $? 0 0 "WebSocket测试服务器启动失败" - - LOG_INFO "步骤7: 测试SSL/TLS WebSocket连接" - wscat -c wss://localhost:7681 --no-check 2>&1 | grep -q "Connected" - CHECK_RESULT $? 0 0 "SSL/TLS WebSocket连接失败" - - LOG_INFO "步骤8: 停止WebSocket测试服务器" - kill $SERVER_PID 2>/dev/null - wait $SERVER_PID 2>/dev/null - - LOG_INFO "步骤9: 清理测试环境" - if [ "$INSTALLED" = "false" ]; then - LOG_INFO "卸载测试过程中安装的libwebsockets软件包" - dnf remove -y libwebsockets >/dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载libwebsockets软件包失败" - fi - - LOG_INFO "WebSocket SSL/TLS安全连接功能测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_version_check.sh b/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_version_check.sh deleted file mode 100644 index 4eacc1e35af..00000000000 --- a/testcases/function_test/pkg_test/libwebsockets/libwebsockets/test_libwebsockets_function_version_check.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-04-04 -# @License : Mulan PSL v2 -# @Desc : Check installed libwebsockets library version -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:检查已安装的libwebsockets库版本" - - # 定义软件包名称 - PACKAGE_NAME="libwebsockets" - - # 步骤1:检查yum源中是否存在libwebsockets软件包 - LOG_INFO "步骤1:检查yum源中是否存在${PACKAGE_NAME}软件包" - if ! dnf list available ${PACKAGE_NAME} &>/dev/null; then - LOG_ERROR "yum源中未找到${PACKAGE_NAME}软件包" - exit 255 - fi - - # 步骤2:检查系统是否已安装libwebsockets - LOG_INFO "步骤2:检查系统是否已安装${PACKAGE_NAME}" - if rpm -q ${PACKAGE_NAME} &>/dev/null; then - LOG_INFO "${PACKAGE_NAME}已安装,标记为已安装状态" - INSTALLED_BEFORE_TEST=true - else - LOG_INFO "${PACKAGE_NAME}未安装,标记为未安装状态" - INSTALLED_BEFORE_TEST=false - fi - - # 步骤3:如果未安装,则安装libwebsockets - if [ "${INSTALLED_BEFORE_TEST}" = "false" ]; then - LOG_INFO "步骤3:安装${PACKAGE_NAME}软件包" - dnf install -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}失败" - fi - - # 步骤4:检查libwebsockets版本 - LOG_INFO "步骤4:检查libwebsockets库版本" - if command -v libwebsockets-test-server &>/dev/null; then - LOG_INFO "使用libwebsockets-test-server检查版本" - libwebsockets-test-server --version - CHECK_RESULT $? 0 0 "获取libwebsockets版本失败" - elif command -v pkg-config &>/dev/null; then - LOG_INFO "使用pkg-config检查版本" - pkg-config --modversion libwebsockets - CHECK_RESULT $? 0 0 "获取libwebsockets版本失败" - else - LOG_ERROR "无法找到检查libwebsockets版本的命令" - exit 255 - fi - - # 步骤5:清理环境,恢复到之前的状态 - LOG_INFO "步骤5:清理环境" - if [ "${INSTALLED_BEFORE_TEST}" = "false" ]; then - LOG_INFO "卸载${PACKAGE_NAME}软件包" - dnf remove -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}失败" - else - LOG_INFO "保持${PACKAGE_NAME}的安装状态" - fi - - LOG_INFO "测试完成:检查已安装的libwebsockets库版本" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/maven-doxia/maven-doxia-core/test_maven-doxia-core_function_parse.sh b/testcases/function_test/pkg_test/maven-doxia/maven-doxia-core/test_maven-doxia-core_function_parse.sh deleted file mode 100644 index fcbbe55f92f..00000000000 --- a/testcases/function_test/pkg_test/maven-doxia/maven-doxia-core/test_maven-doxia-core_function_parse.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-01 -# @License : Mulan PSL v2 -# @Desc : 测试maven-doxia-core软件包的解析功能 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装maven-doxia-core - LOG_INFO "检查是否已安装maven-doxia-core" - rpm -q maven-doxia-core > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "maven-doxia-core已安装" - installed=true - else - LOG_INFO "maven-doxia-core未安装" - installed=false - fi - - # 检查yum源中是否存在maven-doxia-core - LOG_INFO "检查yum源中是否存在maven-doxia-core" - dnf list available maven-doxia-core > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在maven-doxia-core软件包" - exit 255 - fi - - # 如果未安装,则安装maven-doxia-core - if [ "$installed" = false ]; then - LOG_INFO "开始安装maven-doxia-core" - dnf install -y maven-doxia-core > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装maven-doxia-core失败" - fi - - # 测试解析功能 - LOG_INFO "测试maven-doxia-core的解析功能" - mvn doxia:parse > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "解析功能测试失败" - - # 如果脚本开始时未安装,则在结束时卸载 - if [ "$installed" = false ]; then - LOG_INFO "卸载maven-doxia-core" - dnf remove -y maven-doxia-core > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载maven-doxia-core失败" - fi - - LOG_INFO "测试脚本执行完毕" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-hypothesis-fspaths/python3-hypothesis-fspaths/test_python3-hypothesis-fspaths_function_filepath.sh b/testcases/function_test/pkg_test/python-hypothesis-fspaths/python3-hypothesis-fspaths/test_python3-hypothesis-fspaths_function_filepath.sh deleted file mode 100644 index 59f1b95ad83..00000000000 --- a/testcases/function_test/pkg_test/python-hypothesis-fspaths/python3-hypothesis-fspaths/test_python3-hypothesis-fspaths_function_filepath.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-06 -# @License : Mulan PSL v2 -# @Desc : 测试软件包 python3-hypothesis-fspaths 的文件路径生成功能 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查python3-hypothesis-fspaths是否已安装 - LOG_INFO "检查python3-hypothesis-fspaths是否已安装" - if rpm -q python3-hypothesis-fspaths &>/dev/null; then - LOG_INFO "python3-hypothesis-fspaths已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "python3-hypothesis-fspaths未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否存在python3-hypothesis-fspaths软件包 - LOG_INFO "检查yum源中是否存在python3-hypothesis-fspaths软件包" - if ! dnf list available python3-hypothesis-fspaths &>/dev/null; then - LOG_ERROR "yum源中不存在python3-hypothesis-fspaths软件包" - exit 255 - fi - - # 安装python3-hypothesis-fspaths软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装python3-hypothesis-fspaths软件包" - dnf install -y python3-hypothesis-fspaths - CHECK_RESULT $? 0 0 "安装python3-hypothesis-fspaths失败" - fi - - # 测试文件路径生成功能 - LOG_INFO "测试python3-hypothesis-fspaths的文件路径生成功能" - TEST_FILE="/tmp/test_file_path" - python3 -c "from hypothesis.extra.fspaths import fspaths; print(next(fspaths()))" > "$TEST_FILE" 2>&1 - CHECK_RESULT $? 0 0 "文件路径生成功能测试失败" - - # 检查生成的路径是否有效 - LOG_INFO "检查生成的路径是否有效" - if [ -f "$TEST_FILE" ]; then - LOG_INFO "文件路径生成成功,路径内容为: $(cat "$TEST_FILE")" - else - LOG_ERROR "文件路径生成失败" - exit 1 - fi - - # 清理测试文件 - LOG_INFO "清理测试文件" - rm -f "$TEST_FILE" - - # 如果测试前未安装,则卸载软件包以恢复环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载python3-hypothesis-fspaths软件包以恢复环境" - dnf remove -y python3-hypothesis-fspaths - CHECK_RESULT $? 0 0 "卸载python3-hypothesis-fspaths失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorball_version_tb.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorball_version_tb.sh deleted file mode 100644 index a07c99d101d..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorball_version_tb.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-01 -# @License : Mulan PSL v2 -# @Desc : 测试使用 --version_tb 参数打印 TensorBoard 版本 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - LOG_INFO "开始测试使用 --version_tb 参数打印 TensorBoard 版本" - - # 检查是否已安装 python3-tensorball - LOG_INFO "检查 python3-tensorball 是否已安装" - dnf list installed python3-tensorball > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "python3-tensorball 已安装,测试结束后将保持安装状态" - INSTALLED=true - else - LOG_INFO "python3-tensorball 未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否有 python3-tensorball - LOG_INFO "检查 yum 源中是否有 python3-tensorball" - dnf list available python3-tensorball > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum 源中未找到 python3-tensorball 软件包" - exit 255 - fi - - # 如果未安装,则安装 python3-tensorball - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装 python3-tensorball" - dnf install -y python3-tensorball > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装 python3-tensorball 失败" - fi - - # 测试 --version_tb 参数打印 TensorBoard 版本 - LOG_INFO "测试 --version_tb 参数打印 TensorBoard 版本" - python3-tensorball --version_tb > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "执行 --version_tb 参数失败" - - #如果未安装,则卸载 python3-tensorball - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始卸载 python3-tensorball" - dnf remove -y python3-tensorball > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载 python3-tensorball失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_function_custom_tags.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_function_custom_tags.sh deleted file mode 100644 index a509f151e0e..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_function_custom_tags.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-02 -# @License : Mulan PSL v2 -# @Desc : 测试使用自定义标签的功能 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装python3-tensorboard - LOG_INFO "检查是否已安装python3-tensorboard" - if dnf list installed python3-tensorboard &>/dev/null; then - LOG_INFO "python3-tensorboard已安装,脚本结束后保持安装状态" - installed=true - else - LOG_INFO "python3-tensorboard未安装,将在测试后卸载" - installed=false - fi - - # 检查yum源中是否有python3-tensorboard软件包 - LOG_INFO "检查yum源中是否有python3-tensorboard软件包" - if ! dnf list available python3-tensorboard &>/dev/null; then - LOG_ERROR "yum源中未找到python3-tensorboard软件包" - exit 255 - fi - - # 安装python3-tensorboard(如果未安装) - if [ "$installed" = false ]; then - LOG_INFO "安装python3-tensorboard" - dnf install -y python3-tensorboard - CHECK_RESULT $? 0 0 "安装python3-tensorboard失败" - fi - - # 测试使用自定义标签的功能 - LOG_INFO "测试使用自定义标签的功能" - tensorboard --logdir=/tmp --tag custom_tag &>/dev/null - CHECK_RESULT $? 0 0 "自定义标签功能测试失败" - - # 清理环境(如果之前未安装) - if [ "$installed" = false ]; then - LOG_INFO "卸载python3-tensorboard" - dnf remove -y python3-tensorboard - CHECK_RESULT $? 0 0 "卸载python3-tensorboard失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_function_logdir_path.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_function_logdir_path.sh deleted file mode 100644 index 081f245ec0e..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_function_logdir_path.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-01 -# @License : Mulan PSL v2 -# @Desc : 测试指定日志目录路径的功能 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装python3-tensorboard - LOG_INFO "检查是否已安装python3-tensorboard" - rpm -q python3-tensorboard > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "python3-tensorboard已安装,脚本结束后保持安装状态" - INSTALLED=1 - else - LOG_INFO "python3-tensorboard未安装,将在测试后卸载" - INSTALLED=0 - fi - - # 检查yum源中是否有python3-tensorboard - LOG_INFO "检查yum源中是否有python3-tensorboard" - dnf list available python3-tensorboard > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到python3-tensorboard软件包" - exit 255 - fi - - # 安装python3-tensorboard(如果未安装) - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "开始安装python3-tensorboard" - dnf install -y python3-tensorboard > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装python3-tensorboard失败" - fi - - # 测试指定日志目录路径的功能 - LOG_INFO "测试指定日志目录路径的功能" - tensorboard --logdir=/tmp/test_log > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "执行tensorboard命令失败" - - # 清理环境(如果之前未安装) - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载python3-tensorboard" - dnf remove -y python3-tensorboard > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载python3-tensorboard失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorball_inspect.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorball_inspect.sh deleted file mode 100644 index 7037c2609ce..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorball_inspect.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-01 -# @License : Mulan PSL v2 -# @Desc : 测试使用 --inspect 参数检查事件文件摘要 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - LOG_INFO "开始测试:测试使用 --inspect 参数检查事件文件摘要" - - # 检查是否已安装python3-tensorboard和tensorboard - if ! dnf list installed python3-tensorboard &>/dev/null || ! dnf list installed tensorboard &>/dev/null; then - LOG_INFO "环境未安装python3-tensorboard或tensorboard,将进行安装" - # 检查yum源中是否有python3-tensorboard和tensorboard - if ! dnf list available python3-tensorboard &>/dev/null || ! dnf list available tensorboard &>/dev/null; then - LOG_ERROR "yum源中缺少python3-tensorboard或tensorboard软件包" - exit 255 - fi - # 安装软件包 - dnf install -y python3-tensorboard tensorboard - CHECK_RESULT $? 0 0 "安装python3-tensorboard和tensorboard失败" - # 标记需要卸载 - NEED_UNINSTALL=1 - else - LOG_INFO "环境已安装python3-tensorboard和tensorboard,无需重复安装" - fi - - # 检查--inspect参数是否支持 - LOG_INFO "检查--inspect参数是否支持" - tensorboard --help | grep -q -- --inspect - CHECK_RESULT $? 0 0 "--inspect参数不支持" - - # 创建测试用的事件文件目录 - LOG_INFO "创建测试用的事件文件目录" - TEST_DIR="/tmp/tensorboard_test" - mkdir -p "$TEST_DIR" - - # 生成测试事件文件(模拟) - LOG_INFO "生成测试事件文件(模拟)" - echo "dummy event data" > "$TEST_DIR/events.out.tfevents.test" - - # 使用--inspect参数检查事件文件摘要 - LOG_INFO "使用--inspect参数检查事件文件摘要" - tensorboard --inspect --logdir="$TEST_DIR" > /tmp/inspect_output.txt 2>&1 - CHECK_RESULT $? 0 0 "执行--inspect参数检查失败" - - # 检查输出是否包含预期内容 - LOG_INFO "检查输出是否包含预期内容" - grep -q "Event statistics" /tmp/inspect_output.txt - CHECK_RESULT $? 0 0 "输出中未找到事件统计信息" - - # 清理测试目录和输出文件 - LOG_INFO "清理测试目录和输出文件" - rm -rf "$TEST_DIR" /tmp/inspect_output.txt - - # 如果之前安装了软件包,则卸载 - if [ "$NEED_UNINSTALL" -eq 1 ]; then - LOG_INFO "卸载python3-tensorboard和tensorboard" - dnf remove -y python3-tensorboard tensorboard - CHECK_RESULT $? 0 0 "卸载python3-tensorboard和tensorboard失败" - fi - - LOG_INFO "测试完成:成功使用--inspect参数检查事件文件摘要" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorball_path_prefix.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorball_path_prefix.sh deleted file mode 100644 index 27c085e47d6..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorball_path_prefix.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-02 -# @License : Mulan PSL v2 -# @Desc : 测试使用 --path_prefix 参数设置相对路径前缀 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:测试使用 --path_prefix 参数设置相对路径前缀" - - # 检查是否已安装python3-tensorboard - LOG_INFO "检查是否已安装python3-tensorboard" - dnf list installed python3-tensorboard > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "python3-tensorboard已安装,脚本结束时保持安装状态" - INSTALLED=1 - else - LOG_INFO "python3-tensorboard未安装,将在测试结束后卸载" - INSTALLED=0 - fi - - # 检查yum源中是否有python3-tensorboard - LOG_INFO "检查yum源中是否有python3-tensorboard" - dnf list available python3-tensorboard > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到python3-tensorboard,退出测试" - exit 255 - fi - - # 如果未安装,则安装python3-tensorboard - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "安装python3-tensorboard" - dnf install -y python3-tensorboard > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装python3-tensorboard失败" - fi - - # 测试--path_prefix参数 - LOG_INFO "测试--path_prefix参数设置相对路径前缀" - tensorboard --logdir=/tmp --path_prefix=/test > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "--path_prefix参数不支持或设置失败" - - # 清理环境:如果脚本开始时未安装,则卸载python3-tensorboard - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载python3-tensorboard" - dnf remove -y python3-tensorboard > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载python3-tensorboard失败" - fi - - LOG_INFO "测试完成:测试使用 --path_prefix 参数设置相对路径前缀" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_inspect.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_inspect.sh deleted file mode 100644 index ef24c349077..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_inspect.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-02 -# @License : Mulan PSL v2 -# @Desc : 测试使用 --inspect 参数检查事件文件摘要 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:使用 --inspect 参数检查事件文件摘要" - - # 检查是否已安装 python3-tensorboard - LOG_INFO "检查是否已安装 python3-tensorboard" - if dnf list installed python3-tensorboard &>/dev/null; then - LOG_INFO "python3-tensorboard 已安装" - installed=true - else - LOG_INFO "python3-tensorboard 未安装" - installed=false - fi - - # 检查 yum 源中是否有 python3-tensorboard - LOG_INFO "检查 yum 源中是否有 python3-tensorboard" - if ! dnf list available python3-tensorboard &>/dev/null; then - LOG_ERROR "yum 源中未找到 python3-tensorboard" - exit 255 - fi - - # 如果未安装,则安装 python3-tensorboard - if [ "$installed" = false ]; then - LOG_INFO "开始安装 python3-tensorboard" - dnf install -y python3-tensorboard - CHECK_RESULT $? 0 0 "安装 python3-tensorboard 失败" - fi - - # 检查 --inspect 参数是否支持 - LOG_INFO "检查 tensorboard --inspect 参数是否支持" - if ! tensorboard --help | grep -q -- "--inspect"; then - LOG_ERROR "--inspect 参数不支持" - exit 255 - fi - - # 创建测试用的事件文件目录和文件(模拟) - LOG_INFO "创建测试用的事件文件" - test_event_dir=$(mktemp -d) - test_event_file="${test_event_dir}/events.out.tfevents.test" - touch "$test_event_file" - - # 使用 --inspect 参数检查事件文件摘要 - LOG_INFO "执行 tensorboard --inspect --event_file ${test_event_file}" - tensorboard --inspect --event_file "$test_event_file" - CHECK_RESULT $? 0 0 "tensorboard --inspect 执行失败" - - # 清理临时文件 - LOG_INFO "清理临时文件" - rm -rf "$test_event_dir" - - # 如果最初未安装,则在脚本结束前卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载 python3-tensorboard" - dnf remove -y python3-tensorboard - CHECK_RESULT $?, -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_load_fast.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_load_fast.sh deleted file mode 100644 index 79b3025a22f..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_load_fast.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-01 -# @License : Mulan PSL v2 -# @Desc : 测试使用 --load_fast 参数启用快速加载模式 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装python3-tensorboard - LOG_INFO "检查是否已安装python3-tensorboard" - if dnf list installed python3-tensorboard &>/dev/null; then - LOG_INFO "python3-tensorboard已安装" - INSTALLED=true - else - LOG_INFO "python3-tensorboard未安装" - INSTALLED=false - fi - - # 检查yum源中是否有python3-tensorboard软件包 - LOG_INFO "检查yum源中是否有python3-tensorboard软件包" - if ! dnf list available python3-tensorboard &>/dev/null; then - LOG_ERROR "yum源中未找到python3-tensorboard软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装python3-tensorboard" - dnf install -y python3-tensorboard - CHECK_RESULT $? 0 0 "安装python3-tensorboard失败" - fi - - # 测试--load_fast参数是否支持 - LOG_INFO "测试--load_fast参数是否支持" - tensorboard --help | grep -- "--load_fast" &>/dev/null - CHECK_RESULT $? 0 0 "--load_fast参数不支持" - - # 执行tensorboard命令并启用--load_fast参数 - LOG_INFO "执行tensorboard命令并启用--load_fast参数" - tensorboard --logdir=/tmp --load_fast &>/dev/null & - PID=$! - sleep 2 - - # 检查tensorboard进程是否运行 - LOG_INFO "检查tensorboard进程是否运行" - ps -p $PID &>/dev/null - CHECK_RESULT $? 0 0 "tensorboard进程未运行" - - # 清理环境 - kill -9 $PID &>/dev/null - - # 如果之前未安装,则卸载软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载python3-tensorboard" - dnf remove -y python3-tensorboard - CHECK_RESULT $? 0 0 "卸载python3-tensorboard失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_port.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_port.sh deleted file mode 100644 index ced1649b8a0..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_port.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-01 -# @License : Mulan PSL v2 -# @Desc : 测试使用 --port 参数指定服务端口 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装python3-tensorboard - LOG_INFO "检查是否已安装python3-tensorboard" - rpm -q python3-tensorboard > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "python3-tensorboard已安装,脚本结束后保持安装状态" - installed=true - else - LOG_INFO "python3-tensorboard未安装,将在脚本结束后卸载" - installed=false - fi - - # 检查yum源中是否有python3-tensorboard软件包 - LOG_INFO "检查yum源中是否有python3-tensorboard软件包" - dnf list available python3-tensorboard > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum源中没有python3-tensorboard软件包" - - # 安装python3-tensorboard - if [ "$installed" = false ]; then - LOG_INFO "开始安装python3-tensorboard" - dnf install -y python3-tensorboard > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装python3-tensorboard失败" - fi - - # 测试--port参数指定服务端口 - LOG_INFO "测试--port参数指定服务端口" - tensorboard --port 6006 --logdir=/tmp > /dev/null 2>&1 & - pid=$! - sleep 5 - netstat -tulnp | grep 6006 > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "--port参数未生效,服务未在指定端口启动" - kill $pid - - # 清理环境(如果之前未安装) - if [ "$installed" = false ]; then - LOG_INFO "卸载python3-tensorboard" - dnf remove -y python3-tensorboard > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载python3-tensorboard失败" - fi -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_reuse_port.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_reuse_port.sh deleted file mode 100644 index b0b3707250c..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_reuse_port.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-01 -# @License : Mulan PSL v2 -# @Desc : 测试使用 --reuse_port 参数启用端口重用 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查是否已安装python3-tensorboard - LOG_INFO "检查是否已安装python3-tensorboard" - if ! dnf list installed python3-tensorboard &>/dev/null; then - LOG_INFO "python3-tensorboard未安装,将进行安装" - INSTALLED=false - else - LOG_INFO "python3-tensorboard已安装" - INSTALLED=true - fi - - # 检查yum源中是否有python3-tensorboard软件包 - LOG_INFO "检查yum源中是否有python3-tensorboard软件包" - if ! dnf list available python3-tensorboard &>/dev/null; then - LOG_ERROR "yum源中未找到python3-tensorboard软件包" - exit 255 - fi - - # 若未安装则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装python3-tensorboard" - dnf install -y python3-tensorboard - CHECK_RESULT $? 0 0 "安装python3-tensorboard失败" - fi - - # 测试--reuse_port参数是否支持 - LOG_INFO "测试--reuse_port参数是否支持" - tensorboard --help | grep -q -- --reuse_port - CHECK_RESULT $? 0 0 "--reuse_port参数不支持" - - # 启动tensorboard并测试--reuse_port参数 - LOG_INFO "启动tensorboard并测试--reuse_port参数" - tensorboard --logdir=/tmp --port=6006 --reuse_port & - PID=$! - sleep 2 - CHECK_RESULT $? 0 0 "启动tensorboard失败" - - # 检查端口是否监听成功 - LOG_INFO "检查端口是否监听成功" - netstat -tuln | grep -q ":6006 " - CHECK_RESULT $? 0 0 "端口6006未监听" - - # 停止tensorboard进程 - LOG_INFO "停止tensorboard进程" - kill $PID - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载python3-tensorboard" - dnf remove -y python3-tensorboard - CHECK_RESULT $? 0 0 "卸载python3-tensorboard失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_version_tb.sh b/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_version_tb.sh deleted file mode 100644 index 6bc32b8a508..00000000000 --- a/testcases/function_test/pkg_test/python-tensorboard/python3-tensorboard/test_python3-tensorboard_tensorboard_version_tb.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-02 -# @License : Mulan PSL v2 -# @Desc : 测试使用 --version_tb 参数打印 TensorBoard 版本 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - LOG_INFO "开始测试:测试使用 --version_tb 参数打印 TensorBoard 版本" - - # 检查是否已安装 python3-tensorboard - LOG_INFO "检查是否已安装 python3-tensorboard" - dnf list installed python3-tensorboard > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "python3-tensorboard 已安装,脚本结束后将保持安装状态" - installed=true - else - LOG_INFO "python3-tensorboard 未安装,将在测试完成后卸载" - installed=false - fi - - # 检查 yum 源中是否有 python3-tensorboard - LOG_INFO "检查 yum 源中是否有 python3-tensorboard" - dnf list available python3-tensorboard > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "yum 源中未找到 python3-tensorboard 软件包" - - # 安装 python3-tensorboard(如果未安装) - if [ "$installed" = false ]; then - LOG_INFO "安装 python3-tensorboard" - dnf install -y python3-tensorboard - CHECK_RESULT $? 0 0 "安装 python3-tensorboard 失败" - fi - - # 测试 --version_tb 参数 - LOG_INFO "测试 --version_tb 参数打印 TensorBoard 版本" - tensorboard --version_tb > /dev/null 2>&1 - CHECK_RESULT $? 0 255 "--version_tb 参数不存在或不支持" - - #清理环境(如果之前未安装) - if [ "$installed" = false ]; then - LOG_INFO "卸载 python3-tensorboard" - dnf remove -y python3-tensorboard - CHECK_RESULT $? 0 0 "卸载 python3-tensorboard失败" - fi - - LOG_INFO "测试完成:测试使用 --version_tb 参数打印 TensorBoard版本" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-i/texlive-fei/test_texlive-fei_function_install.sh b/testcases/function_test/pkg_test/texlive-split-i/texlive-fei/test_texlive-fei_function_install.sh deleted file mode 100644 index 880cc864c5b..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-i/texlive-fei/test_texlive-fei_function_install.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-26 -# @License : Mulan PSL v2 -# @Desc : Test installation of texlive-fei package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查texlive-fei软件包是否已安装 - LOG_INFO "检查texlive-fei软件包是否已安装" - rpm -q texlive-fei > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-fei软件包已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-fei软件包未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否存在texlive-fei软件包 - LOG_INFO "检查yum源中是否存在texlive-fei软件包" - dnf list available texlive-fei > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在texlive-fei软件包" - exit 255 - fi - - # 安装texlive-fei软件包 - LOG_INFO "开始安装texlive-fei软件包" - dnf install -y texlive-fei - CHECK_RESULT $? 0 0 "安装texlive-fei软件包失败" - - # 检查texlive-fei命令是否可用 - LOG_INFO "检查texlive-fei命令是否可用" - texlive-fei --version > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "texlive-fei命令不可用" - - # 测试完成后清理环境(如果最初未安装) - if [ "$INSTALLED" = false ]; then - LOG_INFO "清理环境,卸载texlive-fei软件包" - dnf remove -y texlive-fei - CHECK_RESULT $? 0 0 "卸载texlive-fei软件包失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-n/texlive-ledmac/test_texlive-ledmac_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-n/texlive-ledmac/test_texlive-ledmac_function_basic.sh deleted file mode 100644 index 2a966c2ce12..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-n/texlive-ledmac/test_texlive-ledmac_function_basic.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-26 -# @License : Mulan PSL v2 -# @Desc : Test basic functionality of texlive-ledmac -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试脚本:test_texlive-ledmac_function_basic - - LOG_INFO "开始测试 texlive-ledmac 的基本功能" - - # 检查是否已安装 texlive-ledmac - LOG_INFO "检查 texlive-ledmac 是否已安装" - if dnf list installed texlive-ledmac &>/dev/null; then - LOG_INFO "texlive-ledmac 已安装,跳过安装步骤" - INSTALLED=true - else - LOG_INFO "texlive-ledmac 未安装,准备安装" - INSTALLED=false - fi - - # 检查 yum 源中是否有 texlive-ledmac 软件包 - LOG_INFO "检查 yum 源中是否有 texlive-ledmac 软件包" - if ! dnf list available texlive-ledmac &>/dev/null; then - LOG_ERROR "yum 源中未找到 texlive-ledmac 软件包" - exit 255 - fi - - # 如果未安装,则安装 texlive-ledmac - if [ "$INSTALLED" = false ]; then - LOG_INFO "安装 texlive-ledmac" - dnf install -y texlive-ledmac - CHECK_RESULT $? 0 0 "安装 texlive-ledmac 失败" - fi - - # 测试基本功能 - LOG_INFO "测试 texlive-ledmac 的基本功能" - command_to_test="texlive-ledmac --version" # 假设 --version 是支持的参数 - if ! $command_to_test &>/dev/null; then - LOG_ERROR "texlive-ledmac 不支持 --version 参数或命令执行失败" - exit 255 - fi - CHECK_RESULT $? 0 0 "texlive-ledmac --version 执行失败" - - #如果未预先安装,则在测试完成后卸载 texlive-led mac - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载 tex live - led mac " - dnf remove - y text live - led mac - CHECK _ RESULT $? 0 \“卸载 text live - led mac 失败\” - fi - - LOG _ INFO \“测试完成\” -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-n/texlive-luainputenc/test_texlive-luainputenc_function_load.sh b/testcases/function_test/pkg_test/texlive-split-n/texlive-luainputenc/test_texlive-luainputenc_function_load.sh deleted file mode 100644 index c5c8da31bb2..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-n/texlive-luainputenc/test_texlive-luainputenc_function_load.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-26 -# @License : Mulan PSL v2 -# @Desc : Test loading the package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test loading the package" - - # 检查是否已安装texlive-luainputenc - LOG_INFO "检查texlive-luainputenc是否已安装" - if dnf list installed texlive-luainputenc &>/dev/null; then - LOG_INFO "texlive-luainputenc已安装,测试将保持安装状态" - installed=true - else - LOG_INFO "texlive-luainputenc未安装,测试将安装并卸载" - installed=false - fi - - # 检查yum源中是否有texlive-luainputenc - LOG_INFO "检查yum源中是否有texlive-luainputenc" - if ! dnf list available texlive-luainputenc &>/dev/null; then - LOG_ERROR "yum源中未找到texlive-luainputenc" - exit 255 - fi - - # 安装texlive-luainputenc(如果未安装) - if [ "$installed" = false ]; then - LOG_INFO "安装texlive-luainputenc" - dnf install -y texlive-luainputenc - CHECK_RESULT $? 0 0 "安装texlive-luainputenc失败" - fi - - # 测试加载texlive-luainputenc功能 - LOG_INFO "测试加载texlive-luainputenc功能" - command_to_test="lualatex --help | grep luainputenc" - eval $command_to_test - CHECK_RESULT $? 0 0 "加载texlive-luainputenc功能失败" - - # 清理环境(如果之前未安装) - if [ "$installed" = false ]; then - LOG_INFO "卸载texlive-luainputenc" - dnf remove -y texlive-luainputenc - CHECK_RESULT $? 0 0 "卸载texlive-luainputenc失败" - fi - - LOG_INFO "测试完成:Test loading the package" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_basic.sh deleted file mode 100644 index 9cb955fa4b6..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_basic.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-02-27 -# @License : Mulan PSL v2 -# @Desc : 测试texlive-numname的基本数字名称渲染功能 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试texlive-numname的基本数字名称渲染功能" - LOG_INFO "步骤1:检查yum源中是否存在texlive-numname软件包" - if ! dnf list available texlive-numname &> /dev/null; then - LOG_ERROR "yum源中未找到texlive-numname软件包" - exit 255 - fi - LOG_INFO "步骤2:检查当前环境是否已安装texlive-numname" - if rpm -q texlive-numname &> /dev/null; then - LOG_INFO "texlive-numname已安装,测试结束后将保持安装状态" - INSTALLED_BEFORE=true - else - LOG_INFO "texlive-numname未安装,将进行安装" - INSTALLED_BEFORE=false - fi - if [ "$INSTALLED_BEFORE" = "false" ]; then - LOG_INFO "步骤3:安装texlive-numname软件包" - dnf install -y texlive-numname - CHECK_RESULT $? 0 0 "安装texlive-numname失败" - fi - LOG_INFO "步骤4:验证texlive-numname基本功能" - TEST_FILE="test_numname.tex" - cat > $TEST_FILE << "EOF" - \documentclass{article} - \usepackage{numname} - \begin{document} - \numname{123} - \end{document} - EOF - pdflatex -interaction=nonstopmode $TEST_FILE - CHECK_RESULT $? 0 0 "生成PDF失败" - if [ -f "${TEST_FILE%.tex}.pdf" ]; then - LOG_INFO "成功生成PDF文件" - else - LOG_ERROR "未生成预期的PDF文件" - exit 1 - fi - LOG_INFO "步骤5:清理测试文件" - rm -f test_numname.* - if [ "$INSTALLED_BEFORE" = "false" ]; then - LOG_INFO "步骤6:卸载texlive-numname软件包" - dnf remove -y texlive-numname - CHECK_RESULT $? 0 0 "卸载texlive-numname失败" - fi - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_compile.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_compile.sh deleted file mode 100644 index 566155fa169..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_compile.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-02-27 -# @License : Mulan PSL v2 -# @Desc : 测试texlive-numname在完整LaTeX文档中的编译功能 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试texlive-numname在完整LaTeX文档中的编译功能" - LOG_INFO "步骤1:检查系统是否已安装texlive-numname软件包" - rpm -q texlive-numname > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "texlive-numname已安装,脚本结束后将保持安装状态" - INSTALLED=1 - else - LOG_INFO "texlive-numname未安装,将在测试过程中安装" - INSTALLED=0 - fi - - LOG_INFO "步骤2:检查yum源中是否存在texlive-numname软件包" - dnf list available texlive-numname > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "yum源中未找到texlive-numname软件包" - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在texlive-numname,退出测试" - exit 255 - fi - - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "步骤3:安装texlive-numname软件包" - dnf install -y texlive-numname - CHECK_RESULT $? 0 0 "安装texlive-numname失败" - fi - - LOG_INFO "步骤4:创建测试LaTeX文档" - cat > test_numname.tex << "EOF" - \documentclass{article} - \usepackage{numname} - \begin{document} - \numname{123} - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试LaTeX文档失败" - - LOG_INFO "步骤5:使用pdflatex编译LaTeX文档" - pdflatex -interaction=nonstopmode test_numname.tex > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "编译LaTeX文档失败" - - LOG_INFO "步骤6:检查生成的PDF文件" - if [ -f test_numname.pdf ]; then - LOG_INFO "PDF文件生成成功" - else - LOG_ERROR "PDF文件未生成" - exit 1 - fi - - LOG_INFO "步骤7:清理测试文件" - rm -f test_numname.tex test_numname.aux test_numname.log test_numname.pdf - - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "步骤8:卸载texlive-numname软件包" - dnf remove -y texlive-numname - CHECK_RESULT $? 0 0 "卸载texlive-numname失败" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_format.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_format.sh deleted file mode 100644 index 158589ca7dd..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_format.sh +++ /dev/null @@ -1,122 +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-numname的格式化选项功能 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试texlive-numname的格式化选项功能" - - # 检查软件包是否在yum源中 - LOG_INFO "检查texlive-numname软件包是否在yum源中" - dnf list available texlive-numname 2>/dev/null | grep -q texlive-numname - if [ $? -ne 0 ]; then - LOG_ERROR "texlive-numname软件包不在yum源中" - exit 255 - fi - - # 检查环境是否已安装texlive-numname - LOG_INFO "检查环境是否已安装texlive-numname" - rpm -q texlive-numname >/dev/null 2>&1 - installed=$? - - # 如果未安装,则安装软件包 - if [ $installed -ne 0 ]; then - LOG_INFO "安装texlive-numname软件包" - dnf install -y texlive-numname - CHECK_RESULT $? 0 0 "安装texlive-numname失败" - fi - - # 测试texlive-numname的格式化选项功能 - LOG_INFO "测试texlive-numname的格式化选项功能" - # 检查是否支持--help参数 - texlive-numname --help >/dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "texlive-numname命令不支持--help参数" - # 如果之前未安装,则卸载软件包 - if [ $installed -ne 0 ]; then - dnf remove -y texlive-numname - fi - exit 255 - fi - - # 测试基本格式化功能 - LOG_INFO "测试基本数字格式化功能" - result=$(texlive-numname 123) - expected="one hundred twenty-three" - if [ "$result" != "$expected" ]; then - LOG_ERROR "基本格式化功能测试失败: 期望 "$expected", 实际 "$result"" - # 如果之前未安装,则卸载软件包 - if [ $installed -ne 0 ]; then - dnf remove -y texlive-numname - fi - exit 1 - fi - - # 测试特定格式化选项 - LOG_INFO "测试特定格式化选项" - # 假设texlive-numname支持-f选项进行不同格式的转换 - texlive-numname -f roman 2023 >/dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "texlive-numname命令不支持-f参数或roman格式" - # 如果之前未安装,则卸载软件包 - if [ $installed -ne 0 ]; then - dnf remove -y texlive-numname - fi - exit 255 - fi - - # 验证特定格式的输出 - LOG_INFO "验证roman格式输出" - result=$(texlive-numname -f roman 2023) - expected="MMXXIII" - if [ "$result" != "$expected" ]; then - LOG_ERROR "Roman格式测试失败: 期望 "$expected", 实际 "$result"" - # 如果之前未安装,则卸载软件包 - if [ $installed -ne 0 ]; then - dnf remove -y texlive-numname - fi - exit 1 - fi - - # 测试不支持的参数 - LOG_INFO "测试不支持的参数" - texlive-numname --invalid-option 2>/dev/null - if [ $? -ne 255 ] && [ $? -ne 1 ]; then - LOG_ERROR "不支持的参数未正确拒绝" - # 如果之前未安装,则卸载软件包 - if [ $installed -ne 0 ]; then - dnf remove -y texlive-numname - fi - exit 255 - fi - - # 清理环境 - LOG_INFO "清理测试环境" - if [ $installed -ne 0 ]; then - LOG_INFO "卸载texlive-numname软件包" - dnf remove -y texlive-numname - CHECK_RESULT $? 0 0 "卸载texlive-numname失败" - else - LOG_INFO "保持texlive-numname安装状态" - fi - - LOG_INFO "texlive-numname格式化选项功能测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_lang.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_lang.sh deleted file mode 100644 index abfe1b5a8f4..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_lang.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-02-27 -# @License : Mulan PSL v2 -# @Desc : 测试texlive-numname的多语言支持功能 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试texlive-numname的多语言支持功能" - - # 检查环境是否已安装texlive-numname - LOG_INFO "检查是否已安装texlive-numname" - if dnf list installed texlive-numname &>/dev/null; then - LOG_INFO "texlive-numname已安装,测试结束后保持安装状态" - already_installed=true - else - LOG_INFO "texlive-numname未安装,将在测试前安装并在测试后卸载" - already_installed=false - fi - - # 检查yum源中是否有texlive-numname软件包 - LOG_INFO "检查yum源中是否有texlive-numname软件包" - if ! dnf list available texlive-numname &>/dev/null; then - LOG_ERROR "yum源中未找到texlive-numname软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$already_installed" = false ]; then - LOG_INFO "安装texlive-numname软件包" - dnf install -y texlive-numname - CHECK_RESULT $? 0 0 "安装texlive-numname失败" - fi - - # 测试texlive-numname的多语言支持功能 - LOG_INFO "测试texlive-numname的多语言支持功能" - # 假设texlive-numname有一个命令用于测试多语言支持,这里使用示例命令 - # 实际命令需根据texlive-numname的实际功能调整 - test_command="texlive-numname --lang" - # 检查命令参数是否支持 - if ! texlive-numname --help 2>&1 | grep -q "\-\-lang"; then - LOG_ERROR "texlive-numname不支持--lang参数" - exit 255 - fi - - # 执行测试命令 - LOG_INFO "执行命令: $test_command" - $test_command - CHECK_RESULT $? 0 0 "texlive-numname多语言支持功能测试失败" - - # 清理环境:如果之前未安装,则卸载软件包 - if [ "$already_installed" = false ]; then - LOG_INFO "卸载texlive-numname软件包" - dnf remove -y texlive-numname - CHECK_RESULT $? 0 0 "卸载texlive-numname失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_render.sh b/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_render.sh deleted file mode 100644 index 01a55afd937..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-q/texlive-numname/test_texlive-numname_function_render.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-04 -# @License : Mulan PSL v2 -# @Desc : 测试texlive-numname软件包的渲染功能,验证是否能正确渲染数字名称 -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试texlive-numname软件包的渲染功能,验证是否能正确渲染数字名称" - - # 检查是否已安装texlive-numname - if dnf list installed texlive-numname &>/dev/null; then - LOG_INFO "texlive-numname已安装,测试完成后将保持安装状态" - INSTALLED=true - else - LOG_INFO "texlive-numname未安装,将在测试完成后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有texlive-numname软件包 - if ! dnf list available texlive-numname &>/dev/null; then - LOG_ERROR "yum源中未找到texlive-numname软件包" - exit 255 - fi - - # 安装texlive-numname - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装texlive-numname软件包" - dnf install -y texlive-numname - CHECK_RESULT $? 0 0 "安装texlive-numname失败" - fi - - # 验证渲染功能 - LOG_INFO "验证texlive-numname的渲染功能" - TEST_FILE="test_numname.tex" - cat > "$TEST_FILE" <&2 - } - - # 定义检查结果函数(虽然题目说直接使用,但实际未定义,这里定义以便脚本正常运行) - CHECK_RESULT() { - local actual=$1 - local expected=$2 - local exit_code=$3 - local message=$4 - if [ "$actual" -ne "$expected" ]; then - LOG_ERROR "$message" - exit $exit_code - fi - } - - # 定义SSH_CMD函数(虽然题目说直接使用,但实际未定义,这里定义以便脚本正常运行) - SSH_CMD() { - local cmd=$1 - local node_ip=$2 - local node_password=$3 - local node_user=$4 - sshpass -p "$node_password" ssh -o StrictHostKeyChecking=no "${node_user}@${node_ip}" "$cmd" - } - - # 测试用例描述:Test basic LaTeX usage of amscdx package - - # 步骤1:检查yum源中是否存在texlive-amscdx软件包 - LOG_INFO "步骤1:检查yum源中是否存在texlive-amscdx软件包" - dnf list available texlive-amscdx > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在texlive-amscdx软件包" - exit 255 - fi - - # 步骤2:检查当前环境是否已安装texlive-amscdx - LOG_INFO "步骤2:检查当前环境是否已安装texlive-amscdx" - if rpm -q texlive-amscdx > /dev/null 2>&1; then - LOG_INFO "texlive-amscdx已安装,脚本结束后将保持安装状态" - already_installed=true - else - LOG_INFO "texlive-amscdx未安装,将在测试步骤中安装" - already_installed=false - fi - - # 步骤3:如果未安装,则安装texlive-amscdx - if [ "$already_installed" = false ]; then - LOG_INFO "步骤3:安装texlive-amscdx软件包" - dnf install -y texlive-amscdx - CHECK_RESULT $? 0 0 "安装texlive-amscdx失败" - fi - - # 步骤4:创建一个简单的LaTeX文档测试amscdx包 - LOG_INFO "步骤4:创建一个简单的LaTeX文档测试amscdx包" - cat > test_amscdx.tex << "EOF" - \documentclass{article} - \usepackage{amscdx} - \begin{document} - Test document for amscdx package. - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试LaTeX文档失败" - - # 步骤5:使用pdflatex编译LaTeX文档 - LOG_INFO "步骤5:使用pdflatex编译LaTeX文档" - if command -v pdflatex > /dev/null 2>&1; then - pdflatex test_amscdx.tex - CHECK_RESULT $? 0 0 "编译LaTeX文档失败" - else - LOG_ERROR "pdflatex命令不存在或不支持" - exit 255 - fi - - # 步骤6:检查生成的PDF文件是否存在 - LOG_INFO "步骤6:检查生成的PDF文件是否存在" - if [ -f test_amscdx.pdf ]; then - LOG_INFO "PDF文件生成成功" - else - LOG_ERROR "PDF文件生成失败" - exit 1 - fi - - # 步骤7:清理生成的临时文件 - LOG_INFO "步骤7:清理生成的临时文件" - rm -f test_amscdx.tex test_amscdx.pdf test_amscdx.log test_amscdx.aux test_amscdx.out - CHECK_RESULT $? 0 0 "清理临时文件失败" - - # 步骤8:如果测试前未安装,则卸载texlive-amscdx - if [ "$already_installed" = false ]; then - LOG_INFO "步骤8:卸载texlive-amscdx软件包" - dnf remove -y texlive-amscdx - CHECK_RESULT $? 0 0 "卸载texlive-amscdx失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_check_installed.sh b/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_check_installed.sh deleted file mode 100644 index ace1e59db66..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_check_installed.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-12 -# @License : Mulan PSL v2 -# @Desc : Test checking if texlive-amscdx is installed -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:检查texlive-amscdx是否已安装" - LOG_INFO "步骤1:检查yum源中是否存在texlive-amscdx软件包" - dnf list available texlive-amscdx - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到texlive-amscdx软件包" - exit 255 - fi - - LOG_INFO "步骤2:检查当前是否已安装texlive-amscdx" - dnf list installed texlive-amscdx - if [ $? -eq 0 ]; then - LOG_INFO "texlive-amscdx已安装,标记为保持安装状态" - ALREADY_INSTALLED=1 - else - LOG_INFO "texlive-amscdx未安装,标记为需要安装" - ALREADY_INSTALLED=0 - fi - - if [ $ALREADY_INSTALLED -eq 0 ]; then - LOG_INFO "步骤3:安装texlive-amscdx软件包" - dnf install -y texlive-amscdx - CHECK_RESULT $? 0 0 "安装texlive-amscdx失败" - fi - - LOG_INFO "步骤4:验证texlive-amscdx安装成功" - dnf list installed texlive-amscdx - CHECK_RESULT $? 0 0 "验证texlive-amscdx安装状态失败" - - LOG_INFO "步骤5:检查texlive-amscdx相关命令是否可用" - which amscdx - CHECK_RESULT $? 0 0 "amscdx命令未找到" - - LOG_INFO "步骤6:测试amscdx命令基本功能" - amscdx --version - CHECK_RESULT $? 0 0 "amscdx命令执行失败" - - if [ $ALREADY_INSTALLED -eq 0 ]; then - LOG_INFO "步骤7:清理环境,卸载texlive-amscdx" - dnf remove -y texlive-amscdx - CHECK_RESULT $? 0 0 "卸载texlive-amscdx失败" - - LOG_INFO "步骤8:验证texlive-amscdx已卸载" - dnf list installed texlive-amscdx - if [ $? -eq 0 ]; then - LOG_ERROR "texlive-amscdx卸载后仍显示已安装" - exit 1 - else - LOG_INFO "texlive-amscdx已成功卸载" - fi - else - LOG_INFO "步骤7:保持texlive-amscdx安装状态,跳过卸载" - fi - - LOG_INFO "测试完成:texlive-amscdx安装检查测试结束" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_commutative_diagram.sh b/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_commutative_diagram.sh deleted file mode 100644 index 12b27f28947..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_commutative_diagram.sh +++ /dev/null @@ -1,102 +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-12 -# @License : Mulan PSL v2 -# @Desc : Test drawing a simple commutative diagram -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 定义变量 - PACKAGE_NAME="texlive-amscdx" - TEST_FILE="test_commutative_diagram.tex" - TEST_OUTPUT="test_commutative_diagram.pdf" - - # 步骤1:检查yum源中是否存在指定的软件包 - LOG_INFO "步骤1:检查yum源中是否存在软件包 ${PACKAGE_NAME}" - dnf list available ${PACKAGE_NAME} &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "软件包 ${PACKAGE_NAME} 在yum源中不存在" - exit 255 - fi - - # 步骤2:检查系统是否已经安装了指定的软件包 - LOG_INFO "步骤2:检查系统是否已经安装了软件包 ${PACKAGE_NAME}" - rpm -q ${PACKAGE_NAME} &>/dev/null - if [ $? -eq 0 ]; then - LOG_INFO "软件包 ${PACKAGE_NAME} 已经安装,脚本结束时将保持安装状态" - ALREADY_INSTALLED=1 - else - LOG_INFO "软件包 ${PACKAGE_NAME} 未安装,将在测试过程中安装" - ALREADY_INSTALLED=0 - fi - - # 步骤3:如果未安装,则安装软件包 - if [ ${ALREADY_INSTALLED} -eq 0 ]; then - LOG_INFO "步骤3:安装软件包 ${PACKAGE_NAME}" - dnf install -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "安装软件包 ${PACKAGE_NAME} 失败" - fi - - # 步骤4:创建测试用的LaTeX文件 - LOG_INFO "步骤4:创建测试用的LaTeX文件" - cat > ${TEST_FILE} << "EOF" - \documentclass{article} - \usepackage{amscd} - \begin{document} - \begin{equation*} - \begin{CD} - A @>f>> B \\ - @VgVV @VVhV \\ - C @>k>> D - \end{CD} - \end{equation*} - \end{document} - EOF - CHECK_RESULT $? 0 0 "创建测试文件失败" - - # 步骤5:使用pdflatex编译LaTeX文件 - LOG_INFO "步骤5:使用pdflatex编译LaTeX文件" - pdflatex -interaction=nonstopmode ${TEST_FILE} &>/dev/null - CHECK_RESULT $? 0 0 "编译LaTeX文件失败" - - # 步骤6:检查生成的PDF文件是否存在 - LOG_INFO "步骤6:检查生成的PDF文件是否存在" - if [ -f ${TEST_OUTPUT} ]; then - LOG_INFO "成功生成PDF文件:${TEST_OUTPUT}" - else - LOG_ERROR "未生成PDF文件:${TEST_OUTPUT}" - exit 1 - fi - - # 步骤7:清理生成的中间文件 - LOG_INFO "步骤7:清理生成的中间文件" - rm -f ${TEST_FILE} ${TEST_FILE%.tex}.aux ${TEST_FILE%.tex}.log ${TEST_OUTPUT} - CHECK_RESULT $? 0 0 "清理中间文件失败" - - # 步骤8:如果脚本开始时未安装软件包,则在测试结束后卸载 - if [ ${ALREADY_INSTALLED} -eq 0 ]; then - LOG_INFO "步骤8:卸载软件包 ${PACKAGE_NAME}" - dnf remove -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "卸载软件包 ${PACKAGE_NAME} 失败" - else - LOG_INFO "步骤8:保持软件包 ${PACKAGE_NAME} 的安装状态" - fi - - LOG_INFO "测试完成:成功绘制简单的交换图" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_compile.sh b/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_compile.sh deleted file mode 100644 index 1c29952220a..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_compile.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-11-26 -# @License : Mulan PSL v2 -# @Desc : Test compilation of amscdx package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - LOG_INFO "开始测试amscdx包的编译功能" - - # 检查是否已安装texlive-amscdx包 - LOG_INFO "检查texlive-amscdx包是否已安装" - if dnf list installed texlive-amscdx &>/dev/null; then - LOG_INFO "texlive-amscdx包已安装,测试结束后保持安装状态" - installed=true - else - LOG_INFO "texlive-amscdx包未安装,将在测试结束后卸载" - installed=false - fi - - # 检查yum源中是否有texlive-amscdx包 - LOG_INFO "检查yum源中是否存在texlive-amscdx包" - if ! dnf list available texlive-amscdx &>/dev/null; then - LOG_ERROR "yum源中不存在texlive-amscdx包" - exit 255 - fi - - # 安装texlive-amscdx包(如果未安装) - if [ "$installed" = false ]; then - LOG_INFO "安装texlive-amscdx包" - dnf install -y texlive-amscdx - CHECK_RESULT $? 0 0 "安装texlive-amscdx包失败" - fi - - # 测试amscdx包的编译功能 - LOG_INFO "测试amscdx包的编译功能" - compile_command="amscdx --compile" - if ! command -v amscdx &>/dev/null; then - LOG_ERROR "amscdx命令不存在或不支持" - exit 255 - fi - - $compile_command - CHECK_RESULT $? 0 0 "amscdx包编译失败" - - # 清理环境(如果之前未安装) - if [ "$installed" = false ]; then - LOG_INFO "卸载texlive-amscdx包" - dnf remove -y texlive-amscdx - CHECK_RESULT $? 0 0 "卸载texlive-amscdx包失败" - fi - - LOG_INFO "测试完成,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_install.sh b/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_install.sh deleted file mode 100644 index 82419d1def9..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_install.sh +++ /dev/null @@ -1,71 +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-12 -# @License : Mulan PSL v2 -# @Desc : Test installation of texlive-amscdx package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:安装 texlive-amscdx 软件包" - - LOG_INFO "步骤1: 检查是否已安装 texlive-amscdx" - if dnf list installed texlive-amscdx &>/dev/null; then - LOG_INFO "texlive-amscdx 已安装,跳过安装步骤" - INSTALLED=1 - else - LOG_INFO "texlive-amscdx 未安装,将在测试中安装" - INSTALLED=0 - fi - - LOG_INFO "步骤2: 检查 yum 源中是否有 texlive-amscdx 软件包" - if ! dnf list available texlive-amscdx &>/dev/null; then - LOG_ERROR "yum 源中未找到 texlive-amscdx 软件包" - exit 255 - fi - - LOG_INFO "步骤3: 执行安装 texlive-amscdx" - if [ $INSTALLED -eq 0 ]; then - dnf install -y texlive-amscdx - CHECK_RESULT $? 0 0 "安装 texlive-amscdx 失败" - LOG_INFO "texlive-amscdx 安装成功" - fi - - LOG_INFO "步骤4: 验证 texlive-amscdx 安装成功" - dnf list installed texlive-amscdx &>/dev/null - CHECK_RESULT $? 0 0 "验证 texlive-amscdx 安装失败" - - LOG_INFO "步骤5: 验证 texlive-amscdx 命令参数" - if ! texlive-amscdx --help &>/dev/null; then - LOG_ERROR "texlive-amscdx 命令参数不支持或不存在" - exit 255 - fi - LOG_INFO "texlive-amscdx 命令参数验证成功" - - LOG_INFO "步骤6: 清理环境" - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载 texlive-amscdx" - dnf remove -y texlive-amscdx - CHECK_RESULT $? 0 0 "卸载 texlive-amscdx 失败" - LOG_INFO "texlive-amscdx 卸载成功" - else - LOG_INFO "测试前已安装,保持安装状态" - fi - - LOG_INFO "测试完成:texlive-amscdx 安装测试通过" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_uninstall.sh b/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_uninstall.sh deleted file mode 100644 index ba9130ba003..00000000000 --- a/testcases/function_test/pkg_test/texlive-split-z/texlive-amscdx/test_texlive-amscdx_function_uninstall.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-03-12 -# @License : Mulan PSL v2 -# @Desc : Test uninstallation of texlive-amscdx package -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - set -e - - # 环境检查:检查是否已安装texlive-amscdx - LOG_INFO "检查是否已安装texlive-amscdx" - if dnf list installed texlive-amscdx &>/dev/null; then - LOG_INFO "texlive-amscdx已安装,标记为已安装状态" - INSTALLED_BEFORE="yes" - else - LOG_INFO "texlive-amscdx未安装,标记为未安装状态" - INSTALLED_BEFORE="no" - fi - - # 检查yum源中是否存在texlive-amscdx软件包 - LOG_INFO "检查yum源中是否存在texlive-amscdx软件包" - if ! dnf list available texlive-amscdx &>/dev/null; then - LOG_ERROR "yum源中不存在texlive-amscdx软件包" - exit 255 - fi - - # 如果未安装,则进行安装 - if [[ "$INSTALLED_BEFORE" == "no" ]]; then - LOG_INFO "开始安装texlive-amscdx" - dnf install -y texlive-amscdx - CHECK_RESULT $? 0 0 "安装texlive-amscdx失败" - LOG_INFO "texlive-amscdx安装成功" - fi - - # 测试卸载功能 - LOG_INFO "开始测试卸载texlive-amscdx" - dnf remove -y texlive-amscdx - CHECK_RESULT $? 0 0 "卸载texlive-amscdx失败" - LOG_INFO "texlive-amscdx卸载成功" - - # 验证卸载后软件包是否已移除 - LOG_INFO "验证texlive-amscdx是否已卸载" - if dnf list installed texlive-amscdx &>/dev/null; then - LOG_ERROR "卸载后texlive-amscdx仍存在" - exit 1 - else - LOG_INFO "验证通过:texlive-amscdx已成功卸载" - fi - - # 环境恢复:如果之前已安装,则重新安装 - if [[ "$INSTALLED_BEFORE" == "yes" ]]; then - LOG_INFO "恢复环境:重新安装texlive-amscdx" - dnf install -y texlive-amscdx - CHECK_RESULT $? 0 0 "重新安装texlive-amscdx失败" - LOG_INFO "环境恢复完成:texlive-amscdx已重新安装" - fi - - LOG_INFO "测试完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_compile.sh b/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_compile.sh deleted file mode 100644 index 178d0ae2556..00000000000 --- a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_compile.sh +++ /dev/null @@ -1,108 +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-20 -# @License : Mulan PSL v2 -# @Desc : Test compiling C++ app with plugin -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 设置环境变量 - SCRIPT_NAME="test_uwsgi-plugin-cplusplus_function_compile" - LOG_INFO "开始执行测试脚本:${SCRIPT_NAME}" - - # 定义软件包名称 - PACKAGE_NAME="uwsgi-plugin-cplusplus" - - # 步骤1:检查yum源中是否存在指定软件包 - LOG_INFO "步骤1:检查yum源中是否存在 ${PACKAGE_NAME} 软件包" - dnf list available ${PACKAGE_NAME} &>/dev/null - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到 ${PACKAGE_NAME} 软件包" - exit 255 - fi - - # 步骤2:检查当前环境是否已安装软件包 - LOG_INFO "步骤2:检查当前环境是否已安装 ${PACKAGE_NAME}" - INSTALLED=false - if rpm -q ${PACKAGE_NAME} &>/dev/null; then - LOG_INFO "检测到 ${PACKAGE_NAME} 已安装" - INSTALLED=true - else - LOG_INFO "检测到 ${PACKAGE_NAME} 未安装" - fi - - # 步骤3:如果未安装,则安装软件包 - if [ "$INSTALLED" = "false" ]; then - LOG_INFO "步骤3:安装 ${PACKAGE_NAME} 软件包" - dnf install -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "安装 ${PACKAGE_NAME} 失败" - LOG_INFO "${PACKAGE_NAME} 安装成功" - fi - - # 步骤4:检查uwsgi命令是否支持所需参数 - LOG_INFO "步骤4:检查uwsgi命令是否支持 --plugin 参数" - uwsgi --help | grep -q -- "--plugin" - CHECK_RESULT $? 0 0 "uwsgi命令不支持 --plugin 参数" - LOG_INFO "uwsgi命令支持 --plugin 参数" - - # 步骤5:编写测试C++应用 - LOG_INFO "步骤5:编写测试C++应用" - TEST_CPP_FILE="/tmp/test_uwsgi_app.cpp" - cat > ${TEST_CPP_FILE} << "EOF" - #include - - extern "C" { - int application(int argc, char** argv) { - std::cout << "Hello from C++ uWSGI plugin!" << std::endl; - return 0; - } - } - EOF - CHECK_RESULT $? 0 0 "创建C++测试文件失败" - - # 步骤6:编译C++应用 - LOG_INFO "步骤6:编译C++应用" - TEST_APP="/tmp/test_uwsgi_app" - g++ -fPIC -shared -o ${TEST_APP}.so ${TEST_CPP_FILE} - CHECK_RESULT $? 0 0 "编译C++应用失败" - LOG_INFO "C++应用编译成功" - - # 步骤7:使用uwsgi插件加载C++应用 - LOG_INFO "步骤7:使用uwsgi插件加载C++应用" - uwsgi --plugin cplusplus --module ${TEST_APP} --callable application --http :0 --exit-on-reload 2>&1 | grep -q "Hello from C++ uWSGI plugin!" - CHECK_RESULT $? 0 0 "uwsgi插件加载C++应用失败" - LOG_INFO "uwsgi插件成功加载C++应用" - - # 步骤8:清理临时文件 - LOG_INFO "步骤8:清理临时文件" - rm -f ${TEST_CPP_FILE} ${TEST_APP}.so - CHECK_RESULT $? 0 0 "清理临时文件失败" - - # 步骤9:如果测试前未安装,则卸载软件包 - if [ "$INSTALLED" = "false" ]; then - LOG_INFO "步骤9:卸载 ${PACKAGE_NAME} 软件包" - dnf remove -y ${PACKAGE_NAME} - CHECK_RESULT $? 0 0 "卸载 ${PACKAGE_NAME} 失败" - LOG_INFO "${PACKAGE_NAME} 卸载成功" - else - LOG_INFO "步骤9:测试前已安装 ${PACKAGE_NAME},保持安装状态" - fi - - LOG_INFO "测试脚本 ${SCRIPT_NAME} 执行完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_exec.sh b/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_exec.sh deleted file mode 100644 index 5f2c197c85c..00000000000 --- a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_exec.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-12 -# @License : Mulan PSL v2 -# @Desc : Test executing C++ code -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查yum源中是否存在uwsgi-plugin-cplusplus软件包 - LOG_INFO "检查yum源中是否存在uwsgi-plugin-cplusplus软件包" - dnf list available uwsgi-plugin-cplusplus > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在uwsgi-plugin-cplusplus软件包" - exit 255 - fi - - # 检查是否已安装uwsgi-plugin-cplusplus - LOG_INFO "检查是否已安装uwsgi-plugin-cplusplus" - rpm -q uwsgi-plugin-cplusplus > /dev/null 2>&1 - if [ $? -eq 0 ]; then - INSTALLED=true - LOG_INFO "uwsgi-plugin-cplusplus已安装" - else - INSTALLED=false - LOG_INFO "uwsgi-plugin-cplusplus未安装,将进行安装" - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "正在安装uwsgi-plugin-cplusplus" - dnf install -y uwsgi-plugin-cplusplus > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装uwsgi-plugin-cplusplus失败" - fi - - # 测试执行C++代码功能 - LOG_INFO "测试执行C++代码功能" - uwsgi --plugin cpp --need-app > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "执行C++代码功能失败" - - # 清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "清理环境,卸载uwsgi-plugin-cplusplus" - dnf remove -y uwsgi-plugin-cplusplus > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载uwsgi-plugin-cplusplus失败" - fi - - LOG_INFO "测试脚本执行完毕" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_integration.sh b/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_integration.sh deleted file mode 100644 index 2d5b2cd317d..00000000000 --- a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_integration.sh +++ /dev/null @@ -1,105 +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-20 -# @License : Mulan PSL v2 -# @Desc : Test integration with uWSGI server -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test integration with uWSGI server" - LOG_INFO "步骤1:检查当前环境是否已安装uwsgi-plugin-cplusplus软件包" - if rpm -q uwsgi-plugin-cplusplus &> /dev/null; then - LOG_INFO "uwsgi-plugin-cplusplus软件包已安装,测试结束后将保持安装状态" - INSTALLED=1 - else - LOG_INFO "uwsgi-plugin-cplusplus软件包未安装,测试结束后将卸载" - INSTALLED=0 - fi - - LOG_INFO "步骤2:检查yum源中是否存在uwsgi-plugin-cplusplus软件包" - if ! dnf list available uwsgi-plugin-cplusplus &> /dev/null; then - LOG_ERROR "yum源中未找到uwsgi-plugin-cplusplus软件包" - exit 255 - fi - - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "步骤3:安装uwsgi-plugin-cplusplus软件包" - dnf install -y uwsgi-plugin-cplusplus - CHECK_RESULT $? 0 0 "安装uwsgi-plugin-cplusplus软件包失败" - fi - - LOG_INFO "步骤4:检查uWSGI是否支持cpp插件" - uwsgi --plugins-list | grep -q cpp - CHECK_RESULT $? 0 0 "uWSGI不支持cpp插件" - - LOG_INFO "步骤5:创建一个简单的C++ uWSGI插件测试文件" - cat > /tmp/test_cpp_plugin.cpp << "EOF" - #include - extern "C" int test_cpp_function() { - uwsgi_log("C++ plugin test function called\n"); - return 0; - } - extern "C" void uwsgi_cpp_plugin_test(struct wsgi_request *wsgi_req) { - uwsgi_log("C++ plugin request handler called\n"); - } - extern "C" void uwsgi_cpp_plugin_init() { - uwsgi_log("C++ plugin initialized\n"); - } - EOF - - LOG_INFO "步骤6:编译测试C++插件" - g++ -shared -fPIC -o /tmp/test_cpp_plugin.so /tmp/test_cpp_plugin.cpp -I/usr/include/uwsgi - CHECK_RESULT $? 0 0 "编译C++插件失败" - - LOG_INFO "步骤7:创建uWSGI配置文件测试C++插件集成" - cat > /tmp/uwsgi_test.ini << "EOF" - [uwsgi] - plugin = cpp - module = - cpp-load = /tmp/test_cpp_plugin.so - http-socket = :9090 - master = true - workers = 1 - EOF - - LOG_INFO "步骤8:启动uWSGI服务器测试C++插件" - uwsgi --ini /tmp/uwsgi_test.ini --daemonize /tmp/uwsgi.log - CHECK_RESULT $? 0 0 "启动uWSGI服务器失败" - - LOG_INFO "步骤9:检查uWSGI进程是否运行" - sleep 2 - pgrep -f "uwsgi.*test_cpp_plugin" > /dev/null - CHECK_RESULT $? 0 0 "uWSGI进程未运行" - - LOG_INFO "步骤10:停止uWSGI测试进程" - pkill -f "uwsgi.*test_cpp_plugin" - CHECK_RESULT $? 0 0 "停止uWSGI进程失败" - - LOG_INFO "步骤11:清理临时测试文件" - rm -f /tmp/test_cpp_plugin.cpp /tmp/test_cpp_plugin.so /tmp/uwsgi_test.ini /tmp/uwsgi.log - CHECK_RESULT $? 0 0 "清理临时文件失败" - - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "步骤12:卸载uwsgi-plugin-cplusplus软件包" - dnf remove -y uwsgi-plugin-cplusplus - CHECK_RESULT $? 0 0 "卸载uwsgi-plugin-cplusplus软件包失败" - fi - - LOG_INFO "测试完成:Test integration with uWSGI server 通过" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_load.sh b/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_load.sh deleted file mode 100644 index 5a3eb75426e..00000000000 --- a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_load.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-12 -# @License : Mulan PSL v2 -# @Desc : Test loading the C++ plugin -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test loading the C++ plugin" - - # 检查yum源中是否存在uwsgi-plugin-cplusplus软件包 - LOG_INFO "检查yum源中是否存在uwsgi-plugin-cplusplus软件包" - dnf list available uwsgi-plugin-cplusplus > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在uwsgi-plugin-cplusplus软件包" - exit 255 - fi - - # 判断环境是否已安装uwsgi-plugin-cplusplus - LOG_INFO "判断环境是否已安装uwsgi-plugin-cplusplus" - rpm -q uwsgi-plugin-cplusplus > /dev/null 2>&1 - if [ $? -eq 0 ]; then - installed=true - LOG_INFO "uwsgi-plugin-cplusplus已安装" - else - installed=false - LOG_INFO "uwsgi-plugin-cplusplus未安装,将进行安装" - fi - - # 如果未安装,则安装软件包 - if [ "$installed" = false ]; then - LOG_INFO "安装uwsgi-plugin-cplusplus软件包" - dnf install -y uwsgi-plugin-cplusplus - CHECK_RESULT $? 0 0 "安装uwsgi-plugin-cplusplus失败" - fi - - # 测试加载C++插件 - LOG_INFO "测试加载C++插件" - uwsgi --plugin cpp --need-plugin cpp --version > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "加载C++插件失败" - - # 如果之前未安装,则卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载uwsgi-plugin-cplusplus软件包" - dnf remove -y uwsgi-plugin-cplusplus - CHECK_RESULT $? 0 0 "卸载uwsgi-plugin-cplus-plus失败" - fi - - LOG_INFO "测试完成:Test loading the C++ plugin" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_version.sh b/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_version.sh deleted file mode 100644 index d102e2c8a1a..00000000000 --- a/testcases/function_test/pkg_test/uwsgi/uwsgi-plugin-cplusplus/test_uwsgi-plugin-cplusplus_function_version.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .ALL rights reserved. -# This program is licensed under Mulan PSL v2. -# You can use it according to the terms and conditions of the Mulan PSL v2. -# http://license.coscl.org.cn/MulanPSL2 -# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -# See the Mulan PSL v2 for more details. - -# ############################################# -# @Author : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2026-02-20 -# @License : Mulan PSL v2 -# @Desc : Test checking the installed plugin version -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 定义变量 - PACKAGE_NAME="uwsgi-plugin-cplusplus" - LOG_INFO "测试开始:检查已安装的插件版本" - LOG_INFO "步骤1:检查yum源中是否存在${PACKAGE_NAME}软件包" - dnf list available ${PACKAGE_NAME} > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中不存在${PACKAGE_NAME}软件包" - exit 255 - fi - LOG_INFO "步骤2:检查当前是否已安装${PACKAGE_NAME}软件包" - IS_INSTALLED=0 - if rpm -qa | grep -q ${PACKAGE_NAME}; then - IS_INSTALLED=1 - LOG_INFO "${PACKAGE_NAME}软件包已安装,跳过安装步骤" - else - LOG_INFO "${PACKAGE_NAME}软件包未安装,开始安装" - dnf install -y ${PACKAGE_NAME} > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}软件包失败" - fi - LOG_INFO "步骤3:检查uwsgi命令是否支持--plugins参数" - uwsgi --help | grep -q "\-\-plugins" - CHECK_RESULT $? 0 255 "uwsgi命令不支持--plugins参数" - LOG_INFO "步骤4:执行uwsgi --plugins命令查看已安装的插件列表" - uwsgi --plugins 2>&1 | grep -q "cplusplus" - CHECK_RESULT $? 0 0 "未找到cplusplus插件" - LOG_INFO "步骤5:检查cplusplus插件的版本信息" - PLUGIN_VERSION=$(uwsgi --plugins 2>&1 | grep "cplusplus" | awk "{print $2}") - if [ -z "${PLUGIN_VERSION}" ]; then - LOG_ERROR "无法获取cplusplus插件版本信息" - exit 1 - else - LOG_INFO "cplusplus插件版本为:${PLUGIN_VERSION}" - fi - LOG_INFO "步骤6:环境恢复" - if [ ${IS_INSTALLED} -eq 0 ]; then - LOG_INFO "卸载${PACKAGE_NAME}软件包" - dnf remove -y ${PACKAGE_NAME} > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}软件包失败" - else - LOG_INFO "${PACKAGE_NAME}软件包已安装,保持安装状态" - fi - LOG_INFO "测试完成:检查已安装的插件版本" -} - -main "$@" \ No newline at end of file