forked from redrsoe2100/os-autotest
delete no exist in testsuite testcase
This commit is contained in:
@@ -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-11-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test blur effect with parameters
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已安装blur-effect软件包
|
||||
LOG_INFO "检查是否已安装blur-effect软件包"
|
||||
rpm -q blur-effect > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "blur-effect已安装"
|
||||
installed=true
|
||||
else
|
||||
LOG_INFO "blur-effect未安装"
|
||||
installed=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有blur-effect软件包
|
||||
LOG_INFO "检查yum源中是否有blur-effect软件包"
|
||||
dnf list available blur-effect > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到blur-effect软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装blur-effect软件包
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "安装blur-effect软件包"
|
||||
dnf install -y blur-effect > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "安装blur-effect软件包失败"
|
||||
fi
|
||||
|
||||
# 测试blur effect功能参数
|
||||
LOG_INFO "测试blur effect功能参数"
|
||||
blur-effect --test-param > /dev/null 2>&1
|
||||
if [ $? -eq 255 ]; then
|
||||
LOG_ERROR "blur-effect不支持--test-param参数"
|
||||
exit 255
|
||||
fi
|
||||
CHECK_RESULT $? 0 0 "执行blur effect功能参数测试失败"
|
||||
|
||||
# 恢复环境
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载blur-effect软件包"
|
||||
dnf remove -y blur-effect > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "卸载blur-effect软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,73 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .ALL rights reserved.
|
||||
# This program is licensed under Mulan PSL v2.
|
||||
# You can use it according to the terms and conditions of the Mulan PSL v2.
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
# See the Mulan PSL v2 for more details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2025-11-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test blur effect performance
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 检查是否已安装blur-effect软件包
|
||||
LOG_INFO "检查是否已安装blur-effect软件包"
|
||||
if rpm -q blur-effect &>/dev/null; then
|
||||
LOG_INFO "blur-effect已安装,测试结束后保持安装状态"
|
||||
installed=true
|
||||
else
|
||||
LOG_INFO "blur-effect未安装,测试结束后将卸载"
|
||||
installed=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有blur-effect软件包
|
||||
LOG_INFO "检查yum源中是否有blur-effect软件包"
|
||||
if ! dnf list available blur-effect &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到blur-effect软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装blur-effect软件包
|
||||
LOG_INFO "安装blur-effect软件包"
|
||||
dnf install -y blur-effect || {
|
||||
LOG_ERROR "安装blur-effect失败"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 测试模糊效果性能
|
||||
LOG_INFO "测试模糊效果性能"
|
||||
blur-effect --test-performance || {
|
||||
LOG_ERROR "模糊效果性能测试失败"
|
||||
if [ "$installed" = false ]; then
|
||||
dnf remove -y blur-effect || {
|
||||
LOG_ERROR "卸载blur-effect失败"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
exit $?
|
||||
}
|
||||
|
||||
# 清理环境
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载blur-effect软件包"
|
||||
dnf remove -y blur-effect || {
|
||||
LOG_ERROR "卸载blur-effect失败"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user