aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-06-14 21:08:13 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-06-15 11:21:18 +0300
commit64fab6d44c4dd0868f18599ac73d97ad42a0c463 (patch)
treebe4ab4d2fa0bfad8ddb6b3d01b1eacb16173aa1a /tests
parent4ea2746d42a9c7133b1938133115049d4e41962f (diff)
Convert bdep configuration negotiation tests
Diffstat (limited to 'tests')
-rw-r--r--tests/common/dependency-alternatives/t13a/bar-1.0.0.tar.gzbin0 -> 530 bytes
-rw-r--r--tests/common/dependency-alternatives/t13a/baz-1.0.0.tar.gzbin0 -> 527 bytes
-rw-r--r--tests/common/dependency-alternatives/t13a/biz-1.0.0.tar.gzbin0 -> 450 bytes
-rw-r--r--tests/common/dependency-alternatives/t13a/liba-1.0.0.tar.gzbin0 -> 456 bytes
-rw-r--r--tests/common/dependency-alternatives/t13a/repositories.manifest1
-rw-r--r--tests/common/dependency-alternatives/t13b/bar-1.0.0.tar.gzbin0 -> 439 bytes
-rw-r--r--tests/common/dependency-alternatives/t13b/baz-1.0.0.tar.gzbin0 -> 439 bytes
-rw-r--r--tests/common/dependency-alternatives/t13b/biz-1.0.0.tar.gzbin0 -> 399 bytes
-rw-r--r--tests/common/dependency-alternatives/t13b/liba-1.0.0.tar.gzbin0 -> 431 bytes
-rw-r--r--tests/common/dependency-alternatives/t13b/repositories.manifest1
-rw-r--r--tests/common/dependency-alternatives/t13c/bar-1.0.0.tar.gzbin0 -> 468 bytes
-rw-r--r--tests/common/dependency-alternatives/t13c/baz-1.0.0.tar.gzbin0 -> 403 bytes
-rw-r--r--tests/common/dependency-alternatives/t13c/liba-1.0.0.tar.gzbin0 -> 401 bytes
-rw-r--r--tests/common/dependency-alternatives/t13c/repositories.manifest1
-rw-r--r--tests/common/dependency-alternatives/t13d/bar-1.0.0.tar.gzbin0 -> 539 bytes
-rw-r--r--tests/common/dependency-alternatives/t13d/baz-1.0.0.tar.gzbin0 -> 407 bytes
-rw-r--r--tests/common/dependency-alternatives/t13d/liba-1.0.0.tar.gzbin0 -> 401 bytes
-rw-r--r--tests/common/dependency-alternatives/t13d/libb-1.0.0.tar.gzbin0 -> 347 bytes
-rw-r--r--tests/common/dependency-alternatives/t13d/repositories.manifest1
-rw-r--r--tests/pkg-build.testscript703
l---------tests/pkg-build/t13a1
l---------tests/pkg-build/t13b1
l---------tests/pkg-build/t13c1
l---------tests/pkg-build/t13d1
24 files changed, 710 insertions, 1 deletions
diff --git a/tests/common/dependency-alternatives/t13a/bar-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13a/bar-1.0.0.tar.gz
new file mode 100644
index 0000000..db3c22d
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13a/bar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13a/baz-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13a/baz-1.0.0.tar.gz
new file mode 100644
index 0000000..f86b0aa
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13a/baz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13a/biz-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13a/biz-1.0.0.tar.gz
new file mode 100644
index 0000000..cfa8fa2
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13a/biz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13a/liba-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13a/liba-1.0.0.tar.gz
new file mode 100644
index 0000000..c177a1b
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13a/liba-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13a/repositories.manifest b/tests/common/dependency-alternatives/t13a/repositories.manifest
new file mode 100644
index 0000000..5b70556
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13a/repositories.manifest
@@ -0,0 +1 @@
+: 1
diff --git a/tests/common/dependency-alternatives/t13b/bar-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13b/bar-1.0.0.tar.gz
new file mode 100644
index 0000000..5b49774
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13b/bar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13b/baz-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13b/baz-1.0.0.tar.gz
new file mode 100644
index 0000000..cb136b4
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13b/baz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13b/biz-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13b/biz-1.0.0.tar.gz
new file mode 100644
index 0000000..27fe077
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13b/biz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13b/liba-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13b/liba-1.0.0.tar.gz
new file mode 100644
index 0000000..ee1dd3a
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13b/liba-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13b/repositories.manifest b/tests/common/dependency-alternatives/t13b/repositories.manifest
new file mode 100644
index 0000000..5b70556
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13b/repositories.manifest
@@ -0,0 +1 @@
+: 1
diff --git a/tests/common/dependency-alternatives/t13c/bar-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13c/bar-1.0.0.tar.gz
new file mode 100644
index 0000000..83ad484
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13c/bar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13c/baz-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13c/baz-1.0.0.tar.gz
new file mode 100644
index 0000000..b64552e
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13c/baz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13c/liba-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13c/liba-1.0.0.tar.gz
new file mode 100644
index 0000000..5b79dc9
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13c/liba-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13c/repositories.manifest b/tests/common/dependency-alternatives/t13c/repositories.manifest
new file mode 100644
index 0000000..5b70556
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13c/repositories.manifest
@@ -0,0 +1 @@
+: 1
diff --git a/tests/common/dependency-alternatives/t13d/bar-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13d/bar-1.0.0.tar.gz
new file mode 100644
index 0000000..5683176
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13d/bar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13d/baz-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13d/baz-1.0.0.tar.gz
new file mode 100644
index 0000000..8101c5d
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13d/baz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13d/liba-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13d/liba-1.0.0.tar.gz
new file mode 100644
index 0000000..f2965f5
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13d/liba-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13d/libb-1.0.0.tar.gz b/tests/common/dependency-alternatives/t13d/libb-1.0.0.tar.gz
new file mode 100644
index 0000000..0f13429
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13d/libb-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/dependency-alternatives/t13d/repositories.manifest b/tests/common/dependency-alternatives/t13d/repositories.manifest
new file mode 100644
index 0000000..5b70556
--- /dev/null
+++ b/tests/common/dependency-alternatives/t13d/repositories.manifest
@@ -0,0 +1 @@
+: 1
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 902ff1f..630c7b4 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -262,6 +262,34 @@
# | |-- baz-1.0.0.tar.gz -> libbaz == 1.0.0
# | `-- repositories.manifest
# |
+# |-- t13a
+# | |-- liba-0.1.0.tar.gz
+# | |-- bar-1.0.0.tar.gz -> liba {prefer {...} accept (...)}
+# | |-- baz-1.0.0.tar.gz -> liba {prefer {...} accept (...)}
+# | |-- biz-1.0.0.tar.gz -> liba {prefer {...} accept (...)}
+# | `-- repositories.manifest
+# |
+# |-- t13b
+# | |-- liba-0.1.0.tar.gz
+# | |-- bar-1.0.0.tar.gz -> liba {prefer {...} accept (...)}
+# | |-- baz-1.0.0.tar.gz -> liba {prefer {...} accept (...)}
+# | |-- biz-1.0.0.tar.gz -> liba {require {...}}
+# | `-- repositories.manifest
+# |
+# |-- t13c
+# | |-- liba-0.1.0.tar.gz
+# | |-- bar-1.0.0.tar.gz -> liba {prefer {...} accept (...) reflect (...)}
+# | |-- baz-1.0.0.tar.gz -> liba {require {...}}
+# | `-- repositories.manifest
+# |
+# |-- t13d
+# | |-- liba-0.1.0.tar.gz
+# | |-- libb-0.1.0.tar.gz
+# | |-- bar-1.0.0.tar.gz -> liba {prefer {...} accept (...) reflect (...)},
+# | | libb ? (...)
+# | |-- baz-1.0.0.tar.gz -> bar, liba {require {...}}
+# | `-- repositories.manifest
+# |
# `-- git
# |-- libbar.git -> style-basic.git (prerequisite repository)
# |-- libbaz.git
@@ -296,6 +324,10 @@ posix = ($cxx.target.class != 'windows')
cp -r $src/t11a $out/t11a && $rep_create $out/t11a &$out/t11a/packages.manifest
cp -r $src/t12a $out/t12a && $rep_create $out/t12a &$out/t12a/packages.manifest
cp -r $src/t12b $out/t12b && $rep_create $out/t12b &$out/t12b/packages.manifest
+ cp -r $src/t13a $out/t13a && $rep_create $out/t13a &$out/t13a/packages.manifest
+ cp -r $src/t13b $out/t13b && $rep_create $out/t13b &$out/t13b/packages.manifest
+ cp -r $src/t13c $out/t13c && $rep_create $out/t13c &$out/t13c/packages.manifest
+ cp -r $src/t13d $out/t13d && $rep_create $out/t13d &$out/t13d/packages.manifest
# Create git repositories.
#
@@ -4803,7 +4835,7 @@ test.options += --no-progress
}
}
- : configuration-negotiation
+ : configuration-negotiation-order
:
{
+$clone_root_cfg && $rep_add $rep/t11a && $rep_fetch
@@ -11167,6 +11199,675 @@ test.options += --no-progress
tux dex dix diz dox
}
}
+
+ : configuration-negotiation
+ :
+ {
+ test.arguments += --yes --plan 'build plan:'
+
+ : proj-better-choice
+ :
+ {
+ +$clone_root_cfg && $rep_add $rep/t13a && $rep_fetch
+
+ : bar
+ :
+ {
+ $clone_cfg;
+
+ $* bar 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by bar)
+ config.liba.backend=cli (set by bar)
+ new bar/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ configured liba/1.0.0
+ configured bar/1.0.0
+ %info: .+bar.+ is up to date%
+ updated bar/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.backend = cli
+ EOO
+
+ $pkg_drop bar
+ }
+
+ : baz
+ :
+ {
+ $clone_cfg;
+
+ $* baz 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by baz)
+ config.liba.backend=gui (set by baz)
+ new baz/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched baz/1.0.0
+ unpacked baz/1.0.0
+ configured liba/1.0.0
+ configured baz/1.0.0
+ %info: .+baz.+ is up to date%
+ updated baz/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !baz configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.backend = gui
+ EOO
+
+ $pkg_drop baz
+ }
+
+ : bar-baz
+ :
+ {
+ $clone_cfg;
+
+ $* bar baz 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by bar, baz)
+ config.liba.backend=cli (set by bar)
+ new bar/1.0.0
+ new baz/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ fetched baz/1.0.0
+ unpacked baz/1.0.0
+ configured liba/1.0.0
+ configured bar/1.0.0
+ configured baz/1.0.0
+ %info: .+bar.+ is up to date%
+ %info: .+baz.+ is up to date%
+ updated bar/1.0.0
+ updated baz/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ !baz configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.backend = cli
+ EOO
+
+ $pkg_drop bar baz
+ }
+
+ : baz-bar
+ :
+ {
+ $clone_cfg;
+
+ $* baz bar 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by bar, baz)
+ config.liba.backend=cli (set by bar)
+ new baz/1.0.0
+ new bar/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched baz/1.0.0
+ unpacked baz/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ configured liba/1.0.0
+ configured baz/1.0.0
+ configured bar/1.0.0
+ %info: .+baz.+ is up to date%
+ %info: .+bar.+ is up to date%
+ updated baz/1.0.0
+ updated bar/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !baz configured 1.0.0
+ liba configured 1.0.0
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ # Would have been cool to end up with gui but looks like we have a map
+ # in configuration cluster.
+ #
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.backend = cli
+ EOO
+
+ $pkg_drop baz bar
+ }
+
+ : bar-baz-biz
+ :
+ {
+ $clone_cfg;
+
+ $* bar baz biz 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by bar, baz, biz)
+ config.liba.backend=gui (set by biz)
+ new bar/1.0.0
+ new baz/1.0.0
+ new biz/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ fetched baz/1.0.0
+ unpacked baz/1.0.0
+ fetched biz/1.0.0
+ unpacked biz/1.0.0
+ configured liba/1.0.0
+ configured bar/1.0.0
+ configured baz/1.0.0
+ configured biz/1.0.0
+ %info: .+bar.+ is up to date%
+ %info: .+baz.+ is up to date%
+ %info: .+biz.+ is up to date%
+ updated bar/1.0.0
+ updated baz/1.0.0
+ updated biz/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ !baz configured 1.0.0
+ liba configured 1.0.0
+ !biz configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.backend = gui
+ EOO
+
+ $pkg_drop bar baz biz
+ }
+ }
+
+ : proj-better-value
+ :
+ {
+ +$clone_root_cfg && $rep_add $rep/t13b && $rep_fetch
+
+ : liba
+ :
+ {
+ $clone_cfg;
+
+ $* liba 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ configured liba/1.0.0
+ %info: .+liba.+ is up to date%
+ updated liba/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = false
+ config.liba.buffer = 1024
+ EOO
+
+ $pkg_drop liba
+ }
+
+ : bar
+ :
+ {
+ $clone_cfg;
+
+ $* bar 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by bar)
+ config.liba.buffer=2048 (set by bar)
+ new bar/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ configured liba/1.0.0
+ configured bar/1.0.0
+ %info: .+bar.+ is up to date%
+ updated bar/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = false
+ config.liba.buffer = 2048
+ EOO
+
+ $pkg_drop bar
+ }
+
+ : bar-liba
+ :
+ {
+ $clone_cfg;
+
+ $* bar ?liba +{ config.liba.x=true } 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0
+ config.liba.x=true (user configuration)
+ config.liba.buffer=10240 (set by bar)
+ new bar/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ configured liba/1.0.0
+ configured bar/1.0.0
+ %info: .+liba.+ is up to date%
+ %info: .+bar.+ is up to date%
+ updated liba/1.0.0
+ updated bar/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = true
+ config.liba.buffer = 10240
+ EOO
+
+ $pkg_drop bar
+ }
+
+ : baz
+ :
+ {
+ $clone_cfg;
+
+ $* baz 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by baz)
+ config.liba.buffer=4096 (set by baz)
+ new baz/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched baz/1.0.0
+ unpacked baz/1.0.0
+ configured liba/1.0.0
+ configured baz/1.0.0
+ %info: .+baz.+ is up to date%
+ updated baz/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !baz configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = false
+ config.liba.buffer = 4096
+ EOO
+
+ $pkg_drop baz
+ }
+
+ : baz-liba
+ :
+ {
+ $clone_cfg;
+
+ $* baz ?liba +{ config.liba.x=true } 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0
+ config.liba.x=true (user configuration)
+ config.liba.buffer=10240 (set by baz)
+ new baz/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched baz/1.0.0
+ unpacked baz/1.0.0
+ configured liba/1.0.0
+ configured baz/1.0.0
+ %info: .+liba.+ is up to date%
+ %info: .+baz.+ is up to date%
+ updated liba/1.0.0
+ updated baz/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !baz configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = true
+ config.liba.buffer = 10240
+ EOO
+
+ $pkg_drop baz
+ }
+
+ : baz-biz
+ :
+ {
+ $clone_cfg;
+
+ $* baz biz 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by baz, biz)
+ config.liba.buffer=10240 (set by baz)
+ config.liba.x=true (set by biz)
+ new baz/1.0.0
+ new biz/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched baz/1.0.0
+ unpacked baz/1.0.0
+ fetched biz/1.0.0
+ unpacked biz/1.0.0
+ configured liba/1.0.0
+ configured baz/1.0.0
+ configured biz/1.0.0
+ %info: .+baz.+ is up to date%
+ %info: .+biz.+ is up to date%
+ updated baz/1.0.0
+ updated biz/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !baz configured 1.0.0
+ liba configured 1.0.0
+ !biz configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = true
+ config.liba.buffer = 10240
+ EOO
+
+ $pkg_drop baz biz
+ }
+ }
+
+ : proj-disable-unused
+ :
+ {
+ +$clone_root_cfg && $rep_add $rep/t13c && $rep_fetch
+
+ : liba
+ :
+ {
+ $clone_cfg;
+
+ $* liba 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ configured liba/1.0.0
+ %info: .+liba.+ is up to date%
+ updated liba/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = true
+ EOO
+
+ $pkg_drop liba
+ }
+
+ : bar
+ :
+ {
+ $clone_cfg;
+
+ $* bar 2>>~%EOE%;
+ <depends-reflect-clause>:1:5: info: false
+ info: reflect clause:
+ info $config.liba.x
+ info: in depends manifest value of package bar
+ build plan:
+ new liba/1.0.0 (required by bar)
+ config.liba.x=false (set by bar)
+ new bar/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ configured liba/1.0.0
+ configured bar/1.0.0
+ %info: .+bar.+ is up to date%
+ updated bar/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = false
+ EOO
+
+ $pkg_drop bar
+ }
+
+ : bar-baz
+ :
+ {
+ $clone_cfg;
+
+ $* bar baz 2>>~%EOE%;
+ <depends-reflect-clause>:1:5: info: true
+ info: reflect clause:
+ info $config.liba.x
+ info: in depends manifest value of package bar
+ build plan:
+ new liba/1.0.0 (required by bar, baz)
+ config.liba.x=true (set by baz)
+ new bar/1.0.0
+ new baz/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ fetched baz/1.0.0
+ unpacked baz/1.0.0
+ configured liba/1.0.0
+ configured bar/1.0.0
+ configured baz/1.0.0
+ %info: .+bar.+ is up to date%
+ %info: .+baz.+ is up to date%
+ updated bar/1.0.0
+ updated baz/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ !baz configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = true
+ EOO
+
+ $pkg_drop bar baz
+ }
+
+ : bar-liba
+ :
+ {
+ $clone_cfg;
+
+ $* bar ?liba +{ config.liba.x=true } 2>>~%EOE%;
+ <depends-reflect-clause>:1:5: info: true
+ info: reflect clause:
+ info $config.liba.x
+ info: in depends manifest value of package bar
+ build plan:
+ new liba/1.0.0
+ config.liba.x=true (user configuration)
+ new bar/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ configured liba/1.0.0
+ configured bar/1.0.0
+ %info: .+liba.+ is up to date%
+ %info: .+bar.+ is up to date%
+ updated liba/1.0.0
+ updated bar/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = true
+ EOO
+
+ $pkg_drop bar
+ }
+ }
+
+ : proj-use-if-available
+ :
+ {
+ +$clone_root_cfg && $rep_add $rep/t13d && $rep_fetch
+
+ : baz
+ :
+ {
+ $clone_cfg;
+
+ $* baz 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by bar, baz)
+ config.liba.x=true (set by baz)
+ new bar/1.0.0 (required by baz)
+ config.bar.liba_x=true (set by bar)
+ new baz/1.0.0
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ fetched baz/1.0.0
+ unpacked baz/1.0.0
+ configured liba/1.0.0
+ configured bar/1.0.0
+ configured baz/1.0.0
+ %info: .+baz.+ is up to date%
+ updated baz/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !baz configured 1.0.0
+ bar configured 1.0.0
+ liba configured 1.0.0
+ liba configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = true
+ EOO
+
+ $pkg_drop baz
+ }
+
+ : bar
+ :
+ {
+ $clone_cfg;
+
+ $* bar 2>>~%EOE%;
+ build plan:
+ new liba/1.0.0 (required by bar)
+ new libb/1.0.0 (required by bar)
+ new bar/1.0.0
+ config.bar.liba_x=false (set by bar)
+ fetched liba/1.0.0
+ unpacked liba/1.0.0
+ fetched libb/1.0.0
+ unpacked libb/1.0.0
+ fetched bar/1.0.0
+ unpacked bar/1.0.0
+ configured liba/1.0.0
+ configured libb/1.0.0
+ configured bar/1.0.0
+ %info: .+bar.+ is up to date%
+ updated bar/1.0.0
+ EOE
+
+ $pkg_status -r >>EOO;
+ !bar configured 1.0.0
+ liba configured 1.0.0
+ libb configured 1.0.0
+ EOO
+
+ cat cfg/liba-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.liba.x = false
+ EOO
+
+ $pkg_drop bar
+ }
+ }
+ }
}
: test-dependency
diff --git a/tests/pkg-build/t13a b/tests/pkg-build/t13a
new file mode 120000
index 0000000..9d8fb23
--- /dev/null
+++ b/tests/pkg-build/t13a
@@ -0,0 +1 @@
+../common/dependency-alternatives/t13a/ \ No newline at end of file
diff --git a/tests/pkg-build/t13b b/tests/pkg-build/t13b
new file mode 120000
index 0000000..d17701b
--- /dev/null
+++ b/tests/pkg-build/t13b
@@ -0,0 +1 @@
+../common/dependency-alternatives/t13b/ \ No newline at end of file
diff --git a/tests/pkg-build/t13c b/tests/pkg-build/t13c
new file mode 120000
index 0000000..1c534d0
--- /dev/null
+++ b/tests/pkg-build/t13c
@@ -0,0 +1 @@
+../common/dependency-alternatives/t13c/ \ No newline at end of file
diff --git a/tests/pkg-build/t13d b/tests/pkg-build/t13d
new file mode 120000
index 0000000..6933497
--- /dev/null
+++ b/tests/pkg-build/t13d
@@ -0,0 +1 @@
+../common/dependency-alternatives/t13d/ \ No newline at end of file