update testcase for testsuite python-tqdm-help
This commit is contained in:
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"path": "$OET_PATH/testcases/function_test/pkg_test/python-tqdm/python-tqdm-help",
|
|
||||||
"machine num": 1,
|
|
||||||
"cases": [
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_install",
|
|
||||||
"desc": "测试通过pip安装python-tqdm-help软件包"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_uninstall",
|
|
||||||
"desc": "测试通过pip卸载python-tqdm-help软件包"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_import",
|
|
||||||
"desc": "测试成功导入python-tqdm-help模块"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_basic_usage",
|
|
||||||
"desc": "测试使用python-tqdm-help创建基础进度条"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_total_iter",
|
|
||||||
"desc": "测试进度条总迭代次数设置"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_desc_set",
|
|
||||||
"desc": "测试进度条描述信息设置"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_nested_bars",
|
|
||||||
"desc": "测试嵌套进度条功能"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_file_write",
|
|
||||||
"desc": "测试进度条输出重定向到文件"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_disable",
|
|
||||||
"desc": "测试禁用进度条显示功能"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test_python-tqdm-help_version",
|
|
||||||
"desc": "测试获取软件包版本信息"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -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-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试使用python-tqdm-help创建基础进度条
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
# 检查python-tqdm-help软件包是否已在yum源中
|
|
||||||
LOG_INFO "检查python-tqdm-help软件包是否在yum源中"
|
|
||||||
dnf list python-tqdm-help > /dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
LOG_ERROR "yum源中未找到python-tqdm-help软件包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 检查系统是否已安装python-tqdm-help
|
|
||||||
LOG_INFO "检查系统是否已安装python-tqdm-help"
|
|
||||||
rpm -q python-tqdm-help > /dev/null 2>&1
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
LOG_INFO "系统已安装python-tqdm-help,测试结束后将保持安装状态"
|
|
||||||
ALREADY_INSTALLED=1
|
|
||||||
else
|
|
||||||
LOG_INFO "系统未安装python-tqdm-help,将在测试过程中安装"
|
|
||||||
ALREADY_INSTALLED=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 如果未安装,则安装软件包
|
|
||||||
if [ ${ALREADY_INSTALLED} -eq 0 ]; then
|
|
||||||
LOG_INFO "安装python-tqdm-help软件包"
|
|
||||||
dnf install -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "安装python-tqdm-help失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 测试python-tqdm-help命令是否存在
|
|
||||||
LOG_INFO "检查python-tqdm-help命令是否存在"
|
|
||||||
command -v python-tqdm-help > /dev/null 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "python-tqdm-help命令不存在"
|
|
||||||
|
|
||||||
# 测试python-tqdm-help的help参数
|
|
||||||
LOG_INFO "测试python-tqdm-help的help参数"
|
|
||||||
python-tqdm-help --help > /dev/null 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "python-tqdm-help不支持--help参数"
|
|
||||||
|
|
||||||
# 测试使用python-tqdm-help创建基础进度条
|
|
||||||
LOG_INFO "测试使用python-tqdm-help创建基础进度条"
|
|
||||||
python -c "
|
|
||||||
from tqdm import tqdm
|
|
||||||
import time
|
|
||||||
for i in tqdm(range(10), desc="测试进度条"):
|
|
||||||
time.sleep(0.1)
|
|
||||||
" > /dev/null 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "使用python-tqdm-help创建基础进度条失败"
|
|
||||||
|
|
||||||
# 清理环境:如果测试前未安装,则卸载软件包
|
|
||||||
if [ ${ALREADY_INSTALLED} -eq 0 ]; then
|
|
||||||
LOG_INFO "卸载python-tqdm-help软件包"
|
|
||||||
dnf remove -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python-tqdm-help失败"
|
|
||||||
LOG_INFO "环境已恢复到测试前状态"
|
|
||||||
else
|
|
||||||
LOG_INFO "测试前已安装python-tqdm-help,保持安装状态"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "测试脚本执行完成"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
|
||||||
# This program is licensed under Mulan PSL v2.
|
|
||||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
# http://license.coscl.org.cn/MulanPSL2
|
|
||||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the Mulan PSL v2 for more details.
|
|
||||||
|
|
||||||
# #############################################
|
|
||||||
# @Author : honghua
|
|
||||||
# @Contact : honghua@iscas.ac.cn
|
|
||||||
# @Date : 2026-03-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试进度条描述信息设置
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
LOG_INFO "开始测试进度条描述信息设置"
|
|
||||||
|
|
||||||
# 检查是否已安装python3-tqdm包
|
|
||||||
LOG_INFO "检查python3-tqdm是否已安装"
|
|
||||||
if rpm -q python3-tqdm &> /dev/null; then
|
|
||||||
LOG_INFO "python3-tqdm已安装"
|
|
||||||
INSTALLED="yes"
|
|
||||||
else
|
|
||||||
LOG_INFO "python3-tqdm未安装"
|
|
||||||
INSTALLED="no"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 检查yum源中是否有python3-tqdm包
|
|
||||||
LOG_INFO "检查yum源中是否有python3-tqdm包"
|
|
||||||
if ! dnf list available python3-tqdm &> /dev/null; then
|
|
||||||
LOG_ERROR "yum源中未找到python3-tqdm包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 如果未安装,则安装python3-tqdm
|
|
||||||
if [ "$INSTALLED" = "no" ]; then
|
|
||||||
LOG_INFO "安装python3-tqdm"
|
|
||||||
dnf install -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "安装python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 测试tqdm的desc参数
|
|
||||||
LOG_INFO "测试tqdm的desc参数是否支持"
|
|
||||||
python3 -c "from tqdm import tqdm; import time; list(tqdm(range(10), desc="测试进度条"))" &> /dev/null
|
|
||||||
CHECK_RESULT $? 0 0 "tqdm的desc参数不支持或执行失败"
|
|
||||||
|
|
||||||
# 测试设置进度条描述信息
|
|
||||||
LOG_INFO "测试设置进度条描述信息"
|
|
||||||
output=$(python3 -c "from tqdm import tqdm; import time; print("开始测试"); list(tqdm(range(3), desc="处理中"))" 2>&1)
|
|
||||||
echo "$output" | grep -q "处理中"
|
|
||||||
CHECK_RESULT $? 0 0 "进度条描述信息设置失败"
|
|
||||||
|
|
||||||
# 测试无效参数
|
|
||||||
LOG_INFO "测试无效参数"
|
|
||||||
python3 -c "from tqdm import tqdm; list(tqdm(range(5), invalid_param="test"))" &> /dev/null
|
|
||||||
if [ $? -eq 255 ] || [ $? -ne 0 ]; then
|
|
||||||
LOG_INFO "无效参数检查通过"
|
|
||||||
else
|
|
||||||
LOG_ERROR "无效参数未正确处理"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 环境清理
|
|
||||||
if [ "$INSTALLED" = "no" ]; then
|
|
||||||
LOG_INFO "卸载python3-tqdm"
|
|
||||||
dnf remove -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "测试进度条描述信息设置完成"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -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 : 2026-03-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试禁用进度条显示功能
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
LOG_INFO "开始测试禁用进度条显示功能"
|
|
||||||
|
|
||||||
LOG_INFO "检查python3-tqdm软件包是否已安装"
|
|
||||||
rpm -q python3-tqdm > /dev/null 2>&1
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
LOG_INFO "python3-tqdm已安装"
|
|
||||||
INSTALLED=true
|
|
||||||
else
|
|
||||||
LOG_INFO "python3-tqdm未安装"
|
|
||||||
INSTALLED=false
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "检查yum源中是否有python3-tqdm软件包"
|
|
||||||
dnf list available python3-tqdm > /dev/null 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "yum源中未找到python3-tqdm软件包"
|
|
||||||
|
|
||||||
if [ "$INSTALLED" = "false" ]; then
|
|
||||||
LOG_INFO "安装python3-tqdm软件包"
|
|
||||||
dnf install -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "安装python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "测试tqdm的--help参数"
|
|
||||||
python3 -m tqdm --help > /dev/null 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "tqdm的--help参数执行失败"
|
|
||||||
|
|
||||||
LOG_INFO "测试禁用进度条显示功能"
|
|
||||||
echo "import time
|
|
||||||
from tqdm import tqdm
|
|
||||||
for i in tqdm(range(10), disable=True):
|
|
||||||
time.sleep(0.1)" > test_tqdm_disable.py
|
|
||||||
|
|
||||||
python3 test_tqdm_disable.py 2>&1 | grep -q "disable=True"
|
|
||||||
CHECK_RESULT $? 0 0 "禁用进度条显示功能测试失败"
|
|
||||||
|
|
||||||
LOG_INFO "清理临时文件"
|
|
||||||
rm -f test_tqdm_disable.py
|
|
||||||
|
|
||||||
if [ "$INSTALLED" = "false" ]; then
|
|
||||||
LOG_INFO "卸载python3-tqdm软件包"
|
|
||||||
dnf remove -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "测试完成"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -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-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试进度条输出重定向到文件
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
# 判断是否已安装python3-tqdm
|
|
||||||
LOG_INFO "检查python3-tqdm是否已安装"
|
|
||||||
rpm -q python3-tqdm > /dev/null 2>&1
|
|
||||||
installed=$?
|
|
||||||
|
|
||||||
if [ $installed -eq 0 ]; then
|
|
||||||
LOG_INFO "python3-tqdm已安装,测试结束后保持安装状态"
|
|
||||||
need_uninstall=0
|
|
||||||
else
|
|
||||||
LOG_INFO "python3-tqdm未安装,将在测试前安装,测试后卸载"
|
|
||||||
need_uninstall=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 检查yum源中是否有python3-tqdm包
|
|
||||||
LOG_INFO "检查yum源中是否有python3-tqdm包"
|
|
||||||
dnf list available python3-tqdm > /dev/null 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "yum源中没有python3-tqdm包"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
LOG_ERROR "yum源中没有python3-tqdm包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 如果未安装,则安装python3-tqdm
|
|
||||||
if [ $installed -ne 0 ]; then
|
|
||||||
LOG_INFO "安装python3-tqdm"
|
|
||||||
dnf install -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "安装python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 创建测试用的Python脚本
|
|
||||||
LOG_INFO "创建测试Python脚本"
|
|
||||||
cat > test_tqdm.py << "EOF"
|
|
||||||
import time
|
|
||||||
from tqdm import tqdm
|
|
||||||
|
|
||||||
for i in tqdm(range(100), desc="测试进度条"):
|
|
||||||
time.sleep(0.01)
|
|
||||||
EOF
|
|
||||||
CHECK_RESULT $? 0 0 "创建测试Python脚本失败"
|
|
||||||
|
|
||||||
# 测试进度条输出重定向到文件
|
|
||||||
LOG_INFO "测试进度条输出重定向到文件"
|
|
||||||
output_file="tqdm_output.txt"
|
|
||||||
python3 test_tqdm.py > $output_file 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "执行Python脚本失败"
|
|
||||||
|
|
||||||
# 检查输出文件是否包含进度条内容
|
|
||||||
LOG_INFO "检查输出文件是否包含进度条内容"
|
|
||||||
if [ -f "$output_file" ]; then
|
|
||||||
grep -q "测试进度条" $output_file
|
|
||||||
CHECK_RESULT $? 0 0 "输出文件中未找到进度条内容"
|
|
||||||
LOG_INFO "进度条输出重定向到文件成功"
|
|
||||||
else
|
|
||||||
LOG_ERROR "输出文件未创建"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 清理临时文件
|
|
||||||
LOG_INFO "清理临时文件"
|
|
||||||
rm -f test_tqdm.py $output_file
|
|
||||||
CHECK_RESULT $? 0 0 "清理临时文件失败"
|
|
||||||
|
|
||||||
# 如果测试前未安装,则卸载python3-tqdm
|
|
||||||
if [ $need_uninstall -eq 1 ]; then
|
|
||||||
LOG_INFO "卸载python3-tqdm"
|
|
||||||
dnf remove -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python3-tqdm失败"
|
|
||||||
LOG_INFO "环境已恢复到测试前状态"
|
|
||||||
else
|
|
||||||
LOG_INFO "保持python3-tqdm安装状态"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "测试完成"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
|
||||||
# This program is licensed under Mulan PSL v2.
|
|
||||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
# http://license.coscl.org.cn/MulanPSL2
|
|
||||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the Mulan PSL v2 for more details.
|
|
||||||
|
|
||||||
# #############################################
|
|
||||||
# @Author : honghua
|
|
||||||
# @Contact : honghua@iscas.ac.cn
|
|
||||||
# @Date : 2026-03-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试成功导入python-tqdm-help模块
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
LOG_INFO "开始测试:测试成功导入python-tqdm-help模块"
|
|
||||||
|
|
||||||
# 检查yum源中是否存在python-tqdm-help软件包
|
|
||||||
LOG_INFO "检查yum源中是否存在python-tqdm-help软件包"
|
|
||||||
dnf list available python-tqdm-help > /dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
LOG_ERROR "yum源中未找到python-tqdm-help软件包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 检查系统是否已安装python-tqdm-help
|
|
||||||
LOG_INFO "检查系统是否已安装python-tqdm-help"
|
|
||||||
rpm -q python-tqdm-help > /dev/null 2>&1
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
LOG_INFO "python-tqdm-help已安装,标记为已存在安装"
|
|
||||||
INSTALLED_BEFORE_TEST=true
|
|
||||||
else
|
|
||||||
LOG_INFO "python-tqdm-help未安装,将在测试中安装"
|
|
||||||
INSTALLED_BEFORE_TEST=false
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 如果未安装,则安装软件包
|
|
||||||
if [ "$INSTALLED_BEFORE_TEST" = false ]; then
|
|
||||||
LOG_INFO "安装python-tqdm-help软件包"
|
|
||||||
dnf install -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "安装python-tqdm-help失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 测试导入python-tqdm-help模块
|
|
||||||
LOG_INFO "测试导入python-tqdm-help模块"
|
|
||||||
python3 -c "import tqdm.help" 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "导入python-tqdm-help模块失败"
|
|
||||||
|
|
||||||
# 测试完成后,如果测试前未安装,则卸载软件包
|
|
||||||
if [ "$INSTALLED_BEFORE_TEST" = false ]; then
|
|
||||||
LOG_INFO "卸载python-tqdm-help软件包"
|
|
||||||
dnf remove -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python-tqdm-help失败"
|
|
||||||
LOG_INFO "环境已恢复,python-tqdm-help已卸载"
|
|
||||||
else
|
|
||||||
LOG_INFO "环境已恢复,保持python-tqdm-help安装状态"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "测试完成:成功导入python-tqdm-help模块"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
|
||||||
# This program is licensed under Mulan PSL v2.
|
|
||||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
# http://license.coscl.org.cn/MulanPSL2
|
|
||||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the Mulan PSL v2 for more details.
|
|
||||||
|
|
||||||
# #############################################
|
|
||||||
# @Author : honghua
|
|
||||||
# @Contact : honghua@iscas.ac.cn
|
|
||||||
# @Date : 2026-03-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试通过pip安装python-tqdm-help软件包
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
# 判断是否已安装python-tqdm-help
|
|
||||||
LOG_INFO "检查是否已安装python-tqdm-help软件包"
|
|
||||||
if pip show python-tqdm-help &> /dev/null; then
|
|
||||||
LOG_INFO "python-tqdm-help已安装,记录状态"
|
|
||||||
INSTALLED="true"
|
|
||||||
else
|
|
||||||
LOG_INFO "python-tqdm-help未安装"
|
|
||||||
INSTALLED="false"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 检查yum源中是否有python-tqdm-help软件包
|
|
||||||
LOG_INFO "检查yum源中是否有python-tqdm-help软件包"
|
|
||||||
if dnf list available python-tqdm-help &> /dev/null; then
|
|
||||||
LOG_INFO "yum源中存在python-tqdm-help软件包"
|
|
||||||
else
|
|
||||||
LOG_ERROR "yum源中不存在python-tqdm-help软件包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 如果未安装,则进行安装
|
|
||||||
if [ "$INSTALLED" = "false" ]; then
|
|
||||||
LOG_INFO "开始安装python-tqdm-help软件包"
|
|
||||||
dnf install -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "安装python-tqdm-help失败"
|
|
||||||
LOG_INFO "安装python-tqdm-help成功"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 测试通过pip安装python-tqdm-help软件包
|
|
||||||
LOG_INFO "测试通过pip安装python-tqdm-help软件包"
|
|
||||||
pip install python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "通过pip安装python-tqdm-help失败"
|
|
||||||
|
|
||||||
# 验证安装是否成功
|
|
||||||
LOG_INFO "验证python-tqdm-help是否安装成功"
|
|
||||||
pip show python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "验证python-tqdm-help安装失败"
|
|
||||||
|
|
||||||
# 清理环境:如果之前未安装,则卸载软件包
|
|
||||||
if [ "$INSTALLED" = "false" ]; then
|
|
||||||
LOG_INFO "清理环境:卸载python-tqdm-help软件包"
|
|
||||||
dnf remove -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python-tqdm-help失败"
|
|
||||||
LOG_INFO "清理环境完成"
|
|
||||||
else
|
|
||||||
LOG_INFO "保持python-tqdm-help安装状态"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "测试脚本执行完毕"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
|
||||||
# This program is licensed under Mulan PSL v2.
|
|
||||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
# http://license.coscl.org.cn/MulanPSL2
|
|
||||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the Mulan PSL v2 for more details.
|
|
||||||
|
|
||||||
# #############################################
|
|
||||||
# @Author : honghua
|
|
||||||
# @Contact : honghua@iscas.ac.cn
|
|
||||||
# @Date : 2026-03-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试嵌套进度条功能
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
LOG_INFO "开始测试嵌套进度条功能"
|
|
||||||
|
|
||||||
LOG_INFO "步骤1: 检查python3-tqdm软件包是否在yum源中"
|
|
||||||
dnf list available python3-tqdm 2>/dev/null | grep -q python3-tqdm
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
LOG_ERROR "yum源中未找到python3-tqdm软件包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "步骤2: 检查系统是否已安装python3-tqdm"
|
|
||||||
rpm -q python3-tqdm >/dev/null 2>&1
|
|
||||||
installed=$?
|
|
||||||
|
|
||||||
if [ $installed -ne 0 ]; then
|
|
||||||
LOG_INFO "python3-tqdm未安装,开始安装"
|
|
||||||
dnf install -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "安装python3-tqdm失败"
|
|
||||||
installed_during_test=1
|
|
||||||
else
|
|
||||||
LOG_INFO "python3-tqdm已安装"
|
|
||||||
installed_during_test=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "步骤3: 创建测试Python脚本"
|
|
||||||
cat > test_nested_bars.py << "EOF"
|
|
||||||
from time import sleep
|
|
||||||
from tqdm import tqdm
|
|
||||||
|
|
||||||
for i in tqdm(range(10), desc="外层进度条"):
|
|
||||||
for j in tqdm(range(5), desc=f"内层进度条 {i+1}", leave=False):
|
|
||||||
sleep(0.01)
|
|
||||||
print("嵌套进度条测试完成")
|
|
||||||
EOF
|
|
||||||
|
|
||||||
LOG_INFO "步骤4: 执行嵌套进度条测试"
|
|
||||||
python3 test_nested_bars.py
|
|
||||||
CHECK_RESULT $? 0 0 "执行嵌套进度条测试失败"
|
|
||||||
|
|
||||||
LOG_INFO "步骤5: 测试tqdm的帮助信息"
|
|
||||||
python3 -c "import tqdm; help(tqdm)" | head -20
|
|
||||||
CHECK_RESULT $? 0 0 "获取tqdm帮助信息失败"
|
|
||||||
|
|
||||||
LOG_INFO "步骤6: 清理测试脚本"
|
|
||||||
rm -f test_nested_bars.py
|
|
||||||
|
|
||||||
LOG_INFO "步骤7: 恢复环境"
|
|
||||||
if [ $installed_during_test -eq 1 ]; then
|
|
||||||
LOG_INFO "卸载测试期间安装的python3-tqdm"
|
|
||||||
dnf remove -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python3-tqdm失败"
|
|
||||||
else
|
|
||||||
LOG_INFO "保持python3-tqdm安装状态"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "嵌套进度条功能测试完成"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -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-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试进度条总迭代次数设置
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
LOG_INFO "开始测试:测试进度条总迭代次数设置"
|
|
||||||
|
|
||||||
LOG_INFO "步骤1:检查环境是否已安装python3-tqdm软件包"
|
|
||||||
if dnf list installed python3-tqdm &>/dev/null; then
|
|
||||||
LOG_INFO "python3-tqdm已安装"
|
|
||||||
INSTALLED="yes"
|
|
||||||
else
|
|
||||||
LOG_INFO "python3-tqdm未安装"
|
|
||||||
INSTALLED="no"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "步骤2:检查yum源中是否存在python3-tqdm软件包"
|
|
||||||
if ! dnf list python3-tqdm &>/dev/null; then
|
|
||||||
LOG_ERROR "yum源中未找到python3-tqdm软件包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$INSTALLED" = "no" ]; then
|
|
||||||
LOG_INFO "步骤3:安装python3-tqdm软件包"
|
|
||||||
dnf install -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "安装python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "步骤4:检查python3-tqdm的help命令是否支持--total参数"
|
|
||||||
if ! python3 -m tqdm --help 2>&1 | grep -q "\-\-total"; then
|
|
||||||
LOG_ERROR "python3-tqdm的help命令不支持--total参数"
|
|
||||||
if [ "$INSTALLED" = "no" ]; then
|
|
||||||
LOG_INFO "步骤5:卸载python3-tqdm软件包"
|
|
||||||
dnf remove -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "步骤5:执行测试命令,测试--total参数"
|
|
||||||
python3 -m tqdm --total 100 2>&1 | head -5
|
|
||||||
CHECK_RESULT $? 0 0 "执行tqdm --total命令失败"
|
|
||||||
|
|
||||||
LOG_INFO "步骤6:验证--total参数设置正确"
|
|
||||||
output=$(python3 -c "
|
|
||||||
from tqdm import tqdm
|
|
||||||
import sys
|
|
||||||
import io
|
|
||||||
old_stdout = sys.stdout
|
|
||||||
sys.stdout = io.StringIO()
|
|
||||||
for i in tqdm(range(10), total=100):
|
|
||||||
pass
|
|
||||||
sys.stdout = old_stdout
|
|
||||||
")
|
|
||||||
if echo "$output" | grep -q "100%"; then
|
|
||||||
LOG_INFO "--total参数设置成功"
|
|
||||||
else
|
|
||||||
LOG_ERROR "--total参数设置失败"
|
|
||||||
if [ "$INSTALLED" = "no" ]; then
|
|
||||||
LOG_INFO "步骤7:卸载python3-tqdm软件包"
|
|
||||||
dnf remove -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$INSTALLED" = "no" ]; then
|
|
||||||
LOG_INFO "步骤7:卸载python3-tqdm软件包"
|
|
||||||
dnf remove -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "测试完成:进度条总迭代次数设置功能正常"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -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-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试通过pip卸载python-tqdm-help软件包
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
LOG_INFO "开始测试通过pip卸载python-tqdm-help软件包"
|
|
||||||
LOG_INFO "步骤1: 检查yum源中是否存在python-tqdm-help软件包"
|
|
||||||
dnf list python-tqdm-help &>/dev/null
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
LOG_ERROR "yum源中未找到python-tqdm-help软件包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
LOG_INFO "步骤2: 检查当前环境中python-tqdm-help软件包是否已安装"
|
|
||||||
rpm -q python-tqdm-help &>/dev/null
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
LOG_INFO "python-tqdm-help软件包已安装,测试结束时将保持安装状态"
|
|
||||||
ALREADY_INSTALLED=1
|
|
||||||
else
|
|
||||||
LOG_INFO "python-tqdm-help软件包未安装,将进行安装操作"
|
|
||||||
ALREADY_INSTALLED=0
|
|
||||||
fi
|
|
||||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
|
||||||
LOG_INFO "步骤3: 使用dnf安装python-tqdm-help软件包"
|
|
||||||
dnf install -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "安装python-tqdm-help软件包失败"
|
|
||||||
fi
|
|
||||||
LOG_INFO "步骤4: 检查pip命令是否可用"
|
|
||||||
pip --version &>/dev/null
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
LOG_ERROR "系统中未找到pip命令,无法执行卸载操作"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
LOG_INFO "步骤5: 检查pip卸载命令是否支持python-tqdm-help软件包"
|
|
||||||
pip uninstall --help | grep -q "python-tqdm-help"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
LOG_ERROR "pip卸载命令不支持python-tqdm-help软件包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
LOG_INFO "步骤6: 使用pip卸载python-tqdm-help软件包"
|
|
||||||
pip uninstall -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "使用pip卸载python-tqdm-help软件包失败"
|
|
||||||
LOG_INFO "步骤7: 验证python-tqdm-help软件包是否已卸载"
|
|
||||||
pip list | grep -q python-tqdm-help
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
LOG_ERROR "pip卸载后,python-tqdm-help软件包仍然存在"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
LOG_INFO "步骤8: 环境清理与恢复"
|
|
||||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
|
||||||
LOG_INFO "原始环境未安装python-tqdm-help,使用dnf重新安装以恢复环境"
|
|
||||||
dnf install -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "重新安装python-tqdm-help软件包失败"
|
|
||||||
LOG_INFO "使用dnf卸载python-tqdm-help软件包以保持原始未安装状态"
|
|
||||||
dnf remove -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python-tqdm-help软件包失败"
|
|
||||||
else
|
|
||||||
LOG_INFO "原始环境已安装python-tqdm-help,使用dnf重新安装以恢复环境"
|
|
||||||
dnf install -y python-tqdm-help
|
|
||||||
CHECK_RESULT $? 0 0 "重新安装python-tqdm-help软件包失败"
|
|
||||||
fi
|
|
||||||
LOG_INFO "测试通过pip卸载python-tqdm-help软件包完成"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
|
||||||
# This program is licensed under Mulan PSL v2.
|
|
||||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
# http://license.coscl.org.cn/MulanPSL2
|
|
||||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the Mulan PSL v2 for more details.
|
|
||||||
|
|
||||||
# #############################################
|
|
||||||
# @Author : honghua
|
|
||||||
# @Contact : honghua@iscas.ac.cn
|
|
||||||
# @Date : 2026-03-28
|
|
||||||
# @License : Mulan PSL v2
|
|
||||||
# @Desc : 测试获取软件包版本信息
|
|
||||||
# ############################################
|
|
||||||
|
|
||||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
|
||||||
|
|
||||||
function run_test() {
|
|
||||||
LOG_INFO "开始测试:获取python3-tqdm软件包版本信息"
|
|
||||||
LOG_INFO "步骤1:检查python3-tqdm软件包是否已在环境中安装"
|
|
||||||
if rpm -q python3-tqdm > /dev/null 2>&1; then
|
|
||||||
LOG_INFO "python3-tqdm已安装,标记为保持安装状态"
|
|
||||||
INSTALLED_BEFORE="yes"
|
|
||||||
else
|
|
||||||
LOG_INFO "python3-tqdm未安装,标记为需要测试后卸载"
|
|
||||||
INSTALLED_BEFORE="no"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "步骤2:检查yum源中是否存在python3-tqdm软件包"
|
|
||||||
if ! dnf list available python3-tqdm > /dev/null 2>&1; then
|
|
||||||
LOG_ERROR "yum源中未找到python3-tqdm软件包"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$INSTALLED_BEFORE" = "no" ]; then
|
|
||||||
LOG_INFO "步骤3:安装python3-tqdm软件包"
|
|
||||||
dnf install -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "安装python3-tqdm失败"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "步骤4:测试获取python3-tqdm软件包版本信息"
|
|
||||||
rpm -q python3-tqdm --queryformat "%{VERSION}-%{RELEASE}\n"
|
|
||||||
CHECK_RESULT $? 0 0 "获取python3-tqdm版本信息失败"
|
|
||||||
|
|
||||||
LOG_INFO "步骤5:测试python3-tqdm的--help参数"
|
|
||||||
python3 -m tqdm --help > /dev/null 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "执行python3 -m tqdm --help失败"
|
|
||||||
|
|
||||||
LOG_INFO "步骤6:测试python3-tqdm的--version参数"
|
|
||||||
python3 -m tqdm --version > /dev/null 2>&1
|
|
||||||
CHECK_RESULT $? 0 0 "执行python3 -m tqdm --version失败"
|
|
||||||
|
|
||||||
LOG_INFO "步骤7:清理环境,恢复原始状态"
|
|
||||||
if [ "$INSTALLED_BEFORE" = "no" ]; then
|
|
||||||
LOG_INFO "卸载测试安装的python3-tqdm软件包"
|
|
||||||
dnf remove -y python3-tqdm
|
|
||||||
CHECK_RESULT $? 0 0 "卸载python3-tqdm失败"
|
|
||||||
else
|
|
||||||
LOG_INFO "环境已安装python3-tqdm,保持安装状态"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOG_INFO "测试完成:成功获取python3-tqdm软件包版本信息"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
Reference in New Issue
Block a user