Skip to content

Commit 770ce40

Browse files
committed
Handle remaining complicated yum cases
Signed-off-by: Cristian Le <git@lecris.dev>
1 parent bffaf44 commit 770ce40

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

tests/prepare/artifact/install-cases.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ xfail_plans_nobest=(
3737
"^/broken/no-artifacts/obsoletes/basic$"
3838
"^/broken/no-artifacts/upgrade/with-devel$"
3939
)
40+
xfail_centos7=(
41+
# yum cannot downgrade a pre-installed package
42+
"/pre-installed/downgrade/with-devel$"
43+
"^/verified-artifacts/pre-installed/downgrade/only-foo$"
44+
)
45+
complicated_centos7=(
46+
# Obsoletes wins over priority. Some of these tests pass when they should xfail
47+
# some fail in different ways, it is hard to handle them all consistently, so just skip them.
48+
"^/verified-artifacts/obsoletes/basic/downgrade$"
49+
"^/available-artifacts/obsoletes/basic/downgrade$"
50+
"^/available-artifacts/obsoletes/pre-installed/downgrade/with-devel$"
51+
"^/broken/available-artifacts/obsoletes/basic/downgrade$"
52+
"^/broken/available-artifacts/obsoletes/pre-installed/downgrade/with-devel$"
53+
"^/verified-artifacts/obsoletes/basic/downgrade$"
54+
)
4055

4156
while IFS= read -r image; do
4257
if ! is_fedora "$image" && ! is_centos "$image"; then
@@ -70,6 +85,26 @@ xfail_plans_nobest=(
7085
fi
7186
done
7287
fi
88+
if is_centos_7 "$image"; then
89+
for check_pattern in ${xfail_centos7[@]}; do
90+
if [[ "$plan" =~ $check_pattern ]]; then
91+
xfail="(XFAIL)"
92+
expected_result=2
93+
break
94+
fi
95+
done
96+
# Skip too complicated situations altogether
97+
unset complicated
98+
for check_pattern in ${complicated_centos7[@]}; do
99+
if [[ "$plan" =~ $check_pattern ]]; then
100+
complicated=1
101+
break
102+
fi
103+
done
104+
if [[ -n "$complicated" ]]; then
105+
continue
106+
fi
107+
fi
73108
rlPhaseStartTest "$phase_prefix $plan $xfail"
74109
rlRun "tmt run $extra_env -i $run --scratch -vvv --all \
75110
plan --name '^$plan$' \

0 commit comments

Comments
 (0)