diff --git a/tests/xbps/libxbps/shell/update_hold.sh b/tests/xbps/libxbps/shell/update_hold.sh index 02a635db..9550082b 100644 --- a/tests/xbps/libxbps/shell/update_hold.sh +++ b/tests/xbps/libxbps/shell/update_hold.sh @@ -37,6 +37,76 @@ update_hold_body() { } +atf_test_case update_pkg_with_held_dep + +update_pkg_with_held_dep() { + atf_set "descr" "xbps-install(8): update packages with held dependency (issue #143)" +} + +update_pkg_with_held_body() { + atf_expect_death "Known bug: see https://github.com/voidlinux/xbps/issues/143" + mkdir -p some_repo pkginst pkgheld pkgdep-21_1 pkgdep-22_1 + touch pkginst/pi00 + touch pkgheld/ph00 + touch pkgdep-21_1/pd21 + touch pkgdep-22_1/pd22 + + cd some_repo + + xbps-create \ + -A noarch \ + -n "pkgdep-21_1" \ + -s "pkgdep" \ + ../pkgdep-21_1 + + atf_check_equal $? 0 + + xbps-create \ + -A noarch \ + -n "pkgdep-22_1" \ + -s "pkgdep" \ + ../pkgdep-22_1 + + atf_check_equal $? 0 + + xbps-create \ + -A noarch \ + -n "pkginst-1.0_1" \ + -s "pkginst" \ + -D "pkgdep-22_1" \ + ../pkginst + + atf_check_equal $? 0 + + xbps-create \ + -A noarch \ + -n "pkgheld-1.17.4_2" \ + -s "pkgheld" \ + -P "pkgdep-21_1" \ + ../pkgheld + + atf_check_equal $? 0 + + #ls -laR ../ + + xbps-rindex -d -a pkgheld*.xbps + atf_check_equal $? 0 + + xbps-install -r root -C empty.conf --repository=$PWD -y pkgheld + atf_check_equal $? 0 + xbps-pkgdb -r root -m hold pkgheld + + xbps-rindex -d -a pkginst*.xbps + atf_check_equal $? 0 + + xbps-rindex -d -a pkgdep-22*.xbps + atf_check_equal $? 0 + + xbps-install -r root -C empty.conf --repository=$PWD -d -y pkginst >&2 + atf_check_equal $? 0 +} + atf_init_test_cases() { atf_add_test_case update_hold + atf_add_test_case update_pkg_with_held_dep } diff --git a/tests/xbps/xbps-install/behaviour_tests.sh b/tests/xbps/xbps-install/behaviour_tests.sh old mode 100755 new mode 100644 index 1c6755ab..02f39ecf --- a/tests/xbps/xbps-install/behaviour_tests.sh +++ b/tests/xbps/xbps-install/behaviour_tests.sh @@ -32,76 +32,6 @@ install_existent_body() { atf_check_equal $? 0 } -atf_test_case update_pkg_on_hold - -update_pkg_on_hold_head() { - atf_set "descr" "xbps-install(8): update packages on hold (issue #143)" -} - -update_pkg_on_hold_body() { - atf_expect_death "Known bug: see https://github.com/voidlinux/xbps/issues/143" - mkdir -p some_repo pkginst pkgheld pkgdep-21_1 pkgdep-22_1 - touch pkginst/pi00 - touch pkgheld/ph00 - touch pkgdep-21_1/pd21 - touch pkgdep-22_1/pd22 - - cd some_repo - - xbps-create \ - -A noarch \ - -n "pkgdep-21_1" \ - -s "pkgdep" \ - ../pkgdep-21_1 - - atf_check_equal $? 0 - - xbps-create \ - -A noarch \ - -n "pkgdep-22_1" \ - -s "pkgdep" \ - ../pkgdep-22_1 - - atf_check_equal $? 0 - - xbps-create \ - -A noarch \ - -n "pkginst-1.0_1" \ - -s "pkginst" \ - -D "pkgdep-22_1" \ - ../pkginst - - atf_check_equal $? 0 - - xbps-create \ - -A noarch \ - -n "pkgheld-1.17.4_2" \ - -s "pkgheld" \ - -P "pkgdep-21_1" \ - ../pkgheld - - atf_check_equal $? 0 - - #ls -laR ../ - - xbps-rindex -d -a pkgheld*.xbps - atf_check_equal $? 0 - - xbps-install -r root -C empty.conf --repository=$PWD -y pkgheld - atf_check_equal $? 0 - xbps-pkgdb -r root -m hold pkgheld - - xbps-rindex -d -a pkginst*.xbps - atf_check_equal $? 0 - - xbps-rindex -d -a pkgdep-22*.xbps - atf_check_equal $? 0 - - xbps-install -r root -C empty.conf --repository=$PWD -d -y pkginst >&2 - atf_check_equal $? 0 -} - atf_init_test_cases() { atf_add_test_case install_existent - atf_add_test_case update_pkg_on_hold }