update testcase for testsuite python-responses-help

This commit is contained in:
2026-04-25 02:53:34 +08:00
parent 6a9d8e2794
commit 82de321aaa
2 changed files with 0 additions and 76 deletions

View File

@@ -1,10 +0,0 @@
{
"path": "$OET_PATH/testcases/function_test/pkg_test/python-responses/python-responses-help",
"machine num": 1,
"cases": [
{
"name": "test_python-responses-help_function_basic",
"desc": "Test basic functionality"
}
]
}

View File

@@ -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-10
# @License : Mulan PSL v2
# @Desc : Test basic functionality
# ############################################
source "$OET_PATH/libs/locallibs/common_lib.sh"
function run_test() {
# 检查是否已安装python3-responses-help包
LOG_INFO "检查是否已安装python3-responses-help包"
rpm -q python3-responses-help > /dev/null 2>&1
if [ $? -eq 0 ]; then
LOG_INFO "python3-responses-help包已安装脚本结束时保持安装状态"
INSTALLED=1
else
LOG_INFO "python3-responses-help包未安装将在测试后卸载"
INSTALLED=0
fi
# 检查yum源中是否有python3-responses-help包
LOG_INFO "检查yum源中是否有python3-responses-help包"
dnf list available python3-responses-help > /dev/null 2>&1
if [ $? -ne 0 ]; then
LOG_ERROR "yum源中未找到python3-responses-help包"
exit 255
fi
# 安装python3-responses-help包如果未安装
if [ $INSTALLED -eq 0 ]; then
LOG_INFO "安装python3-responses-help包"
dnf install -y python3-responses-help > /dev/null 2>&1
CHECK_RESULT $? 0 0 "安装python3-responses-help包失败"
fi
# 测试基本功能
LOG_INFO "测试基本功能"
responses-help --help > /dev/null 2>&1
CHECK_RESULT $? 0 0 "responses-help命令不支持--help参数"
# 清理环境(如果脚本开始时未安装)
if [ $INSTALLED -eq 0 ]; then
LOG_INFO "卸载python3-responses-help包"
dnf remove -y python3-responses-help > /dev/null 2>&1
CHECK_RESULT $? 0 0 "卸载python3-responses-help包失败"
fi
LOG_INFO "测试完成"
}
main "$@"