提交 473ca762 编写于 作者: L luluyalula 提交者: Gitee

删除文件 testcases/smoke-testing/oe_test_version_release_001

上级 dc73c09b
#!/usr/bin/bash
# #############################################
# @Author : yuanlulu
# @Contact : cynthiayuanll@163.com
# @Date : 2020-07-23
# @License : Mulan PSL v2
# @Desc : Version consistency check of full package
# ############################################
source "$OET_PATH/libs/locallibs/common_lib.sh"
function config_params() {
LOG_INFO "This test case has no config params to load!"
}
function run_test() {
LOG_INFO "Start testing..."
#将未安装的包做备份
yum list available >available
#去除前两行
sed -i '1,2d' available
#将未安装的包名放在remove_ope数组中
remove_list=(`awk '{print $1}' available`)
failed_list=""
for install in ${remove_list[@]}
do
yum -y install $install
done
for rpm in $(rpm -qa)
do
version=$(rpm -qi ${rpm} | grep Version | awk '{print $NF}')
release=$(rpm -qi ${rpm} | grep Release | awk '{print $NF}')
rpm -qi ${rpm} | grep "Source RPM" | grep -w "${version}-${release}" || failed_list="${failed_list} ${rpm}"
done
[ -z "$failed_list" ]
CHECK_RESULT $?
LOG_INFO "Finish test!"
}
function post_test() {
LOG_INFO "start environment reset."
for item in ${remove_list[@]}
do
#把未安装的包删除
yum -y remove $item --noautoremove
done
echo ${failed_list}
LOG_INFO "Finish environment reset!"
}
main $@
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册