diff options
Diffstat (limited to 'tests/pkg-system.testscript')
-rw-r--r-- | tests/pkg-system.testscript | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/tests/pkg-system.testscript b/tests/pkg-system.testscript index 26d6893..11ed1cc 100644 --- a/tests/pkg-system.testscript +++ b/tests/pkg-system.testscript @@ -52,10 +52,9 @@ rep_remove += -d cfg 2>! { $clone_cfg; - $pkg_build 'sys:libbar' 2>>/EOE != 0; - error: unknown package libbar - info: configuration cfg/ has no repositories - info: use 'bpkg rep-add' to add a repository + $pkg_build 'sys:libbar' 2>>EOE != 0; + error: unknown package sys:libbar + info: consider specifying sys:libbar/* EOE $pkg_build 'sys:libbar/1' 2>>EOE; @@ -90,28 +89,28 @@ rep_remove += -d cfg 2>! { $clone_cfg; - $pkg_build 'sys:libbar' '?sys:libbar' 2>>EOE != 0; + $pkg_build 'sys:libbar' 'sys:libbar/1.0.0' 2>>EOE != 0; error: duplicate package libbar info: first mentioned as sys:libbar - info: second mentioned as ?sys:libbar + info: second mentioned as sys:libbar/1.0.0 EOE - $pkg_build '?sys:libbar' 'sys:libbar' 2>>EOE != 0; + $pkg_build '?sys:libbar' '?sys:libbar/1.0.0' 2>>EOE != 0; error: duplicate package libbar info: first mentioned as ?sys:libbar - info: second mentioned as sys:libbar + info: second mentioned as ?sys:libbar/1.0.0 EOE - $pkg_build '?sys:libbar' libbar 2>>EOE != 0; + $pkg_build 'sys:libbar' libbar 2>>EOE != 0; error: duplicate package libbar - info: first mentioned as ?sys:libbar + info: first mentioned as sys:libbar info: second mentioned as libbar EOE - $pkg_build libbar '?sys:libbar' 2>>EOE != 0; + $pkg_build ?libbar '?sys:libbar' +{ --config-id 0 } 2>>EOE != 0; error: duplicate package libbar - info: first mentioned as libbar - info: second mentioned as ?sys:libbar + info: first mentioned as ?libbar + info: second mentioned as ?sys:libbar +{ --config-id 0 } EOE $pkg_build 'sys:libbar' libbar 2>>EOE != 0; @@ -711,12 +710,12 @@ rep_remove += -d cfg 2>! # $pkg_build foo 'sys:libbar/1' 2>>EOE != 0; error: unable to satisfy constraints on package libbar - info: foo depends on (libbar >= 2) info: command line depends on (libbar == 1) - info: available sys:libbar/2 + info: foo/2 depends on (libbar >= 2) info: available sys:libbar/1 + info: available sys:libbar/2 + info: while satisfying foo/2 info: explicitly specify libbar version to manually satisfy both constraints - info: while satisfying foo/2 EOE $pkg_drop libbar @@ -850,10 +849,6 @@ rep_remove += -d cfg 2>! info: while satisfying foo/2 EOE - $pkg_build 'sys:libbar' 2>>EOE != 0; - error: unknown package libbar - EOE - $pkg_build foo 'sys:libbar/1' 2>>EOE != 0; error: dependency libbar >= 2 of package foo is not available in source info: sys:libbar/1 does not satisfy the constrains @@ -872,11 +867,26 @@ rep_remove += -d cfg 2>! $pkg_status libbar >'libbar unknown' } + : find-all + : + : Test that sys:libbar can be built to hold even if its stub package is not + : available from the configured repository but only from its prerequisite + : repository. + : + { + $clone_cfg; + + $pkg_build 'sys:libbar' 2>>EOE; + configured sys:libbar/* + EOE + + $pkg_status libbar >'!libbar configured,system !*' + } + : syslibbar1-foo-syslibbar-drop-foo : - : The overall plan is to build foo ?sys:libbar/2, fail to build sys:libbar - : and foo 'sys:libbar', but succeed to build foo ?sys:libbar/3 and foo - : ?sys:libbar. + : The overall plan is to build foo ?sys:libbar/2, then foo ?sys:libbar/3, + : and then foo ?sys:libbar. : { $clone_cfg; @@ -896,14 +906,6 @@ rep_remove += -d cfg 2>! $pkg_status foo >'!foo configured 2'; $pkg_status libbar >'libbar configured,system !2'; - # Fail as libbar while being selected is still unknown (not present in t3 - # repo). - # - $pkg_build 'sys:libbar' 2>'error: unknown package libbar' != 0; - $pkg_build foo 'sys:libbar' 2>'error: unknown package libbar' != 0; - $pkg_status foo 1>'!foo configured 2'; - $pkg_status libbar 1>'libbar configured,system !2'; - # Build foo and ?sys:libbar/3. # $pkg_build foo '?sys:libbar/3' 2>>~%EOE%; |