aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/pkg-build.testscript11
-rw-r--r--tests/pkg-system.testscript3
-rw-r--r--tests/pkg-update.testscript60
3 files changed, 57 insertions, 17 deletions
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 3834b6f..964eee4 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -2158,13 +2158,6 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# date on filesystems with a low file timestamps resolution (for example
# HFS+).
#
- # @@ By some reason the following build occasionally re-links, so the
- # test fails (most often reproduced on Windows). We will copy the
- # configuration directory preserving file timestamps to research the
- # issue when it get reproduced.
- #
- cp -r cfg cfg-backup;
-
$* ?libhello --yes --keep-out 2>>~%EOE%
disfigured libfoo/1.1.0
disfigured libhello/1.0.0
@@ -2579,7 +2572,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
+$rep_add libhello --type dir
+$rep_fetch
- : vars-global-local
+ : global-and-local
:
{
$clone_cfg;
@@ -2599,7 +2592,7 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$pkg_drop libhello
}
- : vars-options
+ : global-and-options
:
{
$clone_cfg;
diff --git a/tests/pkg-system.testscript b/tests/pkg-system.testscript
index 678e838..523ec03 100644
--- a/tests/pkg-system.testscript
+++ b/tests/pkg-system.testscript
@@ -911,7 +911,8 @@ rep_remove += -d cfg 2>!
: unhold
:
- : Test that the system package get purged being unhold.
+ : Test that the system package get purged once unheld (and there are
+ : no dependencies).
:
{
$clone_cfg;
diff --git a/tests/pkg-update.testscript b/tests/pkg-update.testscript
index 02a1a3d..6f11ad1 100644
--- a/tests/pkg-update.testscript
+++ b/tests/pkg-update.testscript
@@ -52,15 +52,11 @@ pkg_configure += -d cfg "config.cxx=$config.cxx" 2>!
pkg_disfigure += -d cfg
pkg_fetch += -d cfg 2>!
pkg_purge += -d cfg
+pkg_build += -d cfg
pkg_unpack += -d cfg 2>!
rep_add += -d cfg 2>!
rep_fetch += -d cfg --auth all 2>!
-# Sometimes we need to run underlying build update operation with -j 1 options
-# to have an output that we can match reliably.
-#
-j1 = --build-option -j --build-option 1
-
: no-name
:
$clone_cfg;
@@ -103,7 +99,7 @@ $* 2>>EOE != 0
$pkg_fetch libhello/1.0.0 && $pkg_unpack libhello;
$pkg_configure libhello;
- $* $j1 libhello 2>>~%EOE%;
+ $* libhello 2>>~%EOE%;
%(c\+\+|ar|ld) .+%{6}
updated libhello/1.0.0
EOE
@@ -124,7 +120,7 @@ $* 2>>EOE != 0
$clone_cfg;
$pkg_unpack -e $src/libhello-1.0.0 && $pkg_configure libhello;
- $* $j1 libhello 2>>~%EOE%;
+ $* libhello 2>>~%EOE%;
%(mkdir|c\+\+|ar|ld) .+%{8}
updated libhello/1.0.0
EOE
@@ -137,3 +133,53 @@ $* 2>>EOE != 0
$pkg_disfigure libhello 2>'disfigured libhello/1.0.0';
$pkg_purge libhello 2>'purged libhello/1.0.0'
}
+
+: vars
+:
+{
+ +$clone_cfg
+ +$rep_fetch $rep/hello --trust $cert_fp &cfg/.bpkg/certs/**
+
+ : global-and-local
+ :
+ {
+ $clone_cfg;
+ $pkg_fetch libhello/1.0.0 && $pkg_unpack libhello;
+ $pkg_configure libhello;
+
+ $* -v config.cxx.poptions=-DG libhello +{ config.cxx.poptions+=-DL } 2>>~%EOE%;
+ %b .+ config\.cxx\.poptions=-DG config\.cxx\.poptions\+=-DL update.+%
+ %.{6}
+ updated libhello/1.0.0
+ EOE
+
+ $pkg_disfigure libhello 2>'disfigured libhello/1.0.0';
+ $pkg_purge libhello 2>'purged libhello/1.0.0'
+ }
+
+ : all-packages
+ :
+ {
+ $clone_cfg;
+ $pkg_build libhello 2>!; # To hold libhello package.
+
+ $* -v --all config.cxx.poptions=-DG 2>>~%EOE%;
+ %b .+ config\.cxx\.poptions=-DG update.+%
+ %.{6}
+ updated libhello/1.0.0
+ EOE
+
+ $pkg_disfigure libhello 2>'disfigured libhello/1.0.0';
+ $pkg_purge libhello 2>'purged libhello/1.0.0'
+ }
+
+ : var-opts
+ :
+ {
+ $clone_cfg;
+
+ $* config.cxx.poptions=-DG +{ --all } 2>>EOE != 0
+ error: unexpected options group for variable 'config.cxx.poptions=-DG'
+ EOE
+ }
+}