tests: another test to verify revdeps with unknown shlib providers.

This commit is contained in:
Juan RP 2015-01-17 06:10:49 +01:00
parent bce27b968e
commit 94e9754fb1

View File

@ -186,10 +186,43 @@ shlib_bump_versioned_body() {
atf_check_equal $? 8
}
atf_test_case shlib_unknown_provider
shlib_unknown_provider_head() {
atf_set "descr" "Tests for pkg updates: pkg update with unknown shlib provider"
}
shlib_unknown_provider_body() {
mkdir -p repo pkg
cd repo
xbps-create -A noarch -n A-1.0_1 -s "A pkg" --shlib-provides "liba-0.so" ../pkg
atf_check_equal $? 0
xbps-create -A noarch -n B-1.0_1 -s "B pkg" --dependencies "A>=0" --shlib-requires "liba-0.so" ../pkg
atf_check_equal $? 0
xbps-rindex -d -a $PWD/*.xbps
atf_check_equal $? 0
cd ..
xbps-install -C empty.conf -r root --repository=$PWD/repo -yvd B
atf_check_equal $? 0
cd repo
xbps-create -A noarch -n A-2.0_1 -s "A pkg" ../pkg
atf_check_equal $? 0
xbps-rindex -d -a $PWD/*.xbps
atf_check_equal $? 0
cd ..
xbps-install -C empty.conf -r root --repository=$PWD/repo -yuvd
# ENOEXEC == unresolved shlibs
atf_check_equal $? 8
}
atf_init_test_cases() {
atf_add_test_case shlib_bump
atf_add_test_case shlib_bump_incomplete_revdep_in_trans
atf_add_test_case shlib_bump_revdep_in_trans
atf_add_test_case shlib_bump_revdep_diff
atf_add_test_case shlib_bump_versioned
atf_add_test_case shlib_unknown_provider
}