aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/common/git/state0/libbar.tarbin71680 -> 71680 bytes
-rw-r--r--tests/common/git/state0/libfoo.tarbin296960 -> 296960 bytes
-rw-r--r--tests/common/git/state0/style-basic.tarbin71680 -> 71680 bytes
-rw-r--r--tests/common/git/state0/style.tarbin133120 -> 133120 bytes
-rw-r--r--tests/common/git/state1/libbaz.tarbin61440 -> 61440 bytes
-rw-r--r--tests/common/git/state1/libfoo.tarbin378880 -> 378880 bytes
-rw-r--r--tests/common/git/state1/style-basic.tarbin71680 -> 71680 bytes
-rw-r--r--tests/common/git/state1/style.tarbin133120 -> 133120 bytes
-rw-r--r--tests/pkg-build.test130
-rw-r--r--tests/pkg-checkout.test17
-rw-r--r--tests/pkg-system.test40
11 files changed, 145 insertions, 42 deletions
diff --git a/tests/common/git/state0/libbar.tar b/tests/common/git/state0/libbar.tar
index 23cc354..c98479d 100644
--- a/tests/common/git/state0/libbar.tar
+++ b/tests/common/git/state0/libbar.tar
Binary files differ
diff --git a/tests/common/git/state0/libfoo.tar b/tests/common/git/state0/libfoo.tar
index 9b44d03..6c059e6 100644
--- a/tests/common/git/state0/libfoo.tar
+++ b/tests/common/git/state0/libfoo.tar
Binary files differ
diff --git a/tests/common/git/state0/style-basic.tar b/tests/common/git/state0/style-basic.tar
index 1579f50..2e0ef8e 100644
--- a/tests/common/git/state0/style-basic.tar
+++ b/tests/common/git/state0/style-basic.tar
Binary files differ
diff --git a/tests/common/git/state0/style.tar b/tests/common/git/state0/style.tar
index 1b75bc5..c7e9d4b 100644
--- a/tests/common/git/state0/style.tar
+++ b/tests/common/git/state0/style.tar
Binary files differ
diff --git a/tests/common/git/state1/libbaz.tar b/tests/common/git/state1/libbaz.tar
index 4bccb1a..fadd780 100644
--- a/tests/common/git/state1/libbaz.tar
+++ b/tests/common/git/state1/libbaz.tar
Binary files differ
diff --git a/tests/common/git/state1/libfoo.tar b/tests/common/git/state1/libfoo.tar
index dc9d53f..53c5220 100644
--- a/tests/common/git/state1/libfoo.tar
+++ b/tests/common/git/state1/libfoo.tar
Binary files differ
diff --git a/tests/common/git/state1/style-basic.tar b/tests/common/git/state1/style-basic.tar
index c18148b..9b46120 100644
--- a/tests/common/git/state1/style-basic.tar
+++ b/tests/common/git/state1/style-basic.tar
Binary files differ
diff --git a/tests/common/git/state1/style.tar b/tests/common/git/state1/style.tar
index 080dc4d..4b2e9e9 100644
--- a/tests/common/git/state1/style.tar
+++ b/tests/common/git/state1/style.tar
Binary files differ
diff --git a/tests/pkg-build.test b/tests/pkg-build.test
index 3f89b40..0c9180a 100644
--- a/tests/pkg-build.test
+++ b/tests/pkg-build.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:
#
@@ -11,41 +11,56 @@
# |-- libbaz-1.1.0.tar.gz
# |-- libfoo-0.0.1.tar.gz
# |-- libfoo-1.0.0.tar.gz
+# |
# |-- libfoo-1.1.0
# | |-- build
# | | `-- bootstrap.build
# | |-- buildfile
# | `-- manifest
+# |
# |-- libfoo-1.1.0.tar.gz
# |-- libfoo-1.2.0.tar.gz
+# |
# |-- t1
# | |-- libfoo-1.0.0.tar.gz
# | `-- repositories
+# |
# |-- t2
# | |-- libbar-1.0.0.tar.gz -> libfoo
# | |-- libfoo-1.0.0.tar.gz
# | `-- repositories
+# |
# |-- t3 -> t2 (prerequisite)
# | |-- libbaz-1.0.0.tar.gz -> libbar
# | |-- libfox-1.0.0.tar.gz
# | `-- repositories
+# |
# |-- t4a
# | |-- libfoo-1.1.0.tar.gz
# | `-- repositories
+# |
# |-- t4b -> t4a (prerequisite)
# | |-- libbar-1.1.0.tar.gz -> libfoo == 1.1.0
# | `-- repositories
+# |
# |-- t4c -> t4b (prerequisite)
# | |-- libbaz-1.1.0.tar.gz -> libfoo, libbar
# | |-- libfoo-1.0.0.tar.gz
# | `-- repositories
+# |
# |-- t4d -> t4c (prerequisite)
# | |-- libbiz-1.0.0.tar.gz -> libfox, libfoo, libbaz
# | |-- libfox-1.0.0.tar.gz
# | `-- repositories
-# `-- t5
-# |-- libbar-1.2.0.tar.gz
-# `-- repositories
+# |
+# |-- t5
+# | |-- libbar-1.2.0.tar.gz
+# | `-- repositories
+# |
+# `-- git
+# |-- libbar.git -> style-basic.git (prerequisite)
+# |-- libbaz.git
+# `-- style-basic.git
# Prepare repositories used by tests if running in the local mode.
#
@@ -60,6 +75,12 @@
cp -r $src/t4c $out/t4c && $rep_create $out/t4c &$out/t4c/packages
cp -r $src/t4d $out/t4d && $rep_create $out/t4d &$out/t4d/packages
cp -r $src/t5 $out/t5 && $rep_create $out/t5 &$out/t5/packages
+
+ # Create git repositories.
+ #
+ $git_extract $src/git/style-basic.tar
+ $git_extract $src/git/libbar.tar &$out_git/state0/***
+ $git_extract $src/git/libbaz.tar &$out_git/state1/***
end
pkg_configure += -d cfg "config.cxx=$config.cxx" 2>!
@@ -711,14 +732,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.1.0%
unpacked libfoo/1.1.0
+ configured libfoo/1.1.0
%.*
%.*fetched libbar/1.1.0%
unpacked libbar/1.1.0
+ configured libbar/1.1.0
%.*
%.*fetched libbaz/1.1.0%
unpacked libbaz/1.1.0
- configured libfoo/1.1.0
- configured libbar/1.1.0
configured libbaz/1.1.0
%info: .+dir\{libbaz-1.1.0.\} is up to date%
updated libbaz/1.1.0
@@ -852,14 +873,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.1.0%
unpacked libfoo/1.1.0
+ configured libfoo/1.1.0
%.*
%.*fetched libbar/1.1.0%
unpacked libbar/1.1.0
+ configured libbar/1.1.0
%.*
%.*fetched libbaz/1.1.0%
unpacked libbaz/1.1.0
- configured libfoo/1.1.0
- configured libbar/1.1.0
configured libbaz/1.1.0
%info: .+dir\{libbaz-1.1.0.\} is up to date%
updated libbaz/1.1.0
@@ -899,14 +920,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.1.0%
unpacked libfoo/1.1.0
+ configured libfoo/1.1.0
%.*
%.*fetched libbar/1.1.0%
unpacked libbar/1.1.0
+ configured libbar/1.1.0
%.*
%.*fetched libbaz/1.1.0%
unpacked libbaz/1.1.0
- configured libfoo/1.1.0
- configured libbar/1.1.0
configured libbaz/1.1.0
%info: .+dir\{libbaz-1.1.0.\} is up to date%
updated libbaz/1.1.0
@@ -962,10 +983,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.0.0%
unpacked libfoo/1.0.0
+ configured libfoo/1.0.0
%.*
%.*fetched libbar/1.0.0%
unpacked libbar/1.0.0
- configured libfoo/1.0.0
configured libbar/1.0.0
%info: .+dir\{libbar-1.0.0.\} is up to date%
updated libbar/1.0.0
@@ -996,10 +1017,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.0.0%
unpacked libfoo/1.0.0
+ configured libfoo/1.0.0
%.*
%.*fetched libbar/1.0.0%
unpacked libbar/1.0.0
- configured libfoo/1.0.0
configured libbar/1.0.0
%info: .+dir\{libfoo-1.0.0.\} is up to date%
%info: .+dir\{libbar-1.0.0.\} is up to date%
@@ -1052,8 +1073,8 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.1.0%
unpacked libfoo/1.1.0
- unpacked libbar/1.1.0
configured libfoo/1.1.0
+ unpacked libbar/1.1.0
configured libbar/1.1.0
%info: .+dir\{libbar-1.1.0.\} is up to date%
updated libbar/1.1.0
@@ -1094,10 +1115,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.0.0%
unpacked libfoo/1.0.0
+ configured libfoo/1.0.0
%.*
%.*fetched libbar/1.0.0%
unpacked libbar/1.0.0
- configured libfoo/1.0.0
configured libbar/1.0.0
%info: .+dir.+ is up to date%
updated libbar/1.0.0
@@ -1133,10 +1154,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.0.0%
unpacked libfoo/1.0.0
+ configured libfoo/1.0.0
%.*
%.*fetched libbar/1.0.0%
unpacked libbar/1.0.0
- configured libfoo/1.0.0
configured libbar/1.0.0
%info: .+dir.+ is up to date%
updated libbar/1.0.0
@@ -1180,10 +1201,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.0.0%
unpacked libfoo/1.0.0
+ configured libfoo/1.0.0
%.*
%.*fetched libbar/1.0.0%
unpacked libbar/1.0.0
- configured libfoo/1.0.0
configured libbar/1.0.0
%info: .+ is up to date%
updated libbar/1.0.0
@@ -1225,10 +1246,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.0.0%
unpacked libfoo/1.0.0
+ configured libfoo/1.0.0
%.*
%.*fetched libbar/1.0.0%
unpacked libbar/1.0.0
- configured libfoo/1.0.0
configured libbar/1.0.0
%info: .+ is up to date%
updated libbar/1.0.0
@@ -1270,10 +1291,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libfoo/1.0.0%
unpacked libfoo/1.0.0
+ configured libfoo/1.0.0
%.*
%.*fetched libbar/1.0.0%
unpacked libbar/1.0.0
- configured libfoo/1.0.0
configured libbar/1.0.0
EOE
@@ -1283,3 +1304,76 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$pkg_disfigure libfoo 2>'disfigured libfoo/1.0.0';
$pkg_purge libfoo 2>'purged libfoo/1.0.0'
}
+
+: git-repos
+:
+if ($git_supported != true)
+{
+ # Skip git repository tests.
+ #
+}
+else
+{
+ rep0 = "$rep_git/state0"
+ rep1 = "$rep_git/state1"
+
+ test.arguments += --yes
+
+ pkg_disfigure += 2>!
+ pkg_purge += 2>!
+
+ : prerequisite-repo
+ :
+ : Prerequisite package of the dependent being built is in the prerequisite
+ : repository.
+ :
+ $clone_root_cfg;
+ $rep_add "$rep0/libbar.git#master";
+ $rep_add "$rep0/style-basic.git#master";
+ $rep_fetch &cfg/.bpkg/repositories/*/***;
+
+ $* libmbar 2>>~%EOE%;
+ %dist style-basic-.+%
+ %checked out style-basic/.+%
+ %configured style-basic/.+%
+ dist libmbar-1.0.0
+ checked out libmbar/1.0.0
+ configured libmbar/1.0.0
+ %info: .+dir\{libmbar-.+\} is up to date%
+ updated libmbar/1.0.0
+ EOE
+
+ $pkg_disfigure libmbar;
+ $pkg_disfigure style-basic;
+
+ $pkg_purge libmbar;
+ $pkg_purge style-basic
+
+ : no-prerequisite-repos
+ :
+ : Dependent package repository has no prerequisites nor complements. Its
+ : dependency is picked up via the root repository that complements its
+ : repository (see rep_fetch() function implementation for details).
+ :
+ $clone_root_cfg;
+ $rep_add "$rep1/libbaz.git#master";
+ $rep_add "$rep0/style-basic.git#master";
+ $rep_fetch &cfg/.bpkg/repositories/*/***;
+
+ $* libbaz 2>>~%EOE%;
+ %dist style-basic-.+%
+ %checked out style-basic/.+%
+ %configured style-basic/.+%
+ dist libbaz-1.0.0
+ checked out libbaz/1.0.0
+ configured libbaz/1.0.0
+ %info: .+dir\{libbaz-.+\} is up to date%
+ updated libbaz/1.0.0
+ EOE
+
+ $pkg_disfigure libbaz;
+ $pkg_disfigure style-basic;
+
+ $pkg_purge libbaz;
+ $pkg_purge style-basic
+}
diff --git a/tests/pkg-checkout.test b/tests/pkg-checkout.test
index 663a900..a50c0f7 100644
--- a/tests/pkg-checkout.test
+++ b/tests/pkg-checkout.test
@@ -35,6 +35,8 @@ else
rep_add += -d cfg 2>!
rep_fetch += -d cfg 2>!
pkg_configure += -d cfg 2>!
+ pkg_disfigure += -d cfg 2>!
+ pkg_purge += -d cfg 2>!
pkg_status += -d cfg
test.cleanups += &cfg/.bpkg/repositories/*/***
@@ -57,18 +59,23 @@ else
$pkg_status style-basic | sed -n -e 's/available ([^ ]+).+/\1/p' | set v;
- $* "style-basic/$v" 2>>"EOE" &cfg/style-basic-$v/***;
+ $* "style-basic/$v" 2>>"EOE";
dist style-basic-$v
checked out style-basic/$v
EOE
$pkg_configure style-basic;
- $* libmbar/1.0.0 2>>EOE &cfg/libmbar-1.0.0/***
+ $* libmbar/1.0.0 2>>EOE;
dist libmbar-1.0.0
checked out libmbar/1.0.0
EOE
+ $pkg_disfigure style-basic;
+
+ $pkg_purge libmbar;
+ $pkg_purge style-basic
+
: replacement
:
# @@ Reduce to a single repository when multiple revisions can be specified
@@ -91,6 +98,8 @@ else
$* "style-basic/$v0" 2>!;
$pkg_status style-basic >~"/unpacked $v0;.+/";
- $* --replace "style-basic/$v1" 2>! &cfg/style-basic-$v1/***;
- $pkg_status style-basic >~"/unpacked $v1;.+/"
+ $* --replace "style-basic/$v1" 2>!;
+ $pkg_status style-basic >~"/unpacked $v1;.+/";
+
+ $pkg_purge style-basic
}
diff --git a/tests/pkg-system.test b/tests/pkg-system.test
index e89ed33..4d6bb39 100644
--- a/tests/pkg-system.test
+++ b/tests/pkg-system.test
@@ -155,10 +155,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libbaz/2%
unpacked libbaz/2
+ configured libbaz/2
%.*
%.*fetched libbar/2%
unpacked libbar/2
- configured libbaz/2
configured libbar/2
configured foo/2
%info: .+ is up to date%
@@ -182,10 +182,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$clone_cfg;
$pkg_build foo 'sys:libbar/2' 2>>~%EOE%;
+ configured sys:libbar/2
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/2
configured foo/2
%info: .+ is up to date%
updated foo/2
@@ -206,10 +206,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$clone_cfg;
$pkg_build 'sys:libbar/2' foo 2>>~%EOE%;
+ configured sys:libbar/2
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/2
configured foo/2
%info: .+ is up to date%
updated foo/2
@@ -235,10 +235,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libbaz/2%
unpacked libbaz/2
+ configured libbaz/2
%.*
%.*fetched libbar/2%
unpacked libbar/2
- configured libbaz/2
configured libbar/2
%info: .+ is up to date%
updated libbar/2
@@ -252,10 +252,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$pkg_build foo 'sys:libbar/2' 2>>~%EOE%;
disfigured libbar/2
purged libbar/2
+ configured sys:libbar/2
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/2
configured foo/2
disfigured libbaz
purged libbaz
@@ -283,10 +283,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libbaz/2%
unpacked libbaz/2
+ configured libbaz/2
%.*
%.*fetched libbar/2%
unpacked libbar/2
- configured libbaz/2
configured libbar/2
%info: .+ is up to date%
updated libbar/2
@@ -300,10 +300,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$pkg_build foo 'sys:libbar' 2>>~%EOE%;
disfigured libbar/2
purged libbar/2
+ configured sys:libbar/*
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/*
configured foo/2
disfigured libbaz
purged libbaz
@@ -338,14 +338,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libbaz/2%
unpacked libbaz/2
+ configured libbaz/2
%.*
%.*fetched libbar/2%
unpacked libbar/2
+ configured libbar/2
%.*
%.*fetched foo/2%
unpacked foo/2
- configured libbaz/2
- configured libbar/2
configured foo/2
%info: .+ is up to date%
%info: .+ is up to date%
@@ -383,10 +383,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libbaz/2%
unpacked libbaz/2
+ configured libbaz/2
%.*
%.*fetched libbar/2%
unpacked libbar/2
- configured libbaz/2
configured libbar/2
configured foo/2
%info: .+ is up to date%
@@ -432,14 +432,14 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libbaz/2%
unpacked libbaz/2
+ configured libbaz/2
%.*
%.*fetched libbar/2%
unpacked libbar/2
+ configured libbar/2
%.*
%.*fetched foo/2%
unpacked foo/2
- configured libbaz/2
- configured libbar/2
configured foo/2
%info: .+ is up to date%
%info: .+ is up to date%
@@ -462,10 +462,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$clone_cfg;
$pkg_build foo '?sys:libbar' 2>>~%EOE%;
+ configured sys:libbar/*
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/*
configured foo/2
%info: .+ is up to date%
updated foo/2
@@ -492,10 +492,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
%.*
%.*fetched libbaz/2%
unpacked libbaz/2
+ configured libbaz/2
%.*
%.*fetched libbar/1%
unpacked libbar/1
- configured libbaz/2
configured libbar/1
%info: .+ is up to date%
updated libbar/1
@@ -518,10 +518,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$pkg_build foo '?sys:libbar/2' 2>>~%EOE%;
disfigured libbar/1
purged libbar/1
+ configured sys:libbar/2
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/2
configured foo/2
disfigured libbaz
purged libbaz
@@ -584,10 +584,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$clone_cfg;
$pkg_build foo 'sys:libbar' 2>>~%EOE%;
+ configured sys:libbar/*
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/*
configured foo/2
%info: .+ is up to date%
updated foo/2
@@ -624,10 +624,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
#
$pkg_build foo 'sys:libbar/2' 2>>~%EOE%;
purged libbar/1
+ configured sys:libbar/2
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/2
configured foo/2
%info: .+ is up to date%
updated foo/2
@@ -710,10 +710,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# Build foo and ?sys:libbar.
#
$pkg_build foo '?sys:libbar' 2>>~%EOE%;
+ configured sys:libbar/*
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/*
configured foo/2
%info: .+ is up to date%
updated foo/2
@@ -759,10 +759,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
#
$pkg_build foo '?sys:libbar/2' 2>>~%EOE%;
purged libbar/1
+ configured sys:libbar/2
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/2
configured foo/2
%info: .+ is up to date%
updated foo/2
@@ -832,10 +832,10 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
# Build foo '?sys:libbar/2'.
#
$pkg_build foo '?sys:libbar/2' 2>>~%EOE%;
+ configured sys:libbar/2
%.*
%.*fetched foo/2%
unpacked foo/2
- configured sys:libbar/2
configured foo/2
%info: .+ is up to date%
updated foo/2