aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/common/git/init42
-rw-r--r--tests/common/git/state0/libbar.tarbin184320 -> 194560 bytes
-rw-r--r--tests/common/git/state0/libfoo.tarbin450560 -> 481280 bytes
-rw-r--r--tests/common/git/state0/libfox.tarbin245760 -> 266240 bytes
-rw-r--r--tests/common/git/state0/links.tarbin276480 -> 296960 bytes
-rw-r--r--tests/common/git/state0/style-basic.tarbin81920 -> 81920 bytes
-rw-r--r--tests/common/git/state0/style.tarbin143360 -> 153600 bytes
-rw-r--r--tests/common/git/state1/libbaz.tarbin61440 -> 71680 bytes
-rw-r--r--tests/common/git/state1/libfoo.tarbin512000 -> 552960 bytes
-rw-r--r--tests/common/git/state1/libfox.tarbin245760 -> 266240 bytes
-rw-r--r--tests/common/git/state1/style-basic.tarbin81920 -> 81920 bytes
-rw-r--r--tests/common/git/state1/style.tarbin143360 -> 153600 bytes
-rw-r--r--tests/pkg-build.testscript16
-rw-r--r--tests/pkg-checkout.testscript9
14 files changed, 37 insertions, 30 deletions
diff --git a/tests/common/git/init b/tests/common/git/init
index 81479a8..e34246e 100755
--- a/tests/common/git/init
+++ b/tests/common/git/init
@@ -80,7 +80,7 @@ rm -f style-basic.git/repositories.manifest
#
git -C style-basic.git init
git -C style-basic.git add '*'
-git -C style-basic.git commit -am 'Create'
+git -C style-basic.git commit -am 'Create' --no-verify
# Create stable branch for style-basic.
#
@@ -93,21 +93,21 @@ cat <<EOF >style-basic.git/repositories.manifest
email: user@example.com
EOF
git -C style-basic.git add README repositories.manifest
-git -C style-basic.git commit -am 'README'
+git -C style-basic.git commit -am 'README' --no-verify
# Create master branch for style.git, adding style-basic.git as a submodule.
#
git -C style.git init
git -C style.git add '*'
git -C style.git submodule add ../style-basic.git basic # The stable branch.
-git -C style.git commit -am 'Create'
+git -C style.git commit -am 'Create' --no-verify
# Make style.git to refer an unadvertised reference, commiting into the stable
# branch of style-basic.git.
#
touch style-basic.git/INSTALL
git -C style-basic.git add INSTALL
-git -C style-basic.git commit -am 'INSTALL'
+git -C style-basic.git commit -am 'INSTALL' --no-verify
git -C style-basic.git checkout master
# Create master branch for libbar.git.
@@ -127,7 +127,7 @@ depends: style-basic >= $
EOF
git -C libbar.git add '*'
-git -C libbar.git commit -am 'Create'
+git -C libbar.git commit -am 'Create' --no-verify
git -C libbar.git tag -a 'v1.0.0' -m 'Tag version 1.0.0'
git -C libbar.git submodule add -b stable ../style-basic.git extras
@@ -143,7 +143,7 @@ email: pkg@example.org
depends: style-basic >= $
EOF
-git -C libbar.git commit -am 'Add extras'
+git -C libbar.git commit -am 'Add extras' --no-verify
git -C libbar.git tag -a 'v1.0.0+1' -m 'Tag version 1.0.0+1'
# Create master branch for libfoo.git, adding style.git and libbar.git as
@@ -165,7 +165,7 @@ git -C libfoo.git add '*'
git -C libfoo.git submodule add ../style.git doc/style
git -C libfoo.git submodule add ../libbar.git libbar
git -C libfoo.git submodule update --init --recursive # Updates doc/style/basic.
-git -C libfoo.git commit -am 'Create'
+git -C libfoo.git commit -am 'Create' --no-verify
git -C libfoo.git tag -a 'v0.0.1' -m 'Tag version 0.0.1'
# Increase libfoo version and add tags.
@@ -180,7 +180,7 @@ url: http://example.org
email: pkg@example.org
EOF
-git -C libfoo.git commit -am 'Increase version to 1.0.0'
+git -C libfoo.git commit -am 'Increase version to 1.0.0' --no-verify
git -C libfoo.git tag 'ltag'
git -C libfoo.git tag -a 'atag' -m 'Create annotated tag'
@@ -190,7 +190,7 @@ git -C libfoo.git tag -a 'v1.0.0' -m 'Tag version 1.0.0'
#
touch libfoo.git/README
git -C libfoo.git add README
-git -C libfoo.git commit -am 'README'
+git -C libfoo.git commit -am 'README' --no-verify
# Create master branch for libfox.git, adding libbar.git as a submodule.
#
@@ -198,7 +198,7 @@ git -C libfox.git init
git -C libfox.git add '*'
git -C libfox.git submodule add ../libbar.git libbar
git -C libfox.git submodule update --init --recursive # Recursive for safety.
-git -C libfox.git commit -am 'Create'
+git -C libfox.git commit -am 'Create' --no-verify
# Create master branch for links.git, adding style.git as a submodule.
#
@@ -217,7 +217,7 @@ EOF
git -C links.git add '*'
git -C links.git submodule add ../style.git doc/style
git -C links.git submodule update --init --recursive # Updates doc/style/basic.
-git -C links.git commit -am 'Create'
+git -C links.git commit -am 'Create' --no-verify
git -C links.git tag -a 'v0.0.1' -m 'Tag version 0.0.1'
# Increase links version and add symlinks.
@@ -240,7 +240,7 @@ ln -s doc/style/basic links.git/bs # Submodule directory symlink.
ln -s bs/page.css links.git/pg # Symlink via submodule directory symlink.
git -C links.git add '*'
-git -C links.git commit -am 'Add symlinks'
+git -C links.git commit -am 'Add symlinks' --no-verify
git -C links.git tag -a 'v1.0.0-alpha' -m 'Tag version 1.0.0-alpha'
# Increase links version and add dangling symlink.
@@ -258,7 +258,7 @@ EOF
ln -s lc links.git/bl # Dangling symlink.
git -C links.git add '*'
-git -C links.git commit -am 'Add dangling symlinks'
+git -C links.git commit -am 'Add dangling symlinks' --no-verify
git -C links.git tag -a 'v1.0.1' -m 'Tag version 1.0.1'
# Increase links version and add cyclic symlink.
@@ -276,7 +276,7 @@ EOF
ln -s bl links.git/lc # Cyclic symlink.
git -C links.git add '*'
-git -C links.git commit -am 'Add cyclic symlinks'
+git -C links.git commit -am 'Add cyclic symlinks' --no-verify
git -C links.git tag -a 'v1.0.2' -m 'Tag version 1.0.2'
@@ -303,7 +303,7 @@ rm -f -r libbaz.git/.git
git -C libbaz.git init
git -C libbaz.git add '*'
-git -C libbaz.git commit -am 'Create'
+git -C libbaz.git commit -am 'Create' --no-verify
# Sync submodule references with their new locations.
#
@@ -315,28 +315,28 @@ done
#
touch style.git/README
git -C style.git add README
-git -C style.git commit -am 'README'
+git -C style.git commit -am 'README' --no-verify
# Advance libfoo.git master branch.
#
git -C libfoo.git submodule update --init --remote # Pull style only.
-git -C libfoo.git commit -am 'Update style'
+git -C libfoo.git commit -am 'Update style' --no-verify
git -C libfoo.git rm -r tests
-git -C libfoo.git commit -am 'Remove tests'
+git -C libfoo.git commit -am 'Remove tests' --no-verify
git -C libfoo.git submodule deinit libbar
git -C libfoo.git rm libbar
-git -C libfoo.git commit -am 'Remove libbar'
+git -C libfoo.git commit -am 'Remove libbar' --no-verify
rm -f -r libbar.git
git -C libfoo.git submodule add ../libbaz.git libbaz
git -C libfoo.git submodule update --init libbaz
-git -C libfoo.git commit -am 'Add libbaz'
+git -C libfoo.git commit -am 'Add libbaz' --no-verify
git -C libfoo.git tag -f 'ltag'
git -C libfoo.git tag -f -a 'atag' -m 'Move annotated tag'
touch libfoo.git/INSTALL
git -C libfoo.git add INSTALL
-git -C libfoo.git commit -am 'INSTALL'
+git -C libfoo.git commit -am 'INSTALL' --no-verify
diff --git a/tests/common/git/state0/libbar.tar b/tests/common/git/state0/libbar.tar
index ea4d296..a06e98f 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 d30ab31..b73307c 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/libfox.tar b/tests/common/git/state0/libfox.tar
index 50b9840..641598d 100644
--- a/tests/common/git/state0/libfox.tar
+++ b/tests/common/git/state0/libfox.tar
Binary files differ
diff --git a/tests/common/git/state0/links.tar b/tests/common/git/state0/links.tar
index f8a7efd..360765e 100644
--- a/tests/common/git/state0/links.tar
+++ b/tests/common/git/state0/links.tar
Binary files differ
diff --git a/tests/common/git/state0/style-basic.tar b/tests/common/git/state0/style-basic.tar
index aa23cf0..344df4b 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 9ab3367..293cea1 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 420a984..151bdb9 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 c827226..7e61ac6 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/libfox.tar b/tests/common/git/state1/libfox.tar
index 95e2e07..54485df 100644
--- a/tests/common/git/state1/libfox.tar
+++ b/tests/common/git/state1/libfox.tar
Binary files differ
diff --git a/tests/common/git/state1/style-basic.tar b/tests/common/git/state1/style-basic.tar
index f59e67e..dd5ef5a 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 a627bd5..14ee6c9 100644
--- a/tests/common/git/state1/style.tar
+++ b/tests/common/git/state1/style.tar
Binary files differ
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index a632b67..b8c17d2 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -4180,22 +4180,24 @@ else
$clone_root_cfg;
$rep_fetch "$rep0/libbar.git#master" &cfg/.bpkg/repos/*/***;
- $* libmbar --checkout-root $~ --checkout-purge 2>>~%EOE%;
+ # While at it, test the package checkout cache (thus build multiple
+ # packages from the same git repository).
+ #
+ $* libbar libmbar --checkout-root $~ --checkout-purge 2>>~%EOE%;
%checked out style-basic/.+%
+ checked out libbar/1.0.0+1
checked out libmbar/1.0.0
%configured style-basic/.+%
+ configured libbar/1.0.0+1
configured libmbar/1.0.0
- %info: .+ is up to date%
+ %info: .+ is up to date%{2}
+ updated libbar/1.0.0+1
updated libmbar/1.0.0
EOE
test -d libmbar-1.0.0;
- $pkg_disfigure libmbar;
- $pkg_disfigure style-basic;
-
- $pkg_purge libmbar;
- $pkg_purge style-basic
+ $pkg_drop libbar libmbar
}
}
diff --git a/tests/pkg-checkout.testscript b/tests/pkg-checkout.testscript
index 8f3ff92..69e211c 100644
--- a/tests/pkg-checkout.testscript
+++ b/tests/pkg-checkout.testscript
@@ -170,13 +170,16 @@ else
#
$rep_fetch "$rep/links.git#v1.0.1";
+ # Note that on POSIX the repository is restored in its permanent location,
+ # since the operation fails in the distribution phase. This is in contrast
+ # to Windows where the repository is lost, since the operation fails in
+ # the fix-up phase.
+ #
if $posix
$* links/1.0.1 2>>~%EOE% != 0
checking out links/1.0.1
distributing links/1.0.1
%error: unable to stat .+%
- warning: repository state is now broken
- info: run 'bpkg rep-fetch' to repair
EOE
else
$* links/1.0.1 2>>~%EOE% != 0
@@ -194,6 +197,8 @@ else
$rep_fetch "$rep/links.git#v1.0.2" 2>>~%EOE% != 0
%.*
%error: unable to iterate over .+%
+ warning: repository state is now broken and will be cleaned up
+ info: run 'bpkg rep-fetch' to update
EOE
else
$rep_fetch "$rep/links.git#v1.0.2"