Skip to content

Commit 34e46af

Browse files
committed
tests: cleanup xbps-rindex add regression test
1 parent 8ca5cbd commit 34e46af

File tree

1 file changed

+29
-24
lines changed

1 file changed

+29
-24
lines changed

tests/xbps/xbps-rindex/add_test.sh

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -110,47 +110,52 @@ stage_resolve_bug_body() {
110110
cd some_repo
111111

112112
# first add the provider and the requirer to the repo
113-
xbps-create -A noarch -n provider-1.0_1 -s "foo pkg" --shlib-provides "libfoo.so.1 libbar.so.1" ../provider
114-
atf_check_equal $? 0
115-
xbps-create -A noarch -n require-1.0_1 -s "foo pkg" --shlib-requires "libfoo.so.1" ../requirer
116-
atf_check_equal $? 0
117-
xbps-create -A noarch -n stage-trigger-1.0_1 -s "foo pkg" --shlib-requires "libbar.so.1" ../stage-trigger
118-
atf_check_equal $? 0
119-
xbps-rindex -d -a $PWD/*.xbps
120-
atf_check_equal $? 0
113+
atf_check -o ignore -- xbps-create -A noarch -n provider-1.0_1 -s "foo pkg" --shlib-provides "libfoo.so.1 libbar.so.1" ../provider
114+
atf_check -o ignore -- xbps-create -A noarch -n require-1.0_1 -s "foo pkg" --shlib-requires "libfoo.so.1" ../requirer
115+
atf_check -o ignore -- xbps-create -A noarch -n stage-trigger-1.0_1 -s "foo pkg" --shlib-requires "libbar.so.1" ../stage-trigger
116+
atf_check \
117+
-e ignore \
118+
-o match:"some_repo: index: added \`provider-1\.0_1' \(noarch\)\." \
119+
-o match:"some_repo: index: added \`require-1\.0_1' \(noarch\)\." \
120+
-o match:"some_repo: index: added \`stage-trigger-1\.0_1' \(noarch\)\." \
121+
-- xbps-rindex -a $PWD/*.xbps
121122

122123
# then add libprovider that also provides the library
123-
xbps-create -A noarch -n libprovider-1.0_2 -s "foo pkg" --shlib-provides "libfoo.so.1" ../libprovider
124-
atf_check_equal $? 0
125-
xbps-rindex -d -a $PWD/*.xbps
126-
atf_check_equal $? 0
124+
atf_check -o ignore -- xbps-create -A noarch -n libprovider-1.0_2 -s "foo pkg" --shlib-provides "libfoo.so.1" ../libprovider
125+
atf_check \
126+
-e ignore \
127+
-o match:"some_repo: index: added \`libprovider-1\.0_2' \(noarch\)\." \
128+
-- xbps-rindex -a $PWD/*.xbps
127129
atf_check -o inline:" 4 $PWD (RSA unsigned)\n" -- \
128130
xbps-query -r ../root -i --repository=$PWD -L
129131

130132
# trigger staging
131-
xbps-create -A noarch -n provider-1.0_2 -s "foo pkg" --shlib-provides "libfoo.so.1" ../provider
132-
atf_check_equal $? 0
133-
xbps-rindex -d -a $PWD/*.xbps
134-
atf_check_equal $? 0
133+
atf_check -o ignore -- xbps-create -A noarch -n provider-1.0_2 -s "foo pkg" --shlib-provides "libfoo.so.1" ../provider
134+
atf_check \
135+
-e ignore \
136+
-o match:"some_repo: stage: added \`provider-1\.0_2' \(noarch\)\." \
137+
-- xbps-rindex -a $PWD/*.xbps
135138
atf_check -o inline:" 4 $PWD (Staged) (RSA unsigned)\n" -- \
136139
xbps-query -r ../root -i --repository=$PWD -L
137140

138141
# then add a new provider not containing the provides field. This resulted in
139142
# a stage state despites the library is resolved through libprovides
140-
xbps-create -A noarch -n provider-1.0_3 -s "foo pkg" ../provider
141-
atf_check_equal $? 0
142-
xbps-rindex -d -a $PWD/*.xbps
143-
atf_check_equal $? 0
143+
atf_check -o ignore -- xbps-create -A noarch -n provider-1.0_3 -s "foo pkg" ../provider
144+
atf_check \
145+
-e ignore \
146+
-o match:"some_repo: stage: added \`provider-1\.0_3' \(noarch\)\." \
147+
-- xbps-rindex -a $PWD/*.xbps
144148
atf_check -o inline:" 4 $PWD (Staged) (RSA unsigned)\n" -- \
145149
xbps-query -r ../root -i --repository=$PWD -L
146150

147151
# resolve staging
148152
# the actual bug appeared here: libfoo.so.1 is still provided by libprovider, but
149153
# xbps-rindex fails to register that.
150-
xbps-create -A noarch -n stage-trigger-1.0_2 -s "foo pkg" ../stage-trigger
151-
atf_check_equal $? 0
152-
xbps-rindex -d -a $PWD/*.xbps
153-
atf_check_equal $? 0
154+
atf_check -o ignore -- xbps-create -A noarch -n stage-trigger-1.0_2 -s "foo pkg" ../stage-trigger
155+
atf_check \
156+
-e ignore \
157+
-o match:"some_repo: index: added \`stage-trigger-1\.0_2' \(noarch\)\." \
158+
-- xbps-rindex -a $PWD/*.xbps
154159
atf_check -o inline:" 4 $PWD (RSA unsigned)\n" -- \
155160
xbps-query -r ../root -i --repository=$PWD -L
156161
}

0 commit comments

Comments
 (0)