New test cases to detect pkgs with dependencies on itself.
This commit is contained in:
parent
96778da60c
commit
c992db2bc0
4
NEWS
4
NEWS
@ -1,8 +1,8 @@
|
|||||||
xbps-0.36 (???):
|
xbps-0.36 (???):
|
||||||
|
|
||||||
* libxbps: the dependency solver is now able to detect and ignore invalid
|
* libxbps: the dependency solver is now able to detect and ignore invalid
|
||||||
dependencies of a package that are depending on itself, if those are
|
dependencies of a package that are depending on itself, either as real
|
||||||
declared as virtual packages.
|
or virtual packages.
|
||||||
|
|
||||||
* xbps-install(8): the -n,--dry-run option does not acquire the pkgdb file lock
|
* xbps-install(8): the -n,--dry-run option does not acquire the pkgdb file lock
|
||||||
anymore, so that any user can use this mode even without write permission to
|
anymore, so that any user can use this mode even without write permission to
|
||||||
|
@ -18,6 +18,7 @@ atf_test_program{name="replace_test"}
|
|||||||
atf_test_program{name="installmode_test"}
|
atf_test_program{name="installmode_test"}
|
||||||
atf_test_program{name="obsoletefiles_test"}
|
atf_test_program{name="obsoletefiles_test"}
|
||||||
atf_test_program{name="scripts_test"}
|
atf_test_program{name="scripts_test"}
|
||||||
|
atf_test_program{name="incorrect_deps_test"}
|
||||||
|
|
||||||
include('find_pkg_orphans/Kyuafile')
|
include('find_pkg_orphans/Kyuafile')
|
||||||
include('pkgdb/Kyuafile')
|
include('pkgdb/Kyuafile')
|
||||||
|
@ -3,7 +3,7 @@ TOPDIR = ../../../..
|
|||||||
|
|
||||||
TESTSHELL = conf_files_test issue6_test issue18_test issue20_test remove_test
|
TESTSHELL = conf_files_test issue6_test issue18_test issue20_test remove_test
|
||||||
TESTSHELL+= replace_test installmode_test obsoletefiles_test
|
TESTSHELL+= replace_test installmode_test obsoletefiles_test
|
||||||
TESTSHELL+= issue31_test scripts_test
|
TESTSHELL+= issue31_test scripts_test incorrect_deps_test
|
||||||
|
|
||||||
include ../Makefile.inc
|
include ../Makefile.inc
|
||||||
include $(TOPDIR)/mk/test.mk
|
include $(TOPDIR)/mk/test.mk
|
||||||
|
49
tests/xbps/libxbps/shell/incorrect_deps_test.sh
Normal file
49
tests/xbps/libxbps/shell/incorrect_deps_test.sh
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env atf-sh
|
||||||
|
#
|
||||||
|
atf_test_case incorrect_dep
|
||||||
|
|
||||||
|
incorrect_dep_head() {
|
||||||
|
atf_set "descr" "Tests for package deps: pkg depends on itself"
|
||||||
|
}
|
||||||
|
|
||||||
|
incorrect_dep_body() {
|
||||||
|
mkdir some_repo
|
||||||
|
mkdir -p pkg_B/usr/bin
|
||||||
|
echo "B-1.0_1" > pkg_B/usr/bin/foo
|
||||||
|
cd some_repo
|
||||||
|
xbps-create -A noarch -n B-1.0_1 -s "B pkg" --dependencies "B>=0" ../pkg_B
|
||||||
|
atf_check_equal $? 0
|
||||||
|
|
||||||
|
xbps-rindex -a *.xbps
|
||||||
|
atf_check_equal $? 0
|
||||||
|
cd ..
|
||||||
|
xbps-install -C empty.conf -r root --repository=$PWD/some_repo -dy B
|
||||||
|
atf_check_equal $? 0
|
||||||
|
}
|
||||||
|
|
||||||
|
atf_test_case incorrect_dep_vpkg
|
||||||
|
|
||||||
|
incorrect_dep_vpkg_body() {
|
||||||
|
mkdir some_repo
|
||||||
|
mkdir -p pkg_A/usr/bin pkg_B/usr/bin
|
||||||
|
echo "A-1.0_1" > pkg_A/usr/bin/foo
|
||||||
|
echo "B-1.0_1" > pkg_B/usr/bin/foo
|
||||||
|
cd some_repo
|
||||||
|
xbps-create -A noarch -n A-10.1.1_1 -s "A pkg" ../pkg_A
|
||||||
|
atf_check_equal $? 0
|
||||||
|
xbps-create -A noarch -n B-1.0_1 -s "B pkg" --dependencies "A>=7.11_1" --provides "A-331.67_1" ../pkg_B
|
||||||
|
atf_check_equal $? 0
|
||||||
|
|
||||||
|
xbps-rindex -a *.xbps
|
||||||
|
atf_check_equal $? 0
|
||||||
|
cd ..
|
||||||
|
xbps-install -C empty.conf -r root --repository=$PWD/some_repo -dy A
|
||||||
|
atf_check_equal $? 0
|
||||||
|
xbps-install -C empty.conf -r root --repository=$PWD/some_repo -dy B
|
||||||
|
atf_check_equal $? 0
|
||||||
|
}
|
||||||
|
|
||||||
|
atf_init_test_cases() {
|
||||||
|
atf_add_test_case incorrect_dep
|
||||||
|
atf_add_test_case incorrect_dep_vpkg
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user