diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-02-17 16:04:58 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-02-19 14:28:57 +0300 |
commit | 11dfd8bc4022b6596c2158594f18544a1f7ffa3e (patch) | |
tree | 0b88ccc3b977d43a40fb0937d6d34fedcb05a927 /tests/pkg-status.test | |
parent | 3d4838d3706de2ba0045dc9f99a3dc96398def64 (diff) |
Use root repository as a default complement for git repository
Diffstat (limited to 'tests/pkg-status.test')
-rw-r--r-- | tests/pkg-status.test | 51 |
1 files changed, 47 insertions, 4 deletions
diff --git a/tests/pkg-status.test b/tests/pkg-status.test index 3c00e97..3e27294 100644 --- a/tests/pkg-status.test +++ b/tests/pkg-status.test @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -.include common.test config.test remote.test +.include common.test config.test remote.test remote-git.test # Source repository: # @@ -10,17 +10,25 @@ # |-- extra -> stable (prerequisite) # | |-- libbar-1.1.0+1.tar.gz # | `-- repositories +# | # |-- stable # | |-- libbar-1.0.0.tar.gz # | |-- libfoo-1.0.0.tar.gz # | `-- repositories +# | # |-- testing -> stable (complement), extra (prerequisite) # | |-- libbar-1.0.0+1.tar.gz # | |-- libbar-1.1.0.tar.gz # | `-- repositories -# `-- unstable -> testing (complement) -# |-- libbar-2.0.0.tar.gz -# `-- repositories +# | +# |-- unstable -> testing (complement) +# | |-- libbar-2.0.0.tar.gz +# | `-- repositories +# | +# `-- git +# |-- libbar.git -> style-basic.git (prerequisite) +# |-- style-basic.git +# `-- style.git # Prepare repositories used by tests if running in the local mode. # @@ -31,6 +39,12 @@ cp -r $src/stable $out/stable && $c $out/stable &$out/stable/packages cp -r $src/testing $out/testing && $c $out/testing &$out/testing/packages cp -r $src/unstable $out/unstable && $c $out/unstable &$out/unstable/packages + + # Create git repositories. + # + $git_extract $src/git/style.tar + $git_extract $src/git/libbar.tar + $git_extract $src/git/style-basic.tar &$out_git/state0/*** end pkg_fetch += 2>! @@ -158,3 +172,32 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $* -d ../fetched2 libbar >'fetched 2.0.0; available sys:?' } } + +: git-repos +: +if ($git_supported != true) +{ + # Skip git repository tests. + # +} +else +{ + rep = "$rep_git/state0" + rep_add += -d cfg 2>! + test.cleanups += &cfg/.bpkg/repositories/*/*** + + : complement-cycle + : + : Make sure that we properly handle the root<->style repository dependency + : cycle while searching for the style-basic package, that is an available + : package but not from the user-added repository (or its complement), and so + : is not visible for the status command. Note that the root repository is the + : default complement for git repositories (see rep_fetch() implementation for + : the reasoning). + : + $clone_root_cfg; + $rep_add "$rep/libbar.git#master" && $rep_add "$rep/style.git#master"; + $rep_fetch; + + $* style-basic >'unknown' +} |