Skip to content

Commit 0387711

Browse files
committed
tests: add unpack_dep_missing test
a package that is pulled into the transaction to be configured doesn't need to be found in the repository pool.
1 parent c5112f4 commit 0387711

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/xbps/xbps-install/behaviour_tests.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,29 @@ unpacked_dep_body() {
108108
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -un B
109109
}
110110

111+
atf_test_case unpacked_dep_missing
112+
113+
unpacked_dep_missing_head() {
114+
atf_set "descr" "xbps-install(1): unpacked dependency (missing)"
115+
}
116+
117+
unpacked_dep_missing_body() {
118+
mkdir -p some_repo other_repo pkg_A pkg_B
119+
120+
cd some_repo
121+
atf_check -o ignore -- xbps-create -A noarch -n A-1.0_1 -s "A pkg" ../pkg_A
122+
atf_check -o ignore -- xbps-rindex -a $PWD/*.xbps
123+
cd ../other_repo
124+
atf_check -o ignore -- xbps-create -A noarch -n B-1.0_1 -s "B pkg" -D "A>=0" ../pkg_B
125+
atf_check -o ignore -- xbps-rindex -a $PWD/*.xbps
126+
cd ..
127+
128+
atf_check -o ignore -- xbps-install -r root -C empty.conf --repository=$PWD/some_repo -yU A
129+
atf_check -o inline:"unpacked\n" -- xbps-query -r root -p state A
130+
atf_check -o match:"A-1.0_1 configure" -o match:"B-1.0_1 install" -- \
131+
xbps-install -r root -C empty.conf --repository=$PWD/other_repo -un B
132+
}
133+
111134
atf_test_case reinstall_unpacked_unpack_only
112135

113136
reinstall_unpacked_unpack_only_head() {
@@ -234,6 +257,7 @@ atf_init_test_cases() {
234257
atf_add_test_case update_existent
235258
atf_add_test_case update_unpacked
236259
atf_add_test_case unpacked_dep
260+
atf_add_test_case unpacked_dep_missing
237261
atf_add_test_case reinstall_unpacked_unpack_only
238262
atf_add_test_case reproducible
239263
atf_add_test_case install_msg

0 commit comments

Comments
 (0)