tests: move and rename on hold test to the correct file.

This commit is contained in:
Juan RP 2016-02-05 11:14:18 +01:00
parent e33f6354c3
commit d211825a18
2 changed files with 70 additions and 70 deletions

View File

@ -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
}

70
tests/xbps/xbps-install/behaviour_tests.sh Executable file → Normal file
View File

@ -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
}