From 2b40d8ad5473ec438d4bf6e48f162e0cc65e2a17 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 1 Nov 2013 18:47:23 +0100 Subject: [PATCH] issue18_test: use atf_check_equal() instead and cleanup stuff at the end. --- tests/libxbps/issue18/issue18_test.sh | 30 ++++++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/tests/libxbps/issue18/issue18_test.sh b/tests/libxbps/issue18/issue18_test.sh index 7a4d9275..709c2f90 100755 --- a/tests/libxbps/issue18/issue18_test.sh +++ b/tests/libxbps/issue18/issue18_test.sh @@ -16,15 +16,29 @@ issue18_head() { issue18_body() { mkdir pkg_A pkg_B - atf_check 'xbps-create -A noarch -n A-0.1_1 -s "pkg A" pkg_A' 0 - atf_check 'xbps-create -A noarch -n B-0.1_1 -s "pkg B" pkg_B' 0 - atf_check 'xbps-rindex -a *.xbps' 0 - atf_check 'xbps-install -r rootdir --repository=$PWD -y A B' 0 + xbps-create -A noarch -n A-0.1_1 -s "pkg A" pkg_A + atf_check_equal $? 0 + xbps-create -A noarch -n B-0.1_1 -s "pkg B" pkg_B + atf_check_equal $? 0 + xbps-rindex -a *.xbps + atf_check_equal $? 0 + xbps-install -r rootdir --repository=$PWD -y A B + atf_check_equal $? 0 - atf_check 'xbps-create -A noarch -n A-0.2_1 -s "pkg A" --conflicts "B<0.1_2" pkg_A' 0 - atf_check 'xbps-create -A noarch -n B-0.1_2 -s "pkg B" pkg_B' 0 - atf_check 'xbps-rindex -a *.xbps' 0 - atf_check 'xbps-install -r rootdir --repository=$PWD -yu' 0 + xbps-create -A noarch -n A-0.2_1 -s "pkg A" --conflicts "B<0.1_2" pkg_A + atf_check_equal $? 0 + xbps-create -A noarch -n B-0.1_2 -s "pkg B" pkg_B + atf_check_equal $? 0 + xbps-rindex -a *.xbps + atf_check_equal $? 0 + xbps-install -r rootdir --repository=$PWD -yu + atf_check_equal $? 0 +} + +issue18_cleanup() { + rm -f *.xbps *-repodata + rm -rf rootdir + rmdir pkg_A pkg_B } atf_init_test_cases() {