From 1f1f7e31e7592ba926aa510ab1a80c321bd11509 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 5 Jan 2020 09:26:38 +0100 Subject: [PATCH] tests: improve update_xbps_with_indirect_revdeps test case. --- .../xbps/libxbps/shell/update_itself_test.sh | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/tests/xbps/libxbps/shell/update_itself_test.sh b/tests/xbps/libxbps/shell/update_itself_test.sh index d3efc124..1045ac3a 100644 --- a/tests/xbps/libxbps/shell/update_itself_test.sh +++ b/tests/xbps/libxbps/shell/update_itself_test.sh @@ -175,13 +175,13 @@ update_xbps_with_indirect_revdeps_body() { mkdir -p repo pkg cd repo - xbps-create -A noarch -n xbps-1.0_1 -s "xbps pkg" --dependencies "libcrypto>=0 cacerts>=0" ../pkg + xbps-create -A noarch -n xbps-1.0_1 -s "xbps pkg" --dependencies "libcrypto-1.0_1 cacerts>=0" ../pkg atf_check_equal $? 0 xbps-create -A noarch -n libcrypto-1.0_1 -s "libcrypto pkg" ../pkg atf_check_equal $? 0 xbps-create -A noarch -n libressl-1.0_1 -s "libressl pkg" --dependencies "libcrypto-1.0_1" ../pkg atf_check_equal $? 0 - xbps-create -A noarch -n cacerts-1.0_1 -s "cacerts pkg" --dependencies "libressl-1.0_1" ../pkg + xbps-create -A noarch -n cacerts-1.0_1 -s "cacerts pkg" --dependencies "libressl>=0" ../pkg atf_check_equal $? 0 xbps-rindex -d -a $PWD/*.xbps atf_check_equal $? 0 @@ -190,8 +190,20 @@ update_xbps_with_indirect_revdeps_body() { xbps-install -r root --repository=$PWD/repo -yd xbps-1.0_1 atf_check_equal $? 0 + out=$(xbps-query -r root -p pkgver xbps) + atf_check_equal "$out" "xbps-1.0_1" + + out=$(xbps-query -r root -p pkgver libcrypto) + atf_check_equal "$out" "libcrypto-1.0_1" + + out=$(xbps-query -r root -p pkgver libressl) + atf_check_equal "$out" "libressl-1.0_1" + + out=$(xbps-query -r root -p pkgver cacerts) + atf_check_equal "$out" "cacerts-1.0_1" + cd repo - xbps-create -A noarch -n xbps-1.1_1 -s "xbps pkg" --dependencies "libcrypto>=1.1" ../pkg + xbps-create -A noarch -n xbps-1.1_1 -s "xbps pkg" --dependencies "libcrypto-1.1_1 ca-certs>=0" ../pkg atf_check_equal $? 0 xbps-create -A noarch -n libcrypto-1.1_1 -s "libcrypto pkg" ../pkg atf_check_equal $? 0 @@ -215,6 +227,21 @@ update_xbps_with_indirect_revdeps_body() { out=$(xbps-query -r root -p pkgver cacerts) atf_check_equal "$out" "cacerts-1.0_1" + + xbps-install -r root --repository=$PWD/repo -yu + atf_check_equal $? 0 + + out=$(xbps-query -r root -p pkgver xbps) + atf_check_equal "$out" "xbps-1.1_1" + + out=$(xbps-query -r root -p pkgver libcrypto) + atf_check_equal "$out" "libcrypto-1.1_1" + + out=$(xbps-query -r root -p pkgver libressl) + atf_check_equal "$out" "libressl-1.1_1" + + out=$(xbps-query -r root -p pkgver cacerts) + atf_check_equal "$out" "cacerts-1.0_1" } atf_init_test_cases() {