aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-03-01 18:33:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-03-02 20:04:26 +0300
commit1374560d558f4cab72f66b3d851e2a052f59998d (patch)
treec12564709e52e17699fe9932eb2b07b07189a5c0 /tests
parent780290277a51853b2e515b16898ca0fcfa1e9e71 (diff)
Update pkg-build
Diffstat (limited to 'tests')
-rw-r--r--tests/common/satisfy/t4d/repositories1
-rw-r--r--tests/pkg-build.test92
-rw-r--r--tests/pkg-drop.test6
3 files changed, 95 insertions, 4 deletions
diff --git a/tests/common/satisfy/t4d/repositories b/tests/common/satisfy/t4d/repositories
index f0e1983..6277925 100644
--- a/tests/common/satisfy/t4d/repositories
+++ b/tests/common/satisfy/t4d/repositories
@@ -1,3 +1,4 @@
: 1
location: ../t4c
+role: complement
:
diff --git a/tests/pkg-build.test b/tests/pkg-build.test
index 0c9180a..2b54d12 100644
--- a/tests/pkg-build.test
+++ b/tests/pkg-build.test
@@ -48,7 +48,7 @@
# | |-- libfoo-1.0.0.tar.gz
# | `-- repositories
# |
-# |-- t4d -> t4c (prerequisite)
+# |-- t4d -> t4c (complement)
# | |-- libbiz-1.0.0.tar.gz -> libfox, libfoo, libbaz
# | |-- libfox-1.0.0.tar.gz
# | `-- repositories
@@ -1305,6 +1305,96 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$pkg_purge libfoo 2>'purged libfoo/1.0.0'
}
+: repository-location
+:
+{
+ test.arguments += --yes --auth all --trust-yes
+
+ : all-packages
+ :
+ {
+ $clone_root_cfg;
+
+ $* "@$rep/t4d" 2>>~%EOE%;
+ %.+
+ %info: .+libfox-1.0.0.+ is up to date%
+ %info: .+libbiz-1.0.0.+ is up to date%
+ updated libfox/1.0.0
+ updated libbiz/1.0.0
+ EOE
+
+ $pkg_disfigure libbiz 2>'disfigured libbiz/1.0.0';
+ $pkg_purge libbiz 2>'purged libbiz/1.0.0';
+
+ $pkg_disfigure libfox 2>'disfigured libfox/1.0.0';
+ $pkg_purge libfox 2>'purged libfox/1.0.0';
+
+ $pkg_disfigure libbaz 2>'disfigured libbaz/1.1.0';
+ $pkg_purge libbaz 2>'purged libbaz/1.1.0';
+
+ $pkg_disfigure libbar 2>'disfigured libbar/1.1.0';
+ $pkg_purge libbar 2>'purged libbar/1.1.0';
+
+ $pkg_disfigure libfoo 2>'disfigured libfoo/1.1.0';
+ $pkg_purge libfoo 2>'purged libfoo/1.1.0'
+ }
+
+ : multiple-packages
+ :
+ {
+ $clone_root_cfg;
+
+ $* "libfox,libbiz/1.0.0@$rep/t4d" 2>>~%EOE%;
+ %.+
+ %info: .+libfox-1.0.0.+ is up to date%
+ %info: .+libbiz-1.0.0.+ is up to date%
+ updated libfox/1.0.0
+ updated libbiz/1.0.0
+ EOE
+
+ $pkg_disfigure libbiz 2>'disfigured libbiz/1.0.0';
+ $pkg_purge libbiz 2>'purged libbiz/1.0.0';
+
+ $pkg_disfigure libfox 2>'disfigured libfox/1.0.0';
+ $pkg_purge libfox 2>'purged libfox/1.0.0';
+
+ $pkg_disfigure libbaz 2>'disfigured libbaz/1.1.0';
+ $pkg_purge libbaz 2>'purged libbaz/1.1.0';
+
+ $pkg_disfigure libbar 2>'disfigured libbar/1.1.0';
+ $pkg_purge libbar 2>'purged libbar/1.1.0';
+
+ $pkg_disfigure libfoo 2>'disfigured libfoo/1.1.0';
+ $pkg_purge libfoo 2>'purged libfoo/1.1.0'
+ }
+
+ : package-in-complement
+ :
+ {
+ $clone_root_cfg;
+
+ $* "libfoo@$rep/t4d" 2>>~%EOE%;
+ %.+
+ %info: .+libfoo-1.0.0.+ is up to date%
+ updated libfoo/1.0.0
+ EOE
+
+ $pkg_disfigure libfoo 2>'disfigured libfoo/1.0.0';
+ $pkg_purge libfoo 2>'purged libfoo/1.0.0'
+ }
+
+ : non-existent-package
+ :
+ {
+ $clone_root_cfg;
+
+ $* "libbar@$rep/t4d" 2>>~%EOE% != 0
+ %.+
+ error: package libbar is not found in bpkg:build2.org/pkg-build/t4d nor its complements
+ EOE
+ }
+}
+
: git-repos
:
if ($git_supported != true)
diff --git a/tests/pkg-drop.test b/tests/pkg-drop.test
index 07c1f93..9e63470 100644
--- a/tests/pkg-drop.test
+++ b/tests/pkg-drop.test
@@ -17,7 +17,7 @@
# | |-- libbaz-1.1.0.tar.gz -> libfoo, libbar
# | |-- libfoo-1.0.0.tar.gz
# | `-- repositories
-# `-- t4d -> t4c (prerequisite)
+# `-- t4d -> t4c (complement)
# |-- libbiz-1.0.0.tar.gz -> libfox, libfoo, libbaz
# |-- libfox-1.0.0.tar.gz
# `-- repositories
@@ -369,9 +369,9 @@ $* libfoo/1.0.0 2>>~%EOE% != 0
EOE
-$pkg_status libfox/1.0.0 >'available'
- -$pkg_status libfoo/1.1.0 >'unknown'
+ -$pkg_status libfoo/1.1.0 >'available'
-$pkg_status libbar/1.1.0 >'unknown'
- -$pkg_status libbaz/1.1.0 >'unknown'
+ -$pkg_status libbaz/1.1.0 >'available'
-$pkg_status libbiz/1.0.0 >'available'
}