diff --git a/suite2cases/function_test/pkg_test/python-waitress/python-waitress-help.json b/suite2cases/function_test/pkg_test/python-waitress/python-waitress-help.json deleted file mode 100644 index 02128bc5b2b..00000000000 --- a/suite2cases/function_test/pkg_test/python-waitress/python-waitress-help.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/python-waitress/python-waitress-help", - "machine num": 1, - "cases": [ - { - "name": "test_python-waitress-help_function_start", - "desc": "Test the start functionality of waitress" - } - ] -} \ No newline at end of file diff --git a/testcases/function_test/pkg_test/python-waitress/python-waitress-help/test_python-waitress-help_function_start.sh b/testcases/function_test/pkg_test/python-waitress/python-waitress-help/test_python-waitress-help_function_start.sh deleted file mode 100644 index 1a7773fb495..00000000000 --- a/testcases/function_test/pkg_test/python-waitress/python-waitress-help/test_python-waitress-help_function_start.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-03 -# @License : Mulan PSL v2 -# @Desc : Test the start functionality of waitress -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装python3-waitress - LOG_INFO "检查是否已安装python3-waitress" - rpm -q python3-waitress > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "python3-waitress已安装" - installed=true - else - LOG_INFO "python3-waitress未安装" - installed=false - fi - - # 检查yum源中是否有python3-waitress软件包 - LOG_INFO "检查yum源中是否有python3-waitress软件包" - dnf list available python3-waitress > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到python3-waitress软件包" - exit 255 - fi - - # 如果未安装,则安装python3-waitress - if [ "$installed" = false ]; then - LOG_INFO "安装python3-waitress" - dnf install -y python3-waitress - CHECK_RESULT $? 0 0 "安装python3-waitress失败" - fi - - # 测试waitress的start功能 - LOG_INFO "测试waitress的start功能" - waitress-serve --help | grep -q "start" - CHECK_RESULT $? 0 0 "waitress-serve命令不支持start参数" - - # 如果脚本开始时未安装,则在结束时卸载python3-waitress - if [ "$installed" = false ]; then - LOG_INFO "卸载python3-waitress" - dnf remove -y python3-waitress - CHECK_RESULT $? 0 0 "卸载python3-waitress失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file