Skip to content

Commit 40b0a05

Browse files
committed
tests: cleanup staging test
1 parent a051794 commit 40b0a05

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

tests/xbps/xbps-rindex/add_test.sh

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,39 +60,38 @@ stage_head() {
6060
stage_body() {
6161
mkdir -p some_repo pkg_A pkg_B
6262
touch pkg_A/file00 pkg_B/file01
63+
6364
cd some_repo
64-
xbps-create -A noarch -n foo-1.0_1 -s "foo pkg" --shlib-provides "libfoo.so.1" ../pkg_A
65-
atf_check_equal $? 0
66-
xbps-rindex -d -a $PWD/*.xbps
67-
atf_check_equal $? 0
65+
atf_check -o ignore -- xbps-create -A noarch -n foo-1.0_1 -s "foo pkg" --shlib-provides "libfoo.so.1" ../pkg_A
66+
67+
atf_check -e ignore -o match:"index: added \`foo-1.0_1'" -- \
68+
xbps-rindex -d -a $PWD/*.xbps
69+
6870
atf_check -o inline:" 1 $PWD (RSA unsigned)\n" -- \
6971
xbps-query -r ../root -i --repository=$PWD -L
7072

71-
xbps-create -A noarch -n foo-1.1_1 -s "foo pkg" --shlib-provides "libfoo.so.2" ../pkg_A
72-
atf_check_equal $? 0
73-
xbps-rindex -d -a $PWD/*.xbps
74-
atf_check_equal $? 0
73+
atf_check -o ignore -- xbps-create -A noarch -n foo-1.1_1 -s "foo pkg" --shlib-provides "libfoo.so.2" ../pkg_A
74+
atf_check -e ignore -o match:"index: added \`foo-1.1_1'" -- valgrind xbps-rindex -d -a $PWD/*.xbps
7575
atf_check -o inline:" 1 $PWD (RSA unsigned)\n" -- \
7676
xbps-query -r ../root -i --repository=$PWD -L
7777

78-
xbps-create -A noarch -n bar-1.0_1 -s "foo pkg" --shlib-requires "libfoo.so.2" ../pkg_B
79-
atf_check_equal $? 0
80-
xbps-rindex -d -a $PWD/*.xbps
81-
atf_check_equal $? 0
78+
atf_check -o ignore -- xbps-create -A noarch -n bar-1.0_1 -s "foo pkg" --shlib-requires "libfoo.so.2" ../pkg_B
79+
atf_check -e ignore -o match:"index: added \`bar-1.0_1'" -- \
80+
xbps-rindex -d -a $PWD/*.xbps
8281
atf_check -o inline:" 2 $PWD (RSA unsigned)\n" -- \
8382
xbps-query -r ../root -i --repository=$PWD -L
8483

85-
xbps-create -A noarch -n foo-1.2_1 -s "foo pkg" --shlib-provides "libfoo.so.3" ../pkg_A
86-
atf_check_equal $? 0
87-
xbps-rindex -d -a $PWD/*.xbps
88-
atf_check_equal $? 0
84+
atf_check -o ignore -- xbps-create -A noarch -n foo-1.2_1 -s "foo pkg" --shlib-provides "libfoo.so.3" ../pkg_A
85+
atf_check -e ignore -o not-match:"index: added \`foo-1.2_1'" -- \
86+
xbps-rindex -d -a $PWD/*.xbps
8987
atf_check -o inline:" 2 $PWD (Staged) (RSA unsigned)\n" -- \
9088
xbps-query -r ../root -i --repository=$PWD -L
9189

92-
xbps-create -A noarch -n bar-1.1_1 -s "foo pkg" --shlib-requires "libfoo.so.3" ../pkg_A
93-
atf_check_equal $? 0
94-
xbps-rindex -d -a $PWD/*.xbps
95-
atf_check_equal $? 0
90+
atf_check -o ignore -- xbps-create -A noarch -n bar-1.1_1 -s "foo pkg" --shlib-requires "libfoo.so.3" ../pkg_A
91+
atf_check -e ignore \
92+
-o match:"added \`bar-1.1_1'" \
93+
-o match:"added \`foo-1.2_1'" \
94+
-- xbps-rindex -d -a $PWD/*.xbps
9695
atf_check -o inline:" 2 $PWD (RSA unsigned)\n" -- \
9796
xbps-query -r ../root -i --repository=$PWD -L
9897
}

0 commit comments

Comments
 (0)