From bb4ebf81523df153ae57ce85f21e58250bc2f8bd Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 21 Mar 2015 11:48:26 +0100 Subject: [PATCH] tests: add test case when installing a pkg with unresolved circular deps. --- tests/xbps/libxbps/shell/cyclic_deps.sh | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/xbps/libxbps/shell/cyclic_deps.sh b/tests/xbps/libxbps/shell/cyclic_deps.sh index cb0562e4..0e29cb48 100644 --- a/tests/xbps/libxbps/shell/cyclic_deps.sh +++ b/tests/xbps/libxbps/shell/cyclic_deps.sh @@ -29,6 +29,32 @@ cyclic_dep_vpkg_body() { atf_check_equal $? 0 } +atf_test_case cyclic_dep_vpkg2 + +cyclic_dep_vpkg2_head() { + atf_set "descr" "Tests for cyclic deps: unresolved circular dependencies" +} + +cyclic_dep_vpkg2_body() { + mkdir some_repo + mkdir -p pkg_{A,B,C,D}/usr/bin + cd some_repo + xbps-create -A noarch -n A-1.0_1 -s "A pkg" --provides "libGL-7.11_1" --dependencies "xserver-abi-video<20" ../pkg_A + atf_check_equal $? 0 + xbps-create -A noarch -n B-1.0_1 -s "B pkg" --dependencies "libGL>=7.11" --provides "xserver-abi-video-19_1" ../pkg_B + atf_check_equal $? 0 + xbps-create -A noarch -n C-1.0_1 -s "C pkg" --dependencies "libGL>=7.11" ../pkg_C + atf_check_equal $? 0 + + xbps-rindex -d -a $PWD/*.xbps + atf_check_equal $? 0 + cd .. + + xbps-install -r root --repository=$PWD/some_repo -dy C + atf_check_equal $? 40 +} + atf_init_test_cases() { atf_add_test_case cyclic_dep_vpkg + atf_add_test_case cyclic_dep_vpkg2 }