From 94e9754fb11adea0cadd9bda7ffdd2de417f062a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 17 Jan 2015 06:10:49 +0100 Subject: [PATCH] tests: another test to verify revdeps with unknown shlib providers. --- tests/xbps/libxbps/shell/update_shlibs.sh | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/xbps/libxbps/shell/update_shlibs.sh b/tests/xbps/libxbps/shell/update_shlibs.sh index 13fdadb7..cc667cd1 100644 --- a/tests/xbps/libxbps/shell/update_shlibs.sh +++ b/tests/xbps/libxbps/shell/update_shlibs.sh @@ -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 }