aboutsummaryrefslogtreecommitdiff
path: root/tests/pkg-checkout.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-09-30 21:39:50 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-10-01 17:00:18 +0300
commit6b610aea9096ce64ae769708a53041653333e155 (patch)
tree624200a7766ea33bfe1cf0ba18319776e5fd1d5b /tests/pkg-checkout.testscript
parent990ef03a7b006874ec66e26cd96fca3fdda95b12 (diff)
Add --output-{root,purge} options to pkg-checkout
Diffstat (limited to 'tests/pkg-checkout.testscript')
-rw-r--r--tests/pkg-checkout.testscript55
1 files changed, 46 insertions, 9 deletions
diff --git a/tests/pkg-checkout.testscript b/tests/pkg-checkout.testscript
index 9fc1e64..8f3ff92 100644
--- a/tests/pkg-checkout.testscript
+++ b/tests/pkg-checkout.testscript
@@ -19,7 +19,6 @@ posix = ($cxx.target.class != 'windows')
#
$git_extract $src/git/libbar.tar
$git_extract $src/git/style-basic0.tar &$out_git/state0/***
- $git_extract $src/git/style-basic1.tar &$out_git/state1/***
if $posix
$git_extract $src/git/style.tar
@@ -96,15 +95,8 @@ else
: replacement
:
{
- # @@ Reduce to a single repository when multiple revisions can be specified
- # in the repository URL fragment.
- #
- rep0 = "$rep_git/state0";
- rep1 = "$rep_git/state1";
-
$clone_root_cfg;
- $rep_add "$rep0/style-basic.git#master";
- $rep_add "$rep1/style-basic.git#stable";
+ $rep_add "$rep/style-basic.git#master,stable";
$rep_fetch;
$pkg_status style-basic | \
@@ -216,4 +208,49 @@ else
EOE
end
}
+
+ : output-root
+ :
+ {
+ : no-purge
+ :
+ {
+ $clone_root_cfg;
+ $rep_add "$rep/libbar.git#master";
+ $rep_fetch;
+
+ $* --output-root $~ libmbar/1.0.0 &libmbar-1.0.0/*** 2>>~%EOE%;
+ checking out libmbar/1.0.0
+ %.+
+ distributing libmbar/1.0.0
+ checked out libmbar/1.0.0
+ EOE
+
+ test -f libmbar-1.0.0/manifest;
+
+ # While at it, test that the package is buildable.
+ #
+ $pkg_build libmbar -d cfg/ --yes 2>!;
+ $pkg_drop libmbar -d cfg/ --yes 2>!
+ }
+
+ : purge
+ :
+ {
+ $clone_root_cfg;
+ $rep_add "$rep/libbar.git#master";
+ $rep_fetch;
+
+ $* --output-root $~ libmbar/1.0.0 --output-purge 2>>~%EOE%;
+ checking out libmbar/1.0.0
+ %.+
+ distributing libmbar/1.0.0
+ checked out libmbar/1.0.0
+ EOE
+
+ test -f libmbar-1.0.0/manifest;
+
+ $pkg_purge libmbar
+ }
+ }
}