aboutsummaryrefslogtreecommitdiff
path: root/tests/pkg-build.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-02-21 22:54:05 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-02-22 18:06:12 +0300
commit309cccfffc15657dd8654aa6a14e444bb47417ae (patch)
tree887a16bb6faa467ee490b608f79c7a0de7e109ca /tests/pkg-build.testscript
parentd7a819061ea818cd69a7ab49182e407bec44b014 (diff)
Increment version iteration for external packages on buildfiles change
Diffstat (limited to 'tests/pkg-build.testscript')
-rw-r--r--tests/pkg-build.testscript333
1 files changed, 244 insertions, 89 deletions
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 711b5b8..30bbe96 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -3672,109 +3672,264 @@ test.options += --no-progress
: external-package
:
+ if! $remote
{
- $clone_cfg;
+ +$clone_cfg
- tar (!$posix ? --force-local : ) -xf $src/t8a/fax-1.0.0.tar.gz &fax-1.0.0/***;
- mv fax-1.0.0 fax;
+ +tar (!$posix ? --force-local : ) -xf $src/t8a/fax-1.0.0.tar.gz &fax-1.0.0/***
+ +mv fax-1.0.0 fax
- $* config.fax.libbiz=true -- fax/ 2>>~"%EOE%";
- fetched $backend_dep
- unpacked $backend_dep
- fetched libbiz/1.0.0
- unpacked libbiz/1.0.0
- using fax/1.0.0 \(external\)
- configured $backend_dep
- configured libbiz/1.0.0
- configured fax/1.0.0
- %info: .+fax.+ is up to date%
- updated fax/1.0.0
- EOE
+ : change-manifest
+ :
+ {
+ $clone_cfg;
+ cp -rp ../fax/ ./;
+
+ $* config.fax.libbiz=true -- fax/ 2>>~"%EOE%";
+ fetched $backend_dep
+ unpacked $backend_dep
+ fetched libbiz/1.0.0
+ unpacked libbiz/1.0.0
+ using fax/1.0.0 \(external\)
+ configured $backend_dep
+ configured libbiz/1.0.0
+ configured fax/1.0.0
+ %info: .+fax.+ is up to date%
+ updated fax/1.0.0
+ EOE
- $pkg_status -r >>"EOO";
- !fax configured !1.0.0
- $backend_configured
- libbiz configured 1.0.0
- EOO
+ $pkg_status -r >>"EOO";
+ !fax configured !1.0.0
+ $backend_configured
+ libbiz configured 1.0.0
+ EOO
- cat cfg/fax/build/config.build >>~"%EOO%";
- %.*
- config.fax.backend = $backend
- config.fax.libbiz = true
- %.*
- EOO
+ cat cfg/fax/build/config.build >>~"%EOO%";
+ %.*
+ config.fax.backend = $backend
+ config.fax.libbiz = true
+ %.*
+ EOO
- # Upgrade the external package after changing its manifest and make
- # sure the configuration is preserved.
- #
- echo '' >+fax/manifest;
-
- $* fax/ 2>>~%EOE%;
- disfigured fax/1.0.0
- using fax/1.0.0#1 (external)
- configured fax/1.0.0#1
- %info: .+fax.+ is up to date%
- updated fax/1.0.0#1
- EOE
+ # Upgrade the external package after changing its manifest and make
+ # sure the configuration is preserved.
+ #
+ echo '' >+fax/manifest;
+
+ $* fax/ 2>>~%EOE%;
+ disfigured fax/1.0.0
+ using fax/1.0.0#1 (external)
+ configured fax/1.0.0#1
+ %info: .+fax.+ is up to date%
+ updated fax/1.0.0#1
+ EOE
- $pkg_status -r >>"EOO";
- !fax configured !1.0.0#1
- $backend_configured
- libbiz configured 1.0.0
- EOO
+ $pkg_status -r >>"EOO";
+ !fax configured !1.0.0#1
+ $backend_configured
+ libbiz configured 1.0.0
+ EOO
- cat cfg/fax/build/config.build >>~"%EOO%";
- %.*
- config.fax.backend = $backend
- config.fax.libbiz = true
- %.*
- EOO
+ cat cfg/fax/build/config.build >>~"%EOO%";
+ %.*
+ config.fax.backend = $backend
+ config.fax.libbiz = true
+ %.*
+ EOO
- # While at it, test that it's ok for out root directory to not exist.
- #
- # Note that this testing is only meaningful when we replace an
- # external package with another external (see build_package::external()
- # for details).
- #
- echo '' >+fax/manifest;
-
- rm -r cfg/fax/;
-
- $* fax/ 2>>~%EOE%;
- disfigured fax/1.0.0#1
- disfigured libbiz/1.0.0
- purged libbiz/1.0.0
- using fax/1.0.0#2 (external)
- configured fax/1.0.0#2
- %info: .+fax.+ is up to date%
- updated fax/1.0.0#2
- EOE
+ # While at it, test that it's ok for out root directory to not
+ # exist.
+ #
+ # Note that this testing is only meaningful when we replace an
+ # external package with another external (see
+ # build_package::external() for details).
+ #
+ echo '' >+fax/manifest;
+
+ rm -r cfg/fax/;
+
+ $* fax/ 2>>~%EOE%;
+ disfigured fax/1.0.0#1
+ disfigured libbiz/1.0.0
+ purged libbiz/1.0.0
+ using fax/1.0.0#2 (external)
+ configured fax/1.0.0#2
+ %info: .+fax.+ is up to date%
+ updated fax/1.0.0#2
+ EOE
- $pkg_status -r >>"EOO";
- !fax configured !1.0.0#2
- $backend_configured
- EOO
+ $pkg_status -r >>"EOO";
+ !fax configured !1.0.0#2
+ $backend_configured
+ EOO
- cat cfg/fax/build/config.build >>~"%EOO%";
- %.*
- config.fax.backend = $backend
- config.fax.libbiz = false
- %.*
- EOO
+ cat cfg/fax/build/config.build >>~"%EOO%";
+ %.*
+ config.fax.backend = $backend
+ config.fax.libbiz = false
+ %.*
+ EOO
- # Also tests that the depends value location is printed on the enable
- # condition evaluation failure for an external package.
- #
- sed -i -e 's/(depends: libbiz).+/\1 ? (config.fax.libbiz = true)/' fax/manifest;
+ # Also tests that the depends value location is printed on the
+ # enable condition evaluation failure for an external package.
+ #
+ sed -i -e 's/(depends: libbiz).+/\1 ? (config.fax.libbiz = true)/' fax/manifest;
- $* fax/ 2>>~%EOE% != 0;
- <depends-enable-clause>:1: error: invalid bool value: multiple names
- info: enable condition: (config.fax.libbiz = true)
- % .+fax.manifest:10:10: info: depends value defined here%
- info: while satisfying fax/1.0.0#3
- EOE
+ $* fax/ 2>>~%EOE% != 0;
+ <depends-enable-clause>:1: error: invalid bool value: multiple names
+ info: enable condition: (config.fax.libbiz = true)
+ % .+fax.manifest:10:10: info: depends value defined here%
+ info: while satisfying fax/1.0.0#3
+ EOE
- $pkg_drop fax
+ $pkg_drop fax
+ }
+
+ : change-buildfile
+ :
+ {
+ +$clone_cfg
+
+ : package-directory
+ :
+ {
+ $clone_cfg;
+ cp -rp ../../fax/ ./;
+
+ $* fax 2>>~"%EOE%";
+ fetched $backend_dep
+ unpacked $backend_dep
+ fetched fax/1.0.0
+ unpacked fax/1.0.0
+ configured $backend_dep
+ configured fax/1.0.0
+ %info: .+fax-1.0.0.+ is up to date%
+ updated fax/1.0.0
+ EOE
+
+ $pkg_status -r >>"EOO";
+ !fax configured 1.0.0
+ $backend_configured
+ EOO
+
+ # No upgrade after turning a package from the archive-based repo
+ # into an external package.
+ #
+ $* fax/ 2>>~%EOE%;
+ %info: .+fax-1.0.0.+ is up to date%
+ updated fax/1.0.0
+ EOE
+
+ $pkg_status -r >>"EOO";
+ !fax configured !1.0.0
+ $backend_configured
+ EOO
+
+ # Upgrade after the package' buildfile is edited.
+ #
+ echo '' >+fax/build/root.build;
+
+ $* fax/ 2>>~%EOE%;
+ disfigured fax/1.0.0
+ using fax/1.0.0#1 (external)
+ configured fax/1.0.0#1
+ %info: .+fax.+ is up to date%
+ updated fax/1.0.0#1
+ EOE
+
+ $pkg_status -r >>"EOO";
+ !fax configured !1.0.0#1
+ $backend_configured
+ EOO
+
+ # No upgrade if the buildfile is not edited.
+ #
+ $* fax/ 2>>~%EOE%;
+ %info: .+fax.+ is up to date%
+ updated fax/1.0.0#1
+ EOE
+
+ $pkg_status -r >>"EOO";
+ !fax configured !1.0.0#1
+ $backend_configured
+ EOO
+
+ $pkg_drop fax
+ }
+
+ : directory-repo
+ :
+ {
+ $clone_cfg;
+ cp -rp ../../fax/ ./;
+
+ $* fax 2>>~"%EOE%";
+ fetched $backend_dep
+ unpacked $backend_dep
+ fetched fax/1.0.0
+ unpacked fax/1.0.0
+ configured $backend_dep
+ configured fax/1.0.0
+ %info: .+fax-1.0.0.+ is up to date%
+ updated fax/1.0.0
+ EOE
+
+ $pkg_status -r >>"EOO";
+ !fax configured 1.0.0
+ $backend_configured
+ EOO
+
+ # No upgrade after turning a package from the archive-based repo
+ # into an external package.
+ #
+ $rep_add --type dir fax/ && $rep_fetch;
+
+ $* fax 2>>~%EOE%;
+ %info: .+fax-1.0.0.+ is up to date%
+ updated fax/1.0.0
+ EOE
+
+ $pkg_status -r >>"EOO";
+ !fax configured 1.0.0
+ $backend_configured
+ EOO
+
+ # Upgrade after the package' buildfile is edited.
+ #
+ echo '' >+fax/build/root.build;
+
+ $rep_fetch;
+
+ $* fax 2>>~%EOE%;
+ disfigured fax/1.0.0
+ using fax/1.0.0#1 (external)
+ configured fax/1.0.0#1
+ %info: .+fax.+ is up to date%
+ updated fax/1.0.0#1
+ EOE
+
+ $pkg_status -r >>"EOO";
+ !fax configured 1.0.0#1
+ $backend_configured
+ EOO
+
+ # No upgrade if the buildfile is not edited.
+ #
+ $rep_fetch;
+
+ $* fax 2>>~%EOE%;
+ %info: .+fax.+ is up to date%
+ updated fax/1.0.0#1
+ EOE
+
+ $pkg_status -r >>"EOO";
+ !fax configured 1.0.0#1
+ $backend_configured
+ EOO
+
+ $pkg_drop fax
+ }
+ }
}
: evaluate-reflect-vars