aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ci/ci-load.testscript38
-rw-r--r--tests/ci/data.testscript16
-rw-r--r--tests/load/1/math/libexp-+2-1.2+1.tar.gzbin426 -> 498 bytes
-rw-r--r--tests/load/1/math/libfoo-+0-X.Y.tar.gzbin222 -> 301 bytes
-rw-r--r--tests/load/1/math/libfoo-1.0.tar.gzbin327 -> 410 bytes
-rw-r--r--tests/load/1/math/libfoo-1.2.4+1.tar.gzbin1025 -> 1515 bytes
-rw-r--r--tests/load/1/math/libfoo-benchmarks-1.2.4.tar.gzbin264 -> 340 bytes
-rw-r--r--tests/load/1/math/libfoo-examples-1.2.4.tar.gzbin263 -> 335 bytes
-rw-r--r--tests/load/1/math/libfoo-tests-1.2.4.tar.gzbin260 -> 392 bytes
-rw-r--r--tests/load/1/math/libpq-0.tar.gzbin807 -> 881 bytes
-rw-r--r--tests/load/1/math/libstudxml-1.0.0+1.tar.gzbin456 -> 535 bytes
-rw-r--r--tests/load/1/math/packages.manifest120
-rw-r--r--tests/load/1/math/repositories.manifest2
-rw-r--r--tests/load/1/misc/packages.manifest5
-rw-r--r--tests/load/1/stable/libfoo-1.0.tar.gzbin327 -> 410 bytes
-rw-r--r--tests/load/1/stable/libfoo-1.2.2-alpha.1.tar.gzbin353 -> 433 bytes
-rw-r--r--tests/load/1/stable/libfoo-1.2.2.tar.gzbin301 -> 378 bytes
-rw-r--r--tests/load/1/stable/libfoo-1.2.3+4.tar.gzbin301 -> 379 bytes
-rw-r--r--tests/load/1/stable/libfoo-1.2.4.tar.gzbin351 -> 433 bytes
-rw-r--r--tests/load/1/stable/packages.manifest33
-rw-r--r--tests/load/1/stable/repositories.manifest59
-rw-r--r--tests/load/1/stable/signature.manifest22
-rwxr-xr-xtests/load/cert13
-rw-r--r--tests/load/cert.pem57
-rw-r--r--tests/load/driver.cxx159
-rw-r--r--tests/load/loadtab2
-rw-r--r--tests/load/pkg/1/dev.cppget.org/signed/packages.manifest2
-rw-r--r--tests/load/pkg/1/dev.cppget.org/signed/repositories.manifest59
-rw-r--r--tests/load/pkg/1/dev.cppget.org/signed/signature.manifest22
-rw-r--r--tests/submit/data.testscript21
-rw-r--r--tests/submit/submit-dir.testscript11
-rw-r--r--tests/submit/submit-git.testscript132
-rw-r--r--tests/submit/submit-pub.testscript54
-rw-r--r--tests/upload/545f1f78-63ea-4acf-bcb8-37b2513a78c8/archive.tarbin0 -> 10240 bytes
-rw-r--r--tests/upload/545f1f78-63ea-4acf-bcb8-37b2513a78c8/request.manifest22
-rw-r--r--tests/upload/buildfile13
-rw-r--r--tests/upload/data.testscript34
-rw-r--r--tests/upload/upload-bindist.testscript126
-rw-r--r--tests/web/xhtml/driver.cxx3
39 files changed, 783 insertions, 242 deletions
diff --git a/tests/ci/ci-load.testscript b/tests/ci/ci-load.testscript
index 57fa9d1..eb9ba7c 100644
--- a/tests/ci/ci-load.testscript
+++ b/tests/ci/ci-load.testscript
@@ -105,6 +105,14 @@
email: user@example.org
%depends: \\* build2 .+%
%depends: \\* bpkg .+%
+ bootstrap-build:\\
+ project = libhello
+ %.+
+ \\
+ root-build:\\
+ cxx.std = latest
+ %.+
+ \\
location: libhello
%fragment: .+%
:
@@ -116,6 +124,14 @@
email: user@example.org
%depends: \\* build2 .+%
%depends: \\* bpkg .+%
+ bootstrap-build:\\
+ project = hello
+ %.+
+ \\
+ root-build:\\
+ cxx.std = latest
+ %.+
+ \\
location: hello
%fragment: .+%
EOE
@@ -148,6 +164,14 @@
email: user@example.org
%depends: \\* build2 .+%
%depends: \\* bpkg .+%
+ bootstrap-build:\\
+ project = hello
+ %.+
+ \\
+ root-build:\\
+ cxx.std = latest
+ %.+
+ \\
location: hello
%fragment: .+%
EOE
@@ -181,6 +205,14 @@
email: user@example.org
%depends: \\* build2 .+%
%depends: \\* bpkg .+%
+ bootstrap-build:\\
+ project = libhello
+ %.+
+ \\
+ root-build:\\
+ cxx.std = latest
+ %.+
+ \\
location: libhello
%fragment: .+%
EOE
@@ -200,7 +232,11 @@
%.
reference: $request_id
EOO
- %.*:.*%+
+ %.+cache:cache%
+ : 1
+ %.+
+ : 1
+ %.+
EOE
}
}
diff --git a/tests/ci/data.testscript b/tests/ci/data.testscript
index 74a1527..6f44c85 100644
--- a/tests/ci/data.testscript
+++ b/tests/ci/data.testscript
@@ -3,11 +3,11 @@
# Pre-created CI request data directory that will be copied by subsequent
# tests and scope setup commands. The common approach will be that group
-# scopes copy and modify the parent scope submission directory as required
+# scopes copy and modify the parent scope request data directory as required
# by the nested tests and scopes. Tests will also clone the parent scope
-# submission data directory to optionally modify it, use and cleanup at the
-# end. Note that configuration can not be shared between multiple submission
-# handler processes. Also we need to make sure that submission data
+# request data data directory to optionally modify it, use and cleanup at the
+# end. Note that request data directory can not be shared between multiple
+# submission handler processes. Also we need to make sure that request data
# directories are not cloned while being used by submission handler scripts.
#
data_dir = $regex.replace($path_search('*/request.manifest', $src_base), \
@@ -34,10 +34,10 @@ root_data_dir = $~/$data_dir
# The most commonly used submission data directory cloning command that copies
# it from the parent scope working directory.
#
-clone_data = cp --no-cleanup -r ../$data_dir ./
-clone_data_clean = cp --no-cleanup -r ../$data_dir ./ &$data_dir/***
+clone_data = [cmdline] cp --no-cleanup -r ../$data_dir ./
+clone_data_clean = [cmdline] cp --no-cleanup -r ../$data_dir ./ &$data_dir/***
# Clones the original submission data directory.
#
-clone_root_data = cp --no-cleanup -r $root_data_dir ./
-clone_root_data_clean = cp --no-cleanup -r $root_data_dir ./ &$data_dir/***
+clone_root_data = [cmdline] cp --no-cleanup -r $root_data_dir ./
+clone_root_data_clean = [cmdline] cp --no-cleanup -r $root_data_dir ./ &$data_dir/***
diff --git a/tests/load/1/math/libexp-+2-1.2+1.tar.gz b/tests/load/1/math/libexp-+2-1.2+1.tar.gz
index 5beeb84..b223d9f 100644
--- a/tests/load/1/math/libexp-+2-1.2+1.tar.gz
+++ b/tests/load/1/math/libexp-+2-1.2+1.tar.gz
Binary files differ
diff --git a/tests/load/1/math/libfoo-+0-X.Y.tar.gz b/tests/load/1/math/libfoo-+0-X.Y.tar.gz
index 6867d4f..95364bb 100644
--- a/tests/load/1/math/libfoo-+0-X.Y.tar.gz
+++ b/tests/load/1/math/libfoo-+0-X.Y.tar.gz
Binary files differ
diff --git a/tests/load/1/math/libfoo-1.0.tar.gz b/tests/load/1/math/libfoo-1.0.tar.gz
index 2d445ec..3f23ab9 100644
--- a/tests/load/1/math/libfoo-1.0.tar.gz
+++ b/tests/load/1/math/libfoo-1.0.tar.gz
Binary files differ
diff --git a/tests/load/1/math/libfoo-1.2.4+1.tar.gz b/tests/load/1/math/libfoo-1.2.4+1.tar.gz
index 74678eb..db22a19 100644
--- a/tests/load/1/math/libfoo-1.2.4+1.tar.gz
+++ b/tests/load/1/math/libfoo-1.2.4+1.tar.gz
Binary files differ
diff --git a/tests/load/1/math/libfoo-benchmarks-1.2.4.tar.gz b/tests/load/1/math/libfoo-benchmarks-1.2.4.tar.gz
index 391eb6f..f1c9ba0 100644
--- a/tests/load/1/math/libfoo-benchmarks-1.2.4.tar.gz
+++ b/tests/load/1/math/libfoo-benchmarks-1.2.4.tar.gz
Binary files differ
diff --git a/tests/load/1/math/libfoo-examples-1.2.4.tar.gz b/tests/load/1/math/libfoo-examples-1.2.4.tar.gz
index eac5190..00164e6 100644
--- a/tests/load/1/math/libfoo-examples-1.2.4.tar.gz
+++ b/tests/load/1/math/libfoo-examples-1.2.4.tar.gz
Binary files differ
diff --git a/tests/load/1/math/libfoo-tests-1.2.4.tar.gz b/tests/load/1/math/libfoo-tests-1.2.4.tar.gz
index 223e24d..84a7913 100644
--- a/tests/load/1/math/libfoo-tests-1.2.4.tar.gz
+++ b/tests/load/1/math/libfoo-tests-1.2.4.tar.gz
Binary files differ
diff --git a/tests/load/1/math/libpq-0.tar.gz b/tests/load/1/math/libpq-0.tar.gz
index a689660..d4beb18 100644
--- a/tests/load/1/math/libpq-0.tar.gz
+++ b/tests/load/1/math/libpq-0.tar.gz
Binary files differ
diff --git a/tests/load/1/math/libstudxml-1.0.0+1.tar.gz b/tests/load/1/math/libstudxml-1.0.0+1.tar.gz
index 41c9637..dcf0ee5 100644
--- a/tests/load/1/math/libstudxml-1.0.0+1.tar.gz
+++ b/tests/load/1/math/libstudxml-1.0.0+1.tar.gz
Binary files differ
diff --git a/tests/load/1/math/packages.manifest b/tests/load/1/math/packages.manifest
index ea37e2a..574370a 100644
--- a/tests/load/1/math/packages.manifest
+++ b/tests/load/1/math/packages.manifest
@@ -1,5 +1,5 @@
: 1
-sha256sum: b85ba3a0ba45b98e1fbb2507f199bc4b218a4a413ec6ba4094e214a7507490a2
+sha256sum: 521d17cbd396275aa9eb9b00d456beaaaabae1c004eff6de712bb615c18bb59b
:
name: libexp
version: +2-1.2+1
@@ -19,15 +19,23 @@ builds: default legacy
build-include: windows**d/x86_64**
build-include: windows-vc_13**
build-exclude: **; Only supported on Windows.
+bootstrap-build:\
+project = libexp
+
+\
location: libexp-+2-1.2+1.tar.gz
-sha256sum: 317c8c6f45d9dfdfdef3a823411920cecd51729c7c4f58f9a0b0bbd681c07bd6
+sha256sum: d90cfe583890cd0c05cdfc204e69dd3b986c2da49851f7a87fa0ca870788ff79
:
name: libfoo
version: +0-X.Y
summary: The Foo Library
license: MIT
+bootstrap-build:\
+project = libfoo
+
+\
location: libfoo-+0-X.Y.tar.gz
-sha256sum: c994fd49f051ab7fb25f3a4e68ca878e484c5d3c2cb132b37d41224b0621b618
+sha256sum: c25e5cae2f72664a3961c3ef88a82e67150c4bcc2a5e1fb4d250e621c5574187
:
name: libfoo
version: 1.0
@@ -37,8 +45,12 @@ build-email: foo-builds@example.com
builds: default legacy; Stable configurations only.
builds: -32; 64-bit targets only
builds: &msvc_13_up; Not too old MSVC.
+bootstrap-build:\
+project = libfoo
+
+\
location: libfoo-1.0.tar.gz
-sha256sum: e89c6d746f8b1ea3ec58d294946d2f683d133438d2ac8c88549ba24c19627e76
+sha256sum: 7382152bac5b4ce10215a5ecd6c94c490d0efc007031d3b03f407d068b74e624
:
name: libfoo
version: 1.2.4+1
@@ -48,24 +60,39 @@ license: LGPLv2, MIT; If using with GNU TLS.
license: BSD; If using with OpenSSL.
topics: math library, math API, libbaz fork
keywords: c++ foo math best
-description: \
+description:\
A modern C++ library with easy to use linear algebra and lot of optimization
tools.
There are over 100 functions in total with an extensive test suite. The API is
-similar to ~~mathlab~~ **MATLAB**.
+similar to ~~mathlab~~ **MATLAB**.[^mathlab]
Useful for conversion of research code into production environments.
+[^mathlab]: MATLAB Capabilities: TODO
\
description-type: text/markdown
-changes: \
-1.2.4+1
+package-description:\
+This project builds and defines the build2 package for the libfoo library.
+
+A modern C++ library with easy to use linear algebra and lot of optimization
+tools.
+
+There are over 100 functions in total with an extensive test suite. The API is
+similar to ~~mathlab~~ **MATLAB**.[^mathlab]
+
+Useful for conversion of research code into production environments.
+[^mathlab]: MATLAB Capabilities: TODO
+\
+package-description-type: text/markdown
+changes:\
+**1.2.4+1**
* applied patch for critical bug-219
* regenerated documentation
-1.2.4
+**1.2.4**
* test suite extended significantly
\
+changes-type: text/markdown
url: http://www.example.com/foo/; Project home page.
doc-url: http://www.example.org/projects/libfoo/man.xhtml; Documentation page.
src-url: http://scm.example.com/?p=odb/libodb.git\;a=tree; Source tree url.
@@ -74,47 +101,94 @@ email: foo-users@example.com; Public mailing list. Read FAQ before posting.
package-email: pack@example.com; Current packager.
depends: libmisc < 1.1 | libmisc > 2.3.0+0; Crashes with 1.1.0-2.3.0.
depends: libexp >= 1.0
-depends: ? libstudxml | libexpat; The newer the better.
+depends: libstudxml ? ($cxx.target.class == 'windows') | libexpat ?\
+ ($cxx.target.class != 'windows'); The newer the better.
requires: linux | windows | macosx; Symbian support is coming.
requires: c++11
requires: ? ; libc++ standard library if using Clang on Mac OS X.
-requires: ? vc++ >= 12.0; Only if using VC++ on Windows.
-tests: libfoo-tests == 1.2.4
+requires: ; X11 libs.
+requires: ? ($windows); Only 64-bit.
+requires: x86_64 ? ; Only if on Windows.
+requires: * vc++ >= 12.0 ? (windows); Only if using VC++ on Windows.
+requires: host
+tests: * libfoo-tests == 1.2.4 ? (!$defined(config.libfoo_tests.test))\
+ config.libfoo_tests.test=libfoo
examples: libfoo-examples
benchmarks: libfoo-benchmarks > 0.0.1
+builds: all
+network-build-include: windows-vc_14d/x86_64-microsoft-win32-msvc14.0
+network-build-exclude: **
+network-build-config: config.libfoo.network=true; Enable networking API.
+cache-builds: default
+cache-builds: -linux
+cache-build-include: windows-vc_14d/x86_64-microsoft-win32-msvc14.0
+cache-build-exclude: **
+cache-build-config:\
+config.libfoo.cache=true
+config.libfoo.buffer=4096
+;
+Enable caching.
+\
+bootstrap-build:\
+project = libfoo
+
+\
+root-build:\
+config [bool] config.libfoo.network ?= false
+
+config [bool] config.libfoo.cache ?= false
+config [uint64] config.libfoo.buffer ?= 1024
+
+\
location: libfoo-1.2.4+1.tar.gz
-sha256sum: c02b6033107387e05f48aa62ee6498152c967deb0e91a62f1e618fe9fd1bc644
+sha256sum: ffce9d3e3ca9899d3fd6da1f6b93c07cce2c3f6b7004948b59757dae420f801b
:
name: libfoo-benchmarks
version: 1.2.4
summary: The Foo Math Library benchmarks
license: MIT
builds: 64; Fails building for 32 bits.
+bootstrap-build:\
+project = libfoo-benchmarks
+
+\
location: libfoo-benchmarks-1.2.4.tar.gz
-sha256sum: ba664343db5b9bd574450175834b0dd39d038dcff7387477b6eff0d5783a8ac4
+sha256sum: 8392db99b1ea0c78fe2c73d8c0ae35f8a31d798c8ed26ebf09b4bf557b4e3ce0
:
name: libfoo-examples
version: 1.2.4
summary: The Foo Math Library examples
license: MIT
builds: 64; Fails building for 32 bits.
+bootstrap-build:\
+project = libfoo-examples
+
+\
location: libfoo-examples-1.2.4.tar.gz
-sha256sum: 1343d1826c3ae5446ad965bc9aa7b1586e4238c7736c344e63a4a6bae3d57a88
+sha256sum: de1bf595994a63361262727594de94edbd77fff8234066da74672e44eb4349f2
:
name: libfoo-tests
version: 1.2.4
summary: The Foo Math Library tests
license: MIT
builds: 64; Fails building for 32 bits.
+bootstrap-build:\
+project = libfoo-tests
+
+\
+root-build:\
+config [strings] config.libfoo_tests.test
+
+\
location: libfoo-tests-1.2.4.tar.gz
-sha256sum: c5c0520b4e612fa2f8948c42824f3e199926c2395bf2c2f898e83f9eb19261a4
+sha256sum: 29a97b3356c42602dd81ee2766c242f8974b0a92d8560cb107dd464655d3d527
:
name: libpq
version: 0
summary: PostgreSQL C API client library
license: PostgreSQL License; Permissive free software license.
keywords: postgresql database client library c
-description: \
+description:\
PostgreSQL is an object-relational SQL database management system with libpq
being its C client library. Applications can use this library to pass queries
to the PostgreSQL backend server and to receive the results of those queries
@@ -142,8 +216,12 @@ package-url: https://git.build2.org/cgit/packaging/postgresql/
email: pgsql-general@postgresql.org; Mailing list.
package-email: packaging@build2.org; Mailing list.
requires: build2 >= 0.4.0
+bootstrap-build:\
+project = libpq
+
+\
location: libpq-0.tar.gz
-sha256sum: 75958d000b641c588cdf48e3574584e070104097702dccffdad77947e37f9bd0
+sha256sum: 2aee2bb1d58d51c657903bbab6253c5d4566b6f3f299ba118da24c7756caebfd
:
name: libstudxml
version: 1.0.0+1
@@ -158,5 +236,9 @@ build-warning-email: studxml-warnings@example.com
build-error-email: studxml-errors@example.com
depends: libexpat >= 2.0.0
depends: libgenx
+bootstrap-build:\
+project = libstudxml
+
+\
location: libstudxml-1.0.0+1.tar.gz
-sha256sum: 1833906dd93ccc0cda832d6a1b3ef9ed7877bb9958b46d9b2666033d4a7919c9
+sha256sum: aa52d5b49ee1bad825cd6bca554f72636e8451f93c74f9a443bafce3c2bf82c0
diff --git a/tests/load/1/math/repositories.manifest b/tests/load/1/math/repositories.manifest
index c0293c4..177fcad 100644
--- a/tests/load/1/math/repositories.manifest
+++ b/tests/load/1/math/repositories.manifest
@@ -8,7 +8,7 @@ role: prerequisite
#
email: repoman@dev.cppget.org
summary: Math C++ package repository
-description: \
+description:\
This is the awesome C++ package repository full of remarkable algorithms and
APIs.
\
diff --git a/tests/load/1/misc/packages.manifest b/tests/load/1/misc/packages.manifest
index f02ce01..86620dd 100644
--- a/tests/load/1/misc/packages.manifest
+++ b/tests/load/1/misc/packages.manifest
@@ -15,6 +15,7 @@ depends: libfoo
depends: libmath >= 2.0.0
requires: linux | windows | macosx
changes: some changes
+changes-type: text/plain
location: libbar-2.4.0+3.tar.gz
sha256sum: 70ccba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab93
:
@@ -25,7 +26,7 @@ license: MIT
url: http://www.example.com/foo/
email: foo-users@example.com
location: libfoo-1.0.tar.gz
-sha256sum: 754cba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab93
+sha256sum: e89c6d746f8b1ea3ec58d294946d2f683d133438d2ac8c88549ba24c19627e76
:
name: libfoo
version: 0.1
@@ -43,7 +44,7 @@ license: MIT
url: http://www.example.com/foo/
email: foo-users@example.com
location: libfoo-1.2.4+1.tar.gz
-sha256sum: 35ccba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab93
+sha256sum: 6692a487e0908598e36bdeb9c25ed1e4a35bb99587dbc475807d314fa0719ac6
:
name: libfoo
version: 1.2.4+2
diff --git a/tests/load/1/stable/libfoo-1.0.tar.gz b/tests/load/1/stable/libfoo-1.0.tar.gz
index 2d445ec..3f23ab9 100644
--- a/tests/load/1/stable/libfoo-1.0.tar.gz
+++ b/tests/load/1/stable/libfoo-1.0.tar.gz
Binary files differ
diff --git a/tests/load/1/stable/libfoo-1.2.2-alpha.1.tar.gz b/tests/load/1/stable/libfoo-1.2.2-alpha.1.tar.gz
index aa5665e..1dfff70 100644
--- a/tests/load/1/stable/libfoo-1.2.2-alpha.1.tar.gz
+++ b/tests/load/1/stable/libfoo-1.2.2-alpha.1.tar.gz
Binary files differ
diff --git a/tests/load/1/stable/libfoo-1.2.2.tar.gz b/tests/load/1/stable/libfoo-1.2.2.tar.gz
index 94aca23..22eb89b 100644
--- a/tests/load/1/stable/libfoo-1.2.2.tar.gz
+++ b/tests/load/1/stable/libfoo-1.2.2.tar.gz
Binary files differ
diff --git a/tests/load/1/stable/libfoo-1.2.3+4.tar.gz b/tests/load/1/stable/libfoo-1.2.3+4.tar.gz
index 254f355..76439b0 100644
--- a/tests/load/1/stable/libfoo-1.2.3+4.tar.gz
+++ b/tests/load/1/stable/libfoo-1.2.3+4.tar.gz
Binary files differ
diff --git a/tests/load/1/stable/libfoo-1.2.4.tar.gz b/tests/load/1/stable/libfoo-1.2.4.tar.gz
index dc64431..da70cd3 100644
--- a/tests/load/1/stable/libfoo-1.2.4.tar.gz
+++ b/tests/load/1/stable/libfoo-1.2.4.tar.gz
Binary files differ
diff --git a/tests/load/1/stable/packages.manifest b/tests/load/1/stable/packages.manifest
index 85109f6..f15ab90 100644
--- a/tests/load/1/stable/packages.manifest
+++ b/tests/load/1/stable/packages.manifest
@@ -1,5 +1,5 @@
: 1
-sha256sum: 17ae44db4b176fc7629fe9a6a5e43aa9ab4da0fda2b93f3b1fe6e993ba92cd8b
+sha256sum: 2fe1a38177da668bb79d1912ecb5e935e0a77c984b9db522c9321ca205b2863b
:
name: libfoo
version: 1.0
@@ -9,8 +9,12 @@ build-email: foo-builds@example.com
builds: default legacy; Stable configurations only.
builds: -32; 64-bit targets only
builds: &msvc_13_up; Not too old MSVC.
+bootstrap-build:\
+project = libfoo
+
+\
location: libfoo-1.0.tar.gz
-sha256sum: e89c6d746f8b1ea3ec58d294946d2f683d133438d2ac8c88549ba24c19627e76
+sha256sum: 7382152bac5b4ce10215a5ecd6c94c490d0efc007031d3b03f407d068b74e624
:
name: libfoo
version: 1.2.2-alpha.1
@@ -23,8 +27,12 @@ email: foo-users@example.com
depends: libmisc [0.1 2.0-) | libmisc [2.0 5.0]
depends: libgenx (0.2 3.0)
depends: libexpat < 5.2 | libexpat (1 5.1]
+bootstrap-build:\
+project = libfoo
+
+\
location: libfoo-1.2.2-alpha.1.tar.gz
-sha256sum: f5d3e9e6e8f9621a638b1375d31f0eb50e6279d8066170b25da21e84198cfd82
+sha256sum: 71321f6616036380ac5c9c5dc81efa04b23577ef9dc18f1ce413587bb57677c9
:
name: libfoo
version: 1.2.2
@@ -35,8 +43,12 @@ url: http://www.example.com/foo/
email: foo-users@example.com
depends: libbar <= 2.4.0
depends: libexp == +2-1.2
+bootstrap-build:\
+project = libfoo
+
+\
location: libfoo-1.2.2.tar.gz
-sha256sum: 088068ea3d69542a153f829cf836013374763148fba0a43d8047974f58b5efd7
+sha256sum: 75d2a7d3eec62d63afd3d3a84d91bd02b05ecb16cd0907d5b0db1fc654e3753f
:
name: libfoo
version: 1.2.3+4
@@ -47,8 +59,12 @@ keywords: c++ foo
url: http://www.example.com/foo/
email: foo-users@example.com
depends: libmisc >= 2.0.0
+bootstrap-build:\
+project = libfoo
+
+\
location: libfoo-1.2.3+4.tar.gz
-sha256sum: f2ebecac6cac8addd7c623bc1becf055e76b13a0d2dd385832b92c38c58956d8
+sha256sum: 24c53899bd4dbfdde6a727e07724984bfb4ca7f20142291c40e30304f15434c3
:
name: libfoo
version: 1.2.4
@@ -59,8 +75,13 @@ description: Very good foo library.
description-type: text/plain
changes: some changes 1
changes: some changes 2
+changes-type: text/plain
url: http://www.example.com/foo/
email: foo-users@example.com
depends: libmisc >= 2.0.0
+bootstrap-build:\
+project = libfoo
+
+\
location: libfoo-1.2.4.tar.gz
-sha256sum: aa1606323bfc59b70de642629dc5d8318cc5348e3646f90ed89406d975db1e1d
+sha256sum: 98f80ca0cd1c053fd45ab37f72a6a31f1a0304747c636822df8d573420284642
diff --git a/tests/load/1/stable/repositories.manifest b/tests/load/1/stable/repositories.manifest
index 49a0685..1907ed6 100644
--- a/tests/load/1/stable/repositories.manifest
+++ b/tests/load/1/stable/repositories.manifest
@@ -14,35 +14,36 @@ role: prerequisite
email: repoman@dev.cppget.org; public mailing list
summary: General C++ package stable repository
description: This is the awesome C++ package repository full of exciting stuff.
-certificate: \
+certificate:\
-----BEGIN CERTIFICATE-----
-MI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r2AfQbdNsAF6EMAfEfCDC9yAa
+uzB5Dc+wpqWvsPp+ohiroJqC99hwmfzPMxAYTB2cmEqmVHGSwqoC9bn7fI59t9l6
+N2fynRhenLookYfy7jqb4a6O702fAHefGD6teHYbTpg6dwlVY/PLI+T1SPSisH3k
+jS2WV03FK8aTNGe7E2RBxH2smca0Z1oaJ9RaluZ9HIRrw434m9+z01DL5w0EWRpC
+qa62iYSgGFcxkXRwb8VeWPtGb9/CPXtVFDtW19mOeeHqr8/xVOCjR2MCKAsxLazl
+yGQhAUu19n2y7vuj4FOEeJ1mwaaUyu2MPqZWZ3loM14muk/ZJfFsJRfdHg7+hSel
+alE0ujce0to39AApGZRIwozut17hYjl5m3314+46KaNuxRmo2xw5wNl8UslEgQYC
+fK3CY+6p9n64QJXnE+2+KGrDuYYXQP3TClHLv/IftgAlf6cZxu4RsNdvUsU15M0J
+BGQjsz7h0bI3fw==
-----END CERTIFICATE-----
\ \ No newline at end of file
diff --git a/tests/load/1/stable/signature.manifest b/tests/load/1/stable/signature.manifest
index 45d160e..bb18e13 100644
--- a/tests/load/1/stable/signature.manifest
+++ b/tests/load/1/stable/signature.manifest
@@ -1,13 +1,13 @@
: 1
-sha256sum: f4fadfdc3586c8b94dce871328625f43636e43b4a073c4ee577af41780eeb8f3
-signature: \
-J40HIcLQQI+1rzXzRo0OOJRk1NTmLNNFk+RUi/NM7M6vUFjjq4nIABR+bg8RdenpybVASTyJYNTL
-/pLStEF+hg5SnufsYvpJJmstBMY4JXAcOfngUz4UVe8QS9zu3YGL5y/MBnYU+SKBbHnjRsTbRgak
-LjoVbTKH6kkPkZ8MZMXzo/0un2L4w4uZLNDeqjJBg2OFztPIV3RYzBdCcxJ+k20UJjVfmNQWaBki
-eaXVIsOxQ1bqWfg5uvACYvSgAIB+6ZIQFf8VYAJvnSieTswyWTxBXvj0D6aNnksQisaSbsRUuVb/
-zKYNWDrZFOjlNLEt+3bv3WQ5r0RqeRu7x9tdlXMfX/z9qu3SRe/mmaE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S7ch4G9XzqtsylzMIeE=
\
diff --git a/tests/load/cert b/tests/load/cert
index 893d84d..c2da7fa 100755
--- a/tests/load/cert
+++ b/tests/load/cert
@@ -6,17 +6,18 @@
# Copy cert.pem content to the certificate value of the following manifest
# files:
-# 1/stable/repositories
-# pkg/1/dev.cppget.org/signed/repositories
+# 1/stable/repositories.manifest
+# pkg/1/dev.cppget.org/signed/repositories.manifest
#
-openssl req -x509 -new -key key.pem -days 1825 -config openssl.cnf > cert.pem
+openssl req -x509 -new -key key.pem -days 3650 -config openssl.cnf > cert.pem
# To regenerate the packages and signature manifest files run:
#
-# ../../../bpkg/bpkg/bpkg rep-create 1/stable --key key.pem
-# ../../../bpkg/bpkg/bpkg rep-create pkg/1/dev.cppget.org/signed --key key.pem
+# bpkg rep-create 1/math
+# bpkg rep-create 1/stable --key key.pem
+# bpkg rep-create pkg/1/dev.cppget.org/signed --key key.pem
#
# Update certificate fingerprint in loadtab for dev.cppget.org/signed
# repository. To print the fingerprint run:
#
-# ../../../bpkg/bpkg/bpkg rep-info --cert-fingerprint pkg/1/dev.cppget.org/signed/
+# bpkg rep-info --cert-fingerprint pkg/1/dev.cppget.org/signed/
diff --git a/tests/load/cert.pem b/tests/load/cert.pem
index dc7c756..13a55f4 100644
--- a/tests/load/cert.pem
+++ b/tests/load/cert.pem
@@ -1,30 +1,31 @@
-----BEGIN CERTIFICATE-----
-MIIFOzCCAyOgAwIBAgIJAIsajMs6HOxHMA0GCSqGSIb3DQEBCwUAMDcxFzAVBgNV
-BAoMDkNvZGUgU3ludGhlc2lzMRwwGgYDVQQDDBNuYW1lOmRldi5jcHBnZXQub3Jn
-MB4XDTE3MDcwNzA2MzgzNFoXDTIyMDcwNjA2MzgzNFowNzEXMBUGA1UECgwOQ29k
-ZSBTeW50aGVzaXMxHDAaBgNVBAMME25hbWU6ZGV2LmNwcGdldC5vcmcwggIiMA0G
-CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDK8NqNbQckQpv9B3hBRjnT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ZWZ3loM14muk/ZJfFsJRfdHg7+hSel
+alE0ujce0to39AApGZRIwozut17hYjl5m3314+46KaNuxRmo2xw5wNl8UslEgQYC
+fK3CY+6p9n64QJXnE+2+KGrDuYYXQP3TClHLv/IftgAlf6cZxu4RsNdvUsU15M0J
+BGQjsz7h0bI3fw==
-----END CERTIFICATE-----
diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx
index 8192827..0f2c8de 100644
--- a/tests/load/driver.cxx
+++ b/tests/load/driver.cxx
@@ -3,15 +3,14 @@
#include <iostream>
#include <exception>
-#include <algorithm> // sort(), find()
#include <odb/session.hxx>
#include <odb/transaction.hxx>
#include <odb/pgsql/database.hxx>
-#include <libbutl/process.mxx>
-#include <libbutl/filesystem.mxx>
+#include <libbutl/process.hxx>
+#include <libbutl/filesystem.hxx>
#include <libbrep/types.hxx>
#include <libbrep/utility.hxx>
@@ -19,6 +18,9 @@
#include <libbrep/package.hxx>
#include <libbrep/package-odb.hxx>
+#undef NDEBUG
+#include <cassert>
+
using std::cerr;
using std::endl;
@@ -27,7 +29,6 @@ using namespace butl;
using namespace brep;
using labels = small_vector<string, 5>;
-using req_alts = small_vector<string, 1>;
static const path packages ("packages.manifest");
static const path repositories ("repositories.manifest");
@@ -37,7 +38,7 @@ check_location (shared_ptr<package>& p)
{
if (p->internal ())
return p->location && *p->location ==
- path (p->name.string () + "-" + p->version.string () + ".tar.gz");
+ path (p->name.string () + '-' + p->version.string () + ".tar.gz");
else
return !p->location;
}
@@ -56,7 +57,7 @@ check_external (const package& p)
!p.internal () &&
p.other_repositories.size () > 0 &&
p.priority == priority () &&
- p.changes.empty () &&
+ !p.changes &&
p.license_alternatives.empty () &&
p.dependencies.empty () &&
p.requirements.empty () &&
@@ -210,7 +211,7 @@ dep (const char* n, optional<version_constraint> c)
static inline version
dep_ver (const char* v)
{
- return version (v, false /* fold_zero_revision */);
+ return version (v, version::none);
}
static void
@@ -267,7 +268,7 @@ test_git_repos (const cstrings& loader_args,
assert (p->dependencies.size () == 1);
assert (p->dependencies[0].size () == 1);
- assert (p->dependencies[0][0] ==
+ assert (p->dependencies[0][0][0] ==
dep ("libmisc",
version_constraint (
dep_ver ("1.0"), false, dep_ver ("1.0"), false)));
@@ -383,7 +384,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpvxy->other_repositories.empty ());
assert (fpvxy->priority == priority::low);
- assert (fpvxy->changes.empty ());
+ assert (!fpvxy->changes);
assert (fpvxy->license_alternatives.size () == 1);
assert (fpvxy->license_alternatives[0].size () == 1);
@@ -395,7 +396,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (check_location (fpvxy));
assert (fpvxy->sha256sum && *fpvxy->sha256sum ==
- "c994fd49f051ab7fb25f3a4e68ca878e484c5d3c2cb132b37d41224b0621b618");
+ "c25e5cae2f72664a3961c3ef88a82e67150c4bcc2a5e1fb4d250e621c5574187");
assert (fpvxy->buildable);
@@ -419,7 +420,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv1->other_repositories[1].load () == cr);
assert (fpv1->priority == priority::low);
- assert (fpv1->changes.empty ());
+ assert (!fpv1->changes);
assert (fpv1->license_alternatives.size () == 1);
assert (fpv1->license_alternatives[0].size () == 1);
@@ -431,7 +432,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (check_location (fpv1));
assert (fpv1->sha256sum && *fpv1->sha256sum ==
- "e89c6d746f8b1ea3ec58d294946d2f683d133438d2ac8c88549ba24c19627e76");
+ "7382152bac5b4ce10215a5ecd6c94c490d0efc007031d3b03f407d068b74e624");
assert (fpv1->buildable);
@@ -453,7 +454,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv2->internal_repository.load () == sr);
assert (fpv2->other_repositories.empty ());
assert (fpv2->priority == priority::low);
- assert (fpv2->changes.empty ());
+ assert (!fpv2->changes);
assert (fpv2->license_alternatives.size () == 1);
assert (fpv2->license_alternatives[0].size () == 1);
@@ -463,12 +464,12 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv2->dependencies[0].size () == 1);
assert (fpv2->dependencies[1].size () == 1);
- assert (fpv2->dependencies[0][0] ==
+ assert (fpv2->dependencies[0][0][0] ==
dep ("libbar",
version_constraint (
nullopt, true, dep_ver ("2.4.0"), false)));
- assert (fpv2->dependencies[1][0] ==
+ assert (fpv2->dependencies[1][0][0] ==
dep ("libexp",
version_constraint (
dep_ver ("+2-1.2"), false, dep_ver ("+2-1.2"), false)));
@@ -476,7 +477,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (check_location (fpv2));
assert (fpv2->sha256sum && *fpv2->sha256sum ==
- "088068ea3d69542a153f829cf836013374763148fba0a43d8047974f58b5efd7");
+ "75d2a7d3eec62d63afd3d3a84d91bd02b05ecb16cd0907d5b0db1fc654e3753f");
assert (!fpv2->buildable);
@@ -499,7 +500,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv2a->internal_repository.load () == sr);
assert (fpv2a->other_repositories.empty ());
assert (fpv2a->priority == priority::security);
- assert (fpv2a->changes.empty ());
+ assert (!fpv2a->changes);
assert (fpv2a->license_alternatives.size () == 1);
assert (fpv2a->license_alternatives[0].size () == 1);
@@ -510,27 +511,27 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv2a->dependencies[1].size () == 1);
assert (fpv2a->dependencies[2].size () == 2);
- assert (fpv2a->dependencies[0][0] ==
+ assert (fpv2a->dependencies[0][0][0] ==
dep ("libmisc",
version_constraint (
dep_ver ("0.1"), false, dep_ver ("2.0.0-"), true)));
- assert (fpv2a->dependencies[0][1] ==
+ assert (fpv2a->dependencies[0][1][0] ==
dep ("libmisc",
version_constraint (
dep_ver ("2.0"), false, dep_ver ("5.0"), false)));
- assert (fpv2a->dependencies[1][0] ==
+ assert (fpv2a->dependencies[1][0][0] ==
dep ("libgenx",
version_constraint (
dep_ver ("0.2"), true, dep_ver ("3.0"), true)));
- assert (fpv2a->dependencies[2][0] ==
+ assert (fpv2a->dependencies[2][0][0] ==
dep ("libexpat",
version_constraint (
nullopt, true, dep_ver ("5.2"), true)));
- assert (fpv2a->dependencies[2][1] ==
+ assert (fpv2a->dependencies[2][1][0] ==
dep ("libexpat",
version_constraint (
dep_ver ("1"), true, dep_ver ("5.1"), false)));
@@ -540,7 +541,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (check_location (fpv2a));
assert (fpv2a->sha256sum && *fpv2a->sha256sum ==
- "f5d3e9e6e8f9621a638b1375d31f0eb50e6279d8066170b25da21e84198cfd82");
+ "71321f6616036380ac5c9c5dc81efa04b23577ef9dc18f1ce413587bb57677c9");
assert (!fpv2a->buildable);
@@ -562,7 +563,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv3->other_repositories.empty ());
assert (fpv3->priority == priority::medium);
- assert (fpv3->changes.empty ());
+ assert (!fpv3->changes);
assert (fpv3->license_alternatives.size () == 1);
assert (fpv3->license_alternatives[0].size () == 1);
@@ -570,7 +571,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv3->dependencies.size () == 1);
assert (fpv3->dependencies[0].size () == 1);
- assert (fpv3->dependencies[0][0] ==
+ assert (fpv3->dependencies[0][0][0] ==
dep ("libmisc",
version_constraint (
dep_ver ("2.0.0"), false, nullopt, true)));
@@ -578,7 +579,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (check_location (fpv3));
assert (fpv3->sha256sum && *fpv3->sha256sum ==
- "f2ebecac6cac8addd7c623bc1becf055e76b13a0d2dd385832b92c38c58956d8");
+ "24c53899bd4dbfdde6a727e07724984bfb4ca7f20142291c40e30304f15434c3");
assert (!fpv3->buildable);
@@ -590,7 +591,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv4->summary == "The Foo Library");
assert (fpv4->keywords == labels ({"c++", "foo"}));
- assert (*fpv4->description == "Very good foo library.");
+ assert (fpv4->description->text == "Very good foo library.");
assert (fpv4->url && fpv4->url->string () == "http://www.example.com/foo/");
assert (!fpv4->package_url);
assert (fpv4->email && *fpv4->email == "foo-users@example.com");
@@ -599,7 +600,10 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv4->internal_repository.load () == sr);
assert (fpv4->other_repositories.empty ());
assert (fpv4->priority == priority::low);
- assert (fpv4->changes == "some changes 1\n\nsome changes 2");
+
+ assert (fpv4->changes &&
+ fpv4->changes->text == "some changes 1\n\nsome changes 2" &&
+ fpv4->changes->type == text_type::plain);
assert (fpv4->license_alternatives.size () == 1);
assert (fpv4->license_alternatives[0].comment ==
@@ -609,7 +613,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv4->dependencies.size () == 1);
assert (fpv4->dependencies[0].size () == 1);
- assert (fpv4->dependencies[0][0] ==
+ assert (fpv4->dependencies[0][0][0] ==
dep ("libmisc",
version_constraint (
dep_ver ("2.0.0"), false, nullopt, true)));
@@ -617,7 +621,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (check_location (fpv4));
assert (fpv4->sha256sum && *fpv4->sha256sum ==
- "aa1606323bfc59b70de642629dc5d8318cc5348e3646f90ed89406d975db1e1d");
+ "98f80ca0cd1c053fd45ab37f72a6a31f1a0304747c636822df8d573420284642");
assert (!fpv4->buildable);
@@ -685,7 +689,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (xpv->internal_repository.load () == mr);
assert (xpv->other_repositories.empty ());
assert (xpv->priority == priority::low);
- assert (xpv->changes.empty ());
+ assert (!xpv->changes);
assert (xpv->license_alternatives.size () == 1);
assert (xpv->license_alternatives[0].size () == 1);
@@ -693,20 +697,20 @@ test_pkg_repos (const cstrings& loader_args,
assert (xpv->dependencies.size () == 2);
assert (xpv->dependencies[0].size () == 1);
- assert (xpv->dependencies[0][0] ==
+ assert (xpv->dependencies[0][0][0] ==
dep ("libexpat",
version_constraint (
dep_ver ("2.0.0"), false, nullopt, true)));
assert (xpv->dependencies[1].size () == 1);
- assert (xpv->dependencies[1][0] == dep ("libgenx", nullopt));
+ assert (xpv->dependencies[1][0][0] == dep ("libgenx", nullopt));
assert (xpv->requirements.empty ());
assert (check_location (xpv));
assert (xpv->sha256sum && *xpv->sha256sum ==
- "1833906dd93ccc0cda832d6a1b3ef9ed7877bb9958b46d9b2666033d4a7919c9");
+ "aa52d5b49ee1bad825cd6bca554f72636e8451f93c74f9a443bafce3c2bf82c0");
assert (xpv->buildable);
@@ -722,12 +726,28 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv5->topics ==
labels ({"math library", "math API", "libbaz fork"}));
assert (fpv5->keywords == labels ({"c++", "foo", "math", "best"}));
- assert (*fpv5->description ==
+
+ assert (fpv5->description->text ==
"A modern C++ library with easy to use linear algebra and lot "
"of optimization\ntools.\n\nThere are over 100 functions in "
"total with an extensive test suite. The API is\nsimilar to "
- "~~mathlab~~ **MATLAB**.\n\nUseful for conversion of research "
- "code into production environments.");
+ "~~mathlab~~ **MATLAB**.[^mathlab]\n\nUseful for conversion of "
+ "research code into production environments.\n"
+ "[^mathlab]: MATLAB Capabilities: TODO");
+
+ assert (fpv5->description->type == text_type::github_mark);
+
+ assert (fpv5->package_description->text ==
+ "This project builds and defines the build2 package for the "
+ "libfoo library.\n\n"
+ "A modern C++ library with easy to use linear algebra and lot "
+ "of optimization\ntools.\n\nThere are over 100 functions in "
+ "total with an extensive test suite. The API is\nsimilar to "
+ "~~mathlab~~ **MATLAB**.[^mathlab]\n\nUseful for conversion of "
+ "research code into production environments.\n"
+ "[^mathlab]: MATLAB Capabilities: TODO");
+
+ assert (fpv5->package_description->type == text_type::github_mark);
assert (fpv5->url && fpv5->url->string () == "http://www.example.com/foo/");
@@ -753,14 +773,16 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv5->priority.comment ==
"Critical bug fixes, performance improvement.");
- const char ch[] = R"DLM(1.2.4+1
+ const char ch[] = R"DLM(**1.2.4+1**
* applied patch for critical bug-219
* regenerated documentation
-1.2.4
+**1.2.4**
* test suite extended significantly)DLM";
- assert (fpv5->changes == ch);
+ assert (fpv5->changes &&
+ fpv5->changes->text == ch &&
+ fpv5->changes->type == text_type::github_mark);
assert (fpv5->license_alternatives.size () == 2);
assert (fpv5->license_alternatives[0].comment ==
@@ -778,12 +800,12 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv5->dependencies[0].comment ==
"Crashes with 1.1.0-2.3.0.");
- assert (fpv5->dependencies[0][0] ==
+ assert (fpv5->dependencies[0][0][0] ==
dep ("libmisc",
version_constraint (
nullopt, true, dep_ver ("1.1"), true)));
- assert (fpv5->dependencies[0][1] ==
+ assert (fpv5->dependencies[0][1][0] ==
dep ("libmisc",
version_constraint (
dep_ver ("2.3.0+0"), true, nullopt, true)));
@@ -791,7 +813,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv5->dependencies[1].size () == 1);
assert (fpv5->dependencies[1].comment.empty ());
- assert (fpv5->dependencies[1][0] ==
+ assert (fpv5->dependencies[1][0][0] ==
dep ("libexp",
version_constraint (
dep_ver ("1.0"), false, nullopt, true)));
@@ -799,33 +821,48 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpv5->dependencies[2].size () == 2);
assert (fpv5->dependencies[2].comment == "The newer the better.");
- assert (fpv5->dependencies[2][0] == dep ("libstudxml", nullopt));
- assert (fpv5->dependencies[2][1] == dep ("libexpat", nullopt));
+ assert (fpv5->dependencies[2][0][0] == dep ("libstudxml", nullopt));
+ assert (fpv5->dependencies[2][1][0] == dep ("libexpat", nullopt));
requirements& fpvr5 (fpv5->requirements);
- assert (fpvr5.size () == 4);
+ assert (fpvr5.size () == 8);
- assert (fpvr5[0] == req_alts ({"linux", "windows", "macosx"}));
- assert (!fpvr5[0].conditional);
+ assert (fpvr5[0][0][0] == "linux");
+ assert (fpvr5[0][1][0] == "windows");
+ assert (fpvr5[0][2][0] == "macosx");
assert (fpvr5[0].comment == "Symbian support is coming.");
- assert (fpvr5[1] == req_alts ({"c++11"}));
- assert (!fpvr5[1].conditional);
+ assert (fpvr5[1][0][0] == "c++11");
assert (fpvr5[1].comment.empty ());
- assert (fpvr5[2].empty ());
- assert (fpvr5[2].conditional);
+ assert (fpvr5[2][0][0] == "");
+ assert (fpvr5[2][0].enable && *fpvr5[2][0].enable == "");
assert (fpvr5[2].comment ==
"libc++ standard library if using Clang on Mac OS X.");
- assert (fpvr5[3] == req_alts ({"vc++ >= 12.0"}));
- assert (fpvr5[3].conditional);
- assert (fpvr5[3].comment == "Only if using VC++ on Windows.");
+ assert (fpvr5[3][0][0] == "");
+ assert (!fpvr5[3][0].enable);
+ assert (fpvr5[3].comment == "X11 libs.");
+
+ assert (fpvr5[4][0][0] == "");
+ assert (fpvr5[4][0].enable && *fpvr5[4][0].enable == "$windows");
+ assert (fpvr5[4].comment == "Only 64-bit.");
+
+ assert (fpvr5[5][0][0] == "x86_64");
+ assert (fpvr5[5][0].enable && *fpvr5[5][0].enable == "");
+ assert (fpvr5[5].comment == "Only if on Windows.");
+
+ assert (fpvr5[6][0][0] == "vc++ >= 12.0");
+ assert (fpvr5[6][0].enable && *fpvr5[6][0].enable == "windows");
+ assert (fpvr5[6].buildtime);
+ assert (fpvr5[6].comment == "Only if using VC++ on Windows.");
+
+ assert (fpvr5[7][0][0] == "host");
assert (check_location (fpv5));
assert (fpv5->sha256sum && *fpv5->sha256sum ==
- "c02b6033107387e05f48aa62ee6498152c967deb0e91a62f1e618fe9fd1bc644");
+ "ffce9d3e3ca9899d3fd6da1f6b93c07cce2c3f6b7004948b59757dae420f801b");
assert (fpv5->buildable);
@@ -841,7 +878,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (epv->project == "mathLab");
assert (epv->summary == "The exponent");
assert (epv->keywords == labels ({"mathlab", "c++", "exponent"}));
- assert (epv->description && *epv->description ==
+ assert (epv->description && epv->description->text ==
"The exponent math function.");
assert (epv->url && epv->url->string () == "http://exp.example.com");
assert (!epv->package_url);
@@ -852,7 +889,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (epv->internal_repository.load () == mr);
assert (epv->other_repositories.empty ());
assert (epv->priority == priority (priority::low));
- assert (epv->changes.empty ());
+ assert (!epv->changes);
assert (epv->license_alternatives.size () == 1);
assert (epv->license_alternatives[0].size () == 1);
@@ -860,10 +897,10 @@ test_pkg_repos (const cstrings& loader_args,
assert (epv->dependencies.size () == 2);
assert (epv->dependencies[0].size () == 1);
- assert (epv->dependencies[0][0] == dep ("libmisc", nullopt));
+ assert (epv->dependencies[0][0][0] == dep ("libmisc", nullopt));
assert (epv->dependencies[1].size () == 1);
- assert (epv->dependencies[1][0] ==
+ assert (epv->dependencies[1][0][0] ==
dep ("libpq",
version_constraint (
dep_ver ("9.0.0"), false, nullopt, true)));
@@ -884,7 +921,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (check_location (epv));
assert (epv->sha256sum && *epv->sha256sum ==
- "317c8c6f45d9dfdfdef3a823411920cecd51729c7c4f58f9a0b0bbd681c07bd6");
+ "d90cfe583890cd0c05cdfc204e69dd3b986c2da49851f7a87fa0ca870788ff79");
// Verify libpq package version.
//
diff --git a/tests/load/loadtab b/tests/load/loadtab
index b6ce020..e919a32 100644
--- a/tests/load/loadtab
+++ b/tests/load/loadtab
@@ -1,5 +1,5 @@
http://dev.cppget.org/1/stable stable cache:1/stable buildable:no
http://dev.cppget.org/1/math math cache:1/math
http://dev.cppget.org/1/testing testing cache:1/testing buildable:no
-http://dev.cppget.org/1/signed signed cache:pkg/1/dev.cppget.org/signed fingerprint:C3:EC:12:53:AD:64:41:0E:35:3A:9A:A6:EE:57:BF:E6:05:40:42:2B:FF:AF:2C:B0:99:AD:E9:4A:9C:48:40:22
+http://dev.cppget.org/1/signed signed cache:pkg/1/dev.cppget.org/signed fingerprint:40:DD:B7:AD:88:87:C1:7A:11:94:45:22:2B:A2:E7:B3:F6:DE:92:6C:A0:DB:4B:EB:34:94:85:7A:C1:24:9A:E8
http://dev.cppget.org/1/unsigned unsigned cache:pkg/1/dev.cppget.org/unsigned fingerprint:
diff --git a/tests/load/pkg/1/dev.cppget.org/signed/packages.manifest b/tests/load/pkg/1/dev.cppget.org/signed/packages.manifest
index 584c490..67d157f 100644
--- a/tests/load/pkg/1/dev.cppget.org/signed/packages.manifest
+++ b/tests/load/pkg/1/dev.cppget.org/signed/packages.manifest
@@ -1,2 +1,2 @@
: 1
-sha256sum: ab258d8d475c9dde36591df5f9c73bced79919ddec33408ef871025cbeab01d5
+sha256sum: 22e2ee564571d9fc9ac2748764ab45a3d64e717226dc41936a2197ef961751ac
diff --git a/tests/load/pkg/1/dev.cppget.org/signed/repositories.manifest b/tests/load/pkg/1/dev.cppget.org/signed/repositories.manifest
index ecd89f7..fd7a3a0 100644
--- a/tests/load/pkg/1/dev.cppget.org/signed/repositories.manifest
+++ b/tests/load/pkg/1/dev.cppget.org/signed/repositories.manifest
@@ -1,35 +1,36 @@
: 1
# Local repository manifest (this repository).
#
-certificate: \
+certificate:\
-----BEGIN CERTIFICATE-----
-MIIFOzCCAyOgAwIBAgIJAIsajMs6HOxHMA0GCSqGSIb3DQEBCwUAMDcxFzAVBgNV
-BAoMDkNvZGUgU3ludGhlc2lzMRwwGgYDVQQDDBNuYW1lOmRldi5jcHBnZXQub3Jn
-MB4XDTE3MDcwNzA2MzgzNFoXDTIyMDcwNjA2MzgzNFowNzEXMBUGA1UECgwOQ29k
-ZSBTeW50aGVzaXMxHDAaBgNVBAMME25hbWU6ZGV2LmNwcGdldC5vcmcwggIiMA0G
-CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDK8NqNbQckQpv9B3hBRjnTcpkgKq2e
-1HOFLQJxgS1TS2QfqUTKePpd10LbDgXOhI2iycKCf7Zv/uf3RE+VyQ/BthNUvQ0O
-bWPsEKo+DQOLPjqIaS+u2bmMXzCDjwjufbd9ruPY2PYRTBOsXgTL1+GGIQu0bP5u
-i1mEGn95xuYhEJ4x1UUsVWV0l0D37orV/OaOVffPY3xhlQE++aiXLptof1gzM2D8
-lsQPvWLizrtDAHpiwb4oXQQbifDyeXj+qh7OdIqL10rxZZ/0Q0GqrTOyeSlXuo5i
-C3MdNSlRmWNGqvPwpushFBQec04exXI3AjQZ/DUlMxtDx2xIqQMtaYOQ5iqm9426
-crgrUoXZG/5ePYTCmnSbpZVak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zjTsMkm
+lo+RscyII0dJxZDl7OqcfRQw3CxrAgMBAAGjSjBIMA4GA1UdDwEB/wQEAwIHgDAW
+BgNVHSUBAf8EDDAKBggrBgEFBQcDAzAeBgNVHREEFzAVgRNpbmZvQGRldi5jcHBn
+ZXQub3JnMA0GCSqGSIb3DQEBCwUAA4ICAQBvVUHRUj9vR+QgDQGOtXBcOB1G/1xX
+1gU6ivjP9UzZEmXmqukgx0aYcjxctAm7Yf0lsj2xOwmVPGcMC3tGYJG8yOvpW5dQ
+8uOGmNqNaRq7AJN4gio6uc9dkipNhcBmVilY08yv67wGaIGhHt4kbDiF/3YAzsMR
+/YfVQ3Kb4EyQpC/p7dsio2/m8gRb5lUr6K22fdPr2AfQbdNsAF6EMAfEfCDC9yAa
+uzB5Dc+wpqWvsPp+ohiroJqC99hwmfzPMxAYTB2cmEqmVHGSwqoC9bn7fI59t9l6
+N2fynRhenLookYfy7jqb4a6O702fAHefGD6teHYbTpg6dwlVY/PLI+T1SPSisH3k
+jS2WV03FK8aTNGe7E2RBxH2smca0Z1oaJ9RaluZ9HIRrw434m9+z01DL5w0EWRpC
+qa62iYSgGFcxkXRwb8VeWPtGb9/CPXtVFDtW19mOeeHqr8/xVOCjR2MCKAsxLazl
+yGQhAUu19n2y7vuj4FOEeJ1mwaaUyu2MPqZWZ3loM14muk/ZJfFsJRfdHg7+hSel
+alE0ujce0to39AApGZRIwozut17hYjl5m3314+46KaNuxRmo2xw5wNl8UslEgQYC
+fK3CY+6p9n64QJXnE+2+KGrDuYYXQP3TClHLv/IftgAlf6cZxu4RsNdvUsU15M0J
+BGQjsz7h0bI3fw==
-----END CERTIFICATE-----
\
diff --git a/tests/load/pkg/1/dev.cppget.org/signed/signature.manifest b/tests/load/pkg/1/dev.cppget.org/signed/signature.manifest
index 46cea28..1d0d8e0 100644
--- a/tests/load/pkg/1/dev.cppget.org/signed/signature.manifest
+++ b/tests/load/pkg/1/dev.cppget.org/signed/signature.manifest
@@ -1,13 +1,13 @@
: 1
-sha256sum: 99ad81bc39c66e4eeeae438c46b22e2ab7bba3b3406c01df8bb301abbe8149d8
-signature: \
-tzjAIL6BA9D4L1eflZeM04a0sJjCGi8exyS0EAGlRZXRcXROX83Q+xIMbX5uPpAhMxbOHRfcywRi
-xM9UYjxVsy9sIrd9hwc4UBzm/BoFvvpQdjalSE4CN11MAbaFhiwWK0YkprTV8kTo2jYWfjTtT32Y
-o9sRhP6+WE4H32905ln3hudBEdn5fzWzIDmTs/ip2Gac7KMgMFAdqffjVWyCvR50IhpZiHUnnxVB
-NQ21NuckCS6ST94Sl/SXtFjMGJNjZGrKHYMRGfAysF++wl0FtWwxcbyNVMl1ED8ymu4cS8ydEvhO
-TsB2ENhQv5tAf5GSOeEE3GW3F6Xae8/ohE0K+mWasLWlgszAuLp8376H0L2x5lkgItXbYuzYfFKz
-6A5lUTfk8XV2ss+5DBop0AIm26m7rVO66s7w5Gpt3K8F7WLcQCQr4Ja/+AxE6YKtHbyqQ+PseNp1
-FSEdCZlZxdGnvA5/NWzpLZbsx0bCgKJ8RnMHrdOKsou/fbFHS9gv9AoFNVB1/l60aT1E28H0YsuN
-nx+rArDQZvxZKRL/O/p0YfmKkiQO3ikutBn5COhnbjMputb/TMed01lu9cbXGy1dskWxRmsDCVTI
-al15nByn6b3MI3Bd8cbvXwojaRMlombhDb+ybccMtAMmDqmX+7IFx0mkh1XLDKCgPtvpRN2xqDc=
+sha256sum: ef6a4f9d8f82794c484acea48ab6bb25ccaba270aa77a87848c5e06de9e6bca5
+signature:\
+sshgL1u/38ny3mVchVoML7TRTpPTTJyUqHcK5/iAJifCHCe1D7zqFzHtEO0To/9PcdN6vyF+0FEs
+IRkzVw8LnGkKWAeOwTftlO54zPC9swSh4BvuwMu+FEFa+3IcB/eecvRu0mPe+W2GZMoBBiCFJw2F
+4tOn6a4qDDqq5SbRdJ63IJnT8sRsBLQLFfbIsuN35KFvdpgBG7QBkP+dy2G5bbEr4TJqBQgQqmC/
+FCmGGEAwJ51ZCivGjFJcJ9QK89CI0s+z755TCHdcQBOBvjXDjFoRqw1MHDF77ZNeyKv1QL5ivLsO
+HqtV6YEYNiqBdpO7n14jwgWTBA8vZm5tCQ1G+vnie0q56Rde3nqKFpxHI3/uv59fhvXk9isikRRs
+cI4JIMNWld7Z1si4jrTA2ix/7PZwWTPLZTkJ6c+RRlHuBkGUvrC5n2mA0WXWpewWH0BZqgzSv4AW
+xFxLurFiIliYPMf4O7fvTtbARIsPzTFlZ0VU8QBOg7/pbxn20wHDwlQOBG8Y2y69KyMGdPysdCm6
+8QLjmIvYGy3osfK7bh9ZpjgsHe2Tx+rjwq87Zpo9H8D3DjVilC5WblaB+2YAydc/q4oZsKb/X2QQ
+KXer6XF/Y8l7xLpiZLrUg2oA5j0uIFog6kX7sKeFv2vDRgAjBLf4lXLVKd5VQoNQTOxObAoKmys=
\
diff --git a/tests/submit/data.testscript b/tests/submit/data.testscript
index 875b4eb..b0fe8f0 100644
--- a/tests/submit/data.testscript
+++ b/tests/submit/data.testscript
@@ -3,12 +3,13 @@
# Pre-created submission data directory that will be copied by subsequent
# tests and scope setup commands. The common approach will be that group
-# scopes copy and modify the parent scope submission directory as required by
-# the nested tests and scopes. Tests will also clone the parent scope
-# submission data directory to optionally modify it, use and cleanup at the
-# end. Note that configuration can not be shared between multiple submission
-# handler processes. Also we need to make sure that submission data
-# directories are not cloned while being used by submission handler scripts.
+# scopes copy and modify the parent scope submission data directory as
+# required by the nested tests and scopes. Tests will also clone the parent
+# scope submission data directory to optionally modify it, use and cleanup at
+# the end. Note that submission data directory can not be shared between
+# multiple submission handler processes. Also we need to make sure that
+# submission data directories are not cloned while being used by submission
+# handler scripts.
#
data_dir = $regex.replace($path_search('*/request.manifest', $src_base), \
'(.*)/.*', \
@@ -25,10 +26,10 @@ root_data_dir = $~/$data_dir
# The most commonly used submission data directory cloning command that copies
# it from the parent scope working directory.
#
-clone_data = cp --no-cleanup -r ../$data_dir ./
-clone_data_clean = cp --no-cleanup -r ../$data_dir ./ &$data_dir/***
+clone_data = [cmdline] cp --no-cleanup -r ../$data_dir ./
+clone_data_clean = [cmdline] cp --no-cleanup -r ../$data_dir ./ &$data_dir/***
# Clones the original submission data directory.
#
-clone_root_data = cp --no-cleanup -r $root_data_dir ./
-clone_root_data_clean = cp --no-cleanup -r $root_data_dir ./ &$data_dir/***
+clone_root_data = [cmdline] cp --no-cleanup -r $root_data_dir ./
+clone_root_data_clean = [cmdline] cp --no-cleanup -r $root_data_dir ./ &$data_dir/***
diff --git a/tests/submit/submit-dir.testscript b/tests/submit/submit-dir.testscript
index 81dc494..285710f 100644
--- a/tests/submit/submit-dir.testscript
+++ b/tests/submit/submit-dir.testscript
@@ -77,7 +77,16 @@
$* >>"EOO"
: 1
status: 400
- message: archive is not a valid package \(run bpkg pkg-verify for details\)
+ message:\\
+ package archive is not valid
+
+ gzip: libhello-0.1.0.tar.gz: not in gzip format
+ tar: This does not look like a tar archive
+ tar: libhello-0.1.0/manifest: Not found in archive
+ tar: Exiting with failure status due to previous errors
+ info: libhello-0.1.0.tar.gz does not appear to be a bpkg package
+ info: run bpkg pkg-verify for details
+ \\
reference: $checksum
EOO
}
diff --git a/tests/submit/submit-git.testscript b/tests/submit/submit-git.testscript
index c0a31fe..5197afc 100644
--- a/tests/submit/submit-git.testscript
+++ b/tests/submit/submit-git.testscript
@@ -9,19 +9,23 @@
#
# test.redirects += 2>!
-g = git 2>! >&2
+g = [cmdline] git 2>! >&2
# Create and clone the reference repository.
#
root_ref = $~/ref.git
root_ref_dir = $~/ref
-clone_root_ref = cp --no-cleanup -r $root_ref ./ &ref.git/***
+clone_root_ref = [cmdline] cp --no-cleanup -r $root_ref ./ &ref.git/***
+mkdir --no-cleanup $root_ref
+$g -C $root_ref init --bare &ref.git/***
-+$g clone $root_ref $root_ref_dir &ref/***
+# Convert specific warnings to infos as we expect them to appear. This, in
+# particular, prevents bbot workers to set task result status to warning.
+#
++git clone $root_ref $root_ref_dir &ref/*** 2>&1 | \
+ sed -e 's/warning: (.*cloned an empty repository.*)/info: \1/' >&2 2>!
+cat <<EOI >=$root_ref_dir/submit.config.bash
sections[alpha]=1/alpha
@@ -31,6 +35,8 @@ clone_root_ref = cp --no-cleanup -r $root_ref ./ &ref.git/***
owners=owners
EOI
++$g -C $root_ref_dir config user.name 'Test Script'
++$g -C $root_ref_dir config user.email 'testscript@example.com'
+$g -C $root_ref_dir add '*'
+$g -C $root_ref_dir commit -m 'Add submit.config.bash'
+$g -C $root_ref_dir push
@@ -42,7 +48,7 @@ root_tgt_url = "file:///$~/tgt.git"
+cp -r $root_ref $root_tgt
-clone_root_tgt = cp --no-cleanup -r $root_tgt ./ &tgt.git/***
+clone_root_tgt = [cmdline] cp --no-cleanup -r $root_tgt ./ &tgt.git/***
# Extract the package repository.
#
@@ -94,10 +100,10 @@ pkg_ctl="$prj_ctl/hello.git"
: success
:
{
- : ref-unknown-tgt-aquire-prj-pkg
+ : ref-unknown-tgt-acquire-prj-pkg
:
: Test that on the first package submission the project and package names
- : ownership is successfully aquired. Authentication is enabled on both the
+ : ownership is successfully acquired. Authentication is enabled on both the
: reference and target repos.
:
: Note that here we also test that --commiter-* options are picked up
@@ -173,7 +179,7 @@ pkg_ctl="$prj_ctl/hello.git"
: ref-disabled-tgt-aquire-prj-pkg
:
: Test that on the first package submit the project and package names
- : ownership is successfully aquired. Authentication is disabled for the
+ : ownership is successfully acquired. Authentication is disabled for the
: reference repo.
:
{
@@ -190,6 +196,8 @@ pkg_ctl="$prj_ctl/hello.git"
# owners=owners
EOI
+ $g -C ref config user.name 'Test Script';
+ $g -C ref config user.email 'testscript@example.com';
$g -C ref commit -am 'Disable ownership';
$g -C ref push;
@@ -203,10 +211,10 @@ pkg_ctl="$prj_ctl/hello.git"
EOO
}
- : ref-absent-tgt-aquire-prj-pkg
+ : ref-absent-tgt-acquire-prj-pkg
:
: Test that on the first package submit the project and package names
- : ownership is successfully aquired. Reference repo is absent.
+ : ownership is successfully acquired. Reference repo is absent.
:
: Note that here we also pass the --result-url option.
:
@@ -251,6 +259,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $pkg_ctl
EOI
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
$g -C tgt add owners;
$g -C tgt commit -m 'Add ownership info';
$g -C tgt push;
@@ -288,6 +298,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $prj_ctl/
EOI
+ $g -C ref config user.name 'Test Script';
+ $g -C ref config user.email 'testscript@example.com';
$g -C ref add owners;
$g -C ref commit -m 'Add ownership info';
$g -C ref push;
@@ -305,6 +317,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $pkg_ctl
EOI
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
$g -C tgt add owners;
$g -C tgt commit -m 'Add ownership info';
$g -C tgt push;
@@ -357,6 +371,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $pkg_ctl
EOI
+ $g -C ref config user.name 'Test Script';
+ $g -C ref config user.email 'testscript@example.com';
$g -C ref add owners;
$g -C ref commit -m 'Add ownership info';
$g -C ref push;
@@ -392,6 +408,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $prj_ctl/
EOI
+ $g -C ref config user.name 'Test Script';
+ $g -C ref config user.email 'testscript@example.com';
$g -C ref add owners;
$g -C ref commit -m 'Add ownership info';
$g -C ref push;
@@ -425,6 +443,8 @@ pkg_ctl="$prj_ctl/hello.git"
# owners=owners
EOI
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
$g -C tgt commit -am 'Disable ownership';
$g -C tgt push;
@@ -436,6 +456,78 @@ pkg_ctl="$prj_ctl/hello.git"
EOO
}
+ : ref-absent-tgt-pkg-rev
+ :
+ : Test that the package revision is removed.
+ :
+ {
+ $clone_root_data;
+
+ $clone_root_tgt;
+ $g clone tgt.git &tgt/***;
+
+ cat <<EOI >=tgt/submit.config.bash;
+ sections['*']=1/alpha
+ EOI
+
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
+ $g -C tgt commit -am 'Add config and archive';
+ $g -C tgt push;
+
+ # Initial submission.
+ #
+ $* "file:///$~/tgt.git" $data_dir >>"EOO";
+ : 1
+ status: 200
+ message: package submission is queued: libhello/0.1.0
+ reference: $checksum
+ EOO
+
+ $g -C tgt pull;
+
+ test -f tgt/1/alpha/hello/libhello-0.1.0.tar.gz;
+
+ # Revision submission.
+ #
+ # Here we test that the handler removes the previous revision.
+ #
+ $clone_root_data_clean;
+
+ tar -xf $~/$data_dir/libhello-0.1.0.tar.gz;
+ sed -i -e 's/(version: 0.1.0)/\1+1/' libhello-0.1.0/manifest;
+ mv libhello-0.1.0 libhello-0.1.0+1;
+ tar cfz $~/$data_dir/libhello-0.1.0+1.tar.gz libhello-0.1.0+1;
+ rm -r libhello-0.1.0+1;
+ rm $~/$data_dir/libhello-0.1.0.tar.gz;
+ sed -i -e 's/(archive: libhello-0.1.0)(.tar.gz)/\1+1\2/' $data_dir/request.manifest;
+
+ $* "file:///$~/tgt.git" $data_dir >>"EOO" &tgt/1/alpha/hello/libhello-0.1.0+1.tar.gz;
+ : 1
+ status: 200
+ message: package submission is queued: libhello/0.1.0+1
+ reference: $checksum
+ EOO
+
+ $g -C tgt pull;
+
+ test -f tgt/1/alpha/hello/libhello-0.1.0.tar.gz == 1;
+ test -f tgt/1/alpha/hello/libhello-0.1.0+1.tar.gz;
+
+ # While at it, test the older revision submission.
+ #
+ $clone_root_data_clean;
+
+ $* "file:///$~/tgt.git" $data_dir >>"EOO";
+ : 1
+ status: 422
+ message: newer revision libhello/0.1.0+1 is present
+ reference: $checksum
+ EOO
+
+ test -f tgt/1/alpha/hello/libhello-0.1.0+1.tar.gz
+ }
+
: section-fallback
:
{
@@ -454,6 +546,8 @@ pkg_ctl="$prj_ctl/hello.git"
owners=owners
EOI
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
$g -C tgt commit -am 'Add section name fallback';
$g -C tgt push;
@@ -571,6 +665,8 @@ pkg_ctl="$prj_ctl/hello.git"
mkdir -p ref/1/alpha/hello;
cp $data_dir/libhello-0.1.0.tar.gz ref/1/alpha/hello/;
+ $g -C ref config user.name 'Test Script';
+ $g -C ref config user.email 'testscript@example.com';
$g -C ref add 1/;
$g -C ref commit -m 'Add libhello-0.1.0.tar.gz';
$g -C ref push;
@@ -612,6 +708,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $prj_ctl/foo
EOI
+ $g -C ref config user.name 'Test Script';
+ $g -C ref config user.email 'testscript@example.com';
$g -C ref add owners;
$g -C ref commit -m 'Add ownership info';
$g -C ref push;
@@ -644,6 +742,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: https://example.com/foo
EOI
+ $g -C ref config user.name 'Test Script';
+ $g -C ref config user.email 'testscript@example.com';
$g -C ref add owners/hello/project-owner.manifest;
$g -C ref commit -m 'Add project ownership info';
$g -C ref push;
@@ -685,6 +785,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $prj_ctl/foo
EOI
+ $g -C ref config user.name 'Test Script';
+ $g -C ref config user.email 'testscript@example.com';
$g -C ref add owners;
$g -C ref commit -m 'Add ownership info';
$g -C ref push;
@@ -711,6 +813,8 @@ pkg_ctl="$prj_ctl/hello.git"
mkdir -p tgt/1/alpha/hello;
cp $data_dir/libhello-0.1.0.tar.gz tgt/1/alpha/hello/;
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
$g -C tgt add 1/;
$g -C tgt commit -m 'Add libhello-0.1.0.tar.gz';
$g -C tgt push;
@@ -751,6 +855,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $prj_ctl/foo
EOI
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
$g -C tgt add owners;
$g -C tgt commit -m 'Add ownership info';
$g -C tgt push;
@@ -783,6 +889,8 @@ pkg_ctl="$prj_ctl/hello.git"
# owners=owners
EOI
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
$g -C tgt commit -am 'Disable ownership';
$g -C tgt push;
@@ -816,6 +924,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $prj_ctl/
EOI
+ $g -C ref config user.name 'Test Script';
+ $g -C ref config user.email 'testscript@example.com';
$g -C ref add owners;
$g -C ref commit -m 'Add project ownership info';
$g -C ref push;
@@ -831,6 +941,8 @@ pkg_ctl="$prj_ctl/hello.git"
# owners=owners
EOI
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
$g -C tgt commit -am 'Disable ownership';
$g -C tgt push;
@@ -871,6 +983,8 @@ pkg_ctl="$prj_ctl/hello.git"
control: $prj_ctl/foo
EOI
+ $g -C tgt config user.name 'Test Script';
+ $g -C tgt config user.email 'testscript@example.com';
$g -C tgt add owners;
$g -C tgt commit -m 'Add ownership info';
$g -C tgt push;
diff --git a/tests/submit/submit-pub.testscript b/tests/submit/submit-pub.testscript
index b73d108..8c042a7 100644
--- a/tests/submit/submit-pub.testscript
+++ b/tests/submit/submit-pub.testscript
@@ -17,7 +17,7 @@ root_rep=$~/pkg-1
+echo ": 1" >=$root_rep/1/repositories.manifest
+bpkg rep-create $root_rep/1 2>! &$root_rep/1/packages.manifest
-clone_root_rep = cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
+clone_root_rep = [cmdline] cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
: args
{
@@ -76,7 +76,7 @@ clone_root_rep = cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
: for-real
:
- : Here we create the (fake) package revision which is expected to be removed
+ : Here we also create the package revision which is expected to be removed
: by the handler.
:
{
@@ -84,9 +84,8 @@ clone_root_rep = cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
$clone_root_rep;
ln -s pkg-1 pkg;
- mkdir --no-cleanup pkg-1/1/prj;
- touch --no-cleanup pkg-1/1/prj/libhello-0.1.0+1.tar.gz;
-
+ # Initial submission.
+ #
$* $~/pkg $~/$data_dir &!pkg-1/*** &pkg-*/*** >>"EOO";
: 1
status: 200
@@ -94,16 +93,55 @@ clone_root_rep = cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
reference: $checksum
EOO
+ test -f pkg/1/hello/libhello-0.1.0.tar.gz;
+
# While at it, test the duplicate submission.
#
$clone_root_data_clean;
- $* $~/pkg $~/$data_dir >>"EOO"
+ $* $~/pkg $~/$data_dir >>"EOO";
: 1
status: 422
message: duplicate submission
reference: $checksum
EOO
+
+ test -f pkg/1/hello/libhello-0.1.0.tar.gz;
+
+ # Revision submission.
+ #
+ # Here we test that the handler removes the previous revision.
+ #
+ tar -xf $~/$data_dir/libhello-0.1.0.tar.gz;
+ sed -i -e 's/(version: 0.1.0)/\1+1/' libhello-0.1.0/manifest;
+ mv libhello-0.1.0 libhello-0.1.0+1;
+ tar cfz $~/$data_dir/libhello-0.1.0+1.tar.gz libhello-0.1.0+1;
+ rm -r libhello-0.1.0+1;
+ rm $~/$data_dir/libhello-0.1.0.tar.gz;
+ sed -i -e 's/(archive: libhello-0.1.0)(.tar.gz)/\1+1\2/' $data_dir/request.manifest;
+
+ $* $~/pkg $~/$data_dir >>"EOO";
+ : 1
+ status: 200
+ message: package is published: libhello/0.1.0+1
+ reference: $checksum
+ EOO
+
+ test -f pkg/1/hello/libhello-0.1.0.tar.gz == 1;
+ test -f pkg/1/hello/libhello-0.1.0+1.tar.gz;
+
+ # While at it, test the older revision submission.
+ #
+ $clone_root_data_clean;
+
+ $* $~/pkg $~/$data_dir >>"EOO";
+ : 1
+ status: 422
+ message: newer revision libhello/0.1.0+1 is present
+ reference: $checksum
+ EOO
+
+ test -f pkg/1/hello/libhello-0.1.0+1.tar.gz
}
: result-url
@@ -144,7 +182,7 @@ clone_root_rep = cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
$* $~/brep-loader $~/pkg $~/$data_dir >>~"%EOO%"
: 1
status: 400
- message: \\
+ message:\\
submitted archive is not a valid package
%.+
\\
@@ -165,7 +203,7 @@ clone_root_rep = cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
$* $~/brep-loader $~/pkg $~/$data_dir >>~"%EOO%"
: 1
status: 400
- message: \\
+ message:\\
unable to add package to repository
%.+
\\
diff --git a/tests/upload/545f1f78-63ea-4acf-bcb8-37b2513a78c8/archive.tar b/tests/upload/545f1f78-63ea-4acf-bcb8-37b2513a78c8/archive.tar
new file mode 100644
index 0000000..d3b5b17
--- /dev/null
+++ b/tests/upload/545f1f78-63ea-4acf-bcb8-37b2513a78c8/archive.tar
Binary files differ
diff --git a/tests/upload/545f1f78-63ea-4acf-bcb8-37b2513a78c8/request.manifest b/tests/upload/545f1f78-63ea-4acf-bcb8-37b2513a78c8/request.manifest
new file mode 100644
index 0000000..c59303b
--- /dev/null
+++ b/tests/upload/545f1f78-63ea-4acf-bcb8-37b2513a78c8/request.manifest
@@ -0,0 +1,22 @@
+: 1
+id: 545f1f78-63ea-4acf-bcb8-37b2513a78c8
+session: 4d4c8b36-56c5-42e0-91d1-58bfd1228002/libhello/1.1.0+10/x86_64-linux-\
+gnu/linux_fedora_37-gcc_12.2-bindist/default/queue/0.3.0/1683122318585120886
+instance: archive
+archive: archive.tar
+sha256sum: 4fa79e4e11a03db321514800806a2b0a3a8eef9375dc22963f4e5a16764c0d5e
+timestamp: 2023-05-08T09:18:20Z
+name: libhello
+version: 1.1.0+10
+project: hello
+target-config: linux_fedora_37-gcc_12.2-bindist
+package-config: default
+target: x86_64-linux-gnu
+tenant: 4d4c8b36-56c5-42e0-91d1-58bfd1228002
+toolchain-name: queue
+toolchain-version: 0.3.0
+repository-name: git:build2.org/var/scm/hello/libhello#master@7f62790591b66bd\
+a248140013bdbd12bf078c2a2
+machine-name: linux_fedora_37-bindist-gcc_12.2
+machine-summary: Fedora Linux 37 with system-default GCC 12.2.1 and bpkg-pkg-\
+bindist prerequisites
diff --git a/tests/upload/buildfile b/tests/upload/buildfile
new file mode 100644
index 0000000..32d7720
--- /dev/null
+++ b/tests/upload/buildfile
@@ -0,0 +1,13 @@
+# file : tests/upload/buildfile
+# license : MIT; see accompanying LICENSE file
+
+dir = ../../brep/handler/upload/
+
+include $dir
+
+commons = data
+
+./: testscript{* -{$commons}} common_testscript{$commons} {*/ -test/}{**} \
+ $dir/exe{brep-upload-bindist}
+
+testscript{upload-bindist}@./: test = $out_base/$dir/brep-upload-bindist
diff --git a/tests/upload/data.testscript b/tests/upload/data.testscript
new file mode 100644
index 0000000..3d3eede
--- /dev/null
+++ b/tests/upload/data.testscript
@@ -0,0 +1,34 @@
+# file : tests/upload/data.testscript
+# license : MIT; see accompanying LICENSE file
+
+# Pre-created upload data directory that will be copied by subsequent tests
+# and scope setup commands. The common approach will be that group scopes copy
+# and modify the parent scope upload data directory as required by the nested
+# tests and scopes. Tests will also clone the parent scope upload data
+# directory to optionally modify it, use and cleanup at the end. Note that
+# upload data directory can not be shared between multiple upload handler
+# processes. Also we need to make sure that upload data directories are not
+# cloned while being used by upload handler scripts.
+#
+data_dir = $regex.replace($path_search('*/request.manifest', $src_base), \
+ '(.*)/.*', \
+ '\1')
+
+request_id = "$data_dir"
+
+# Copy the original upload data directory to the root scope.
+#
++cp -r $src_base/$data_dir ./
+
+root_data_dir = $~/$data_dir
+
+# The most commonly used upload data directory cloning command that copies it
+# from the parent scope working directory.
+#
+clone_data = [cmdline] cp --no-cleanup -r ../$data_dir ./
+clone_data_clean = [cmdline] cp --no-cleanup -r ../$data_dir ./ &$data_dir/***
+
+# Clones the original upload data directory.
+#
+clone_root_data = [cmdline] cp --no-cleanup -r $root_data_dir ./
+clone_root_data_clean = [cmdline] cp --no-cleanup -r $root_data_dir ./ &$data_dir/***
diff --git a/tests/upload/upload-bindist.testscript b/tests/upload/upload-bindist.testscript
new file mode 100644
index 0000000..d43c567
--- /dev/null
+++ b/tests/upload/upload-bindist.testscript
@@ -0,0 +1,126 @@
+# file : tests/upload/upload-bindist.testscript
+# license : MIT; see accompanying LICENSE file
+
+.include data.testscript
+
+: args
+{
+ : no-dir
+ :
+ $* 2>>~%EOE% != 0
+ %\[.+\] \[brep:error\] \[ref \] \[brep-upload-bindist\]: usage: .+brep-upload-bindist \[<options>\] <root> <dir>%
+ EOE
+
+ : no-root
+ :
+ $* $~/dir 2>>~%EOE% != 0
+ %\[.+\] \[brep:error\] \[ref dir\] \[brep-upload-bindist\]: usage: .+brep-upload-bindist \[<options>\] <root> <dir>%
+ EOE
+
+ : root-not-exist
+ :
+ : While at it, also test that the trailing slash is stripped from the
+ : directory paths.
+ :
+ $* $~/root/ $~/dir/ 2>>~%EOE% != 0
+ %\[.+\] \[brep:error\] \[ref dir\] \[brep-upload-bindist\]: '.+root' does not exist or is not a directory%
+ EOE
+
+ : data-not-exist
+ :
+ mkdir root;
+ $* $~/root $~/dir 2>>~%EOE% != 0
+ %\[.+\] \[brep:error\] \[ref dir\] \[brep-upload-bindist\]: '.+dir' does not exist or is not a directory%
+ EOE
+}
+
+: success
+:
+{
+ mkdir --no-cleanup bindist-root/ &bindist-root/***;
+
+ # Test the first upload.
+ #
+ $clone_data;
+
+ $* $~/bindist-root/ $~/$data_dir >>"EOO";
+ : 1
+ status: 200
+ message: binary distribution packages are published
+ reference: $request_id
+ EOO
+
+ timestamp = '2023-05-08T09:18:20Z';
+ tenant = '4d4c8b36-56c5-42e0-91d1-58bfd1228002';
+ dir = [dir_path] bindist-root/$tenant/archive/fedora35/hello/libhello/1.1.0+10/;
+
+ test -f $dir/default/libhello-1.0.0+10.tar.xz;
+ test -f $dir/default-$timestamp/libhello-1.0.0+10.tar.xz;
+
+ # Repeat the upload using the same timestamp to make sure that we properly
+ # handle this situation (by adding the retry number as a suffix to the
+ # package configuration directory name).
+ #
+ $clone_data;
+
+ $* $~/bindist-root/ $~/$data_dir >>"EOO" &bindist-root/***;
+ : 1
+ status: 200
+ message: binary distribution packages are published
+ reference: $request_id
+ EOO
+
+ test -f $dir/default/libhello-1.0.0+10.tar.xz;
+ test -f $dir/default-$timestamp-0/libhello-1.0.0+10.tar.xz;
+ test -d $dir/default-$timestamp/ != 0;
+
+ # Test the second upload without --keep-previous option.
+ #
+ data_dir2 = 22222222-2222-2222-2222-222222222222;
+ request_id2 = $data_dir2;
+ timestamp2 = '2023-05-09T09:18:20Z';
+
+ cp --no-cleanup -r ../$data_dir ./$data_dir2;
+
+ sed -i -e "s%^\(id:\) .+\$%\\1 $request_id2%" \
+ $data_dir2/request.manifest;
+
+ sed -i -e "s%^\(timestamp:\) .+\$%\\1 $timestamp2%" \
+ $data_dir2/request.manifest;
+
+ $* $~/bindist-root/ $~/$data_dir2 >>"EOO";
+ : 1
+ status: 200
+ message: binary distribution packages are published
+ reference: $request_id2
+ EOO
+
+ test -f $dir/default/libhello-1.0.0+10.tar.xz;
+ test -f $dir/default-$timestamp2/libhello-1.0.0+10.tar.xz;
+ test -d $dir/default-$timestamp.0/ != 0;
+
+ # Test the third upload with --keep-previous option.
+ #
+ data_dir3 = 33333333-3333-3333-3333-333333333333;
+ request_id3 = $data_dir3;
+ timestamp3 = '2023-05-10T09:18:20Z';
+
+ cp --no-cleanup -r ../$data_dir ./$data_dir3;
+
+ sed -i -e "s%^\(id:\) .+\$%\\1 $request_id3%" \
+ $data_dir3/request.manifest;
+
+ sed -i -e "s%^\(timestamp:\) .+\$%\\1 $timestamp3%" \
+ $data_dir3/request.manifest;
+
+ $* --keep-previous $~/bindist-root/ $~/$data_dir3 >>"EOO";
+ : 1
+ status: 200
+ message: binary distribution packages are published
+ reference: $request_id3
+ EOO
+
+ test -f $dir/default/libhello-1.0.0+10.tar.xz;
+ test -f $dir/default-$timestamp3/libhello-1.0.0+10.tar.xz;
+ test -f $dir/default-$timestamp2/libhello-1.0.0+10.tar.xz
+}
diff --git a/tests/web/xhtml/driver.cxx b/tests/web/xhtml/driver.cxx
index a0135de..3393eb3 100644
--- a/tests/web/xhtml/driver.cxx
+++ b/tests/web/xhtml/driver.cxx
@@ -8,6 +8,9 @@
#include <web/xhtml/serialization.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xml;