aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-09-28 22:15:02 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-10-02 16:40:22 +0300
commit523168b187b55085ff47064585838d321eb724a5 (patch)
tree5bf7934d583d01fbbed876b333921d9af4ce58a4 /tests
parent9f632c7e160639ca7a11fe1ac48598b67e36652e (diff)
Add support for *-build-*email package manifest values and their overrides
Diffstat (limited to 'tests')
-rw-r--r--tests/manifest/testscript79
-rw-r--r--tests/overrides/testscript80
2 files changed, 142 insertions, 17 deletions
diff --git a/tests/manifest/testscript b/tests/manifest/testscript
index 7d808e3..3179005 100644
--- a/tests/manifest/testscript
+++ b/tests/manifest/testscript
@@ -1060,8 +1060,8 @@
version: 2.0.0
summary: Modern C++ parser
license: LGPLv2
- bar-build-config: config.foo.bar = true; Bar.
bar-builds: all
+ bar-build-config: config.foo.bar = true; Bar.
baz-build-config: config.foo.baz = true; Baz.
EOF
}
@@ -1111,6 +1111,81 @@
bar-builds: all
EOI
}
+
+ : email
+ :
+ {
+ : override
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ package-email: package@example.com
+ build-email: build@example.com
+ build-warning-email: build-warning@example.com
+ build-error-email: build-error@example.com
+ bar-build-config: config.foo.bar = true; Bar.
+ bar-build-email: bar-build@example.com
+ bar-build-warning-email: bar-build-warning@example.com
+ bar-build-error-email: bar-build-error@example.com
+ EOF
+ }
+
+ : disabled
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ package-email: package@example.com
+ build-email: build@example.com
+ build-warning-email: build-warning@example.com
+ build-error-email: build-error@example.com
+ bar-build-config: config.foo.bar = true; Bar.
+ bar-build-email:
+ EOF
+ }
+
+ : unrecognized
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-error-email: build-error@example.com
+ bar-build-email: bar-build@example.com
+ EOI
+ stdin:7:1: error: stray build notification email: no build package configuration 'bar'
+ EOE
+ }
+
+ : empty
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-error-email: build-error@example.com
+ bar-build-config: config.foo.bar = true; Bar.
+ bar-build-warning-email: ; Empty
+ EOI
+ stdin:8:26: error: empty build configuration warning email
+ EOE
+ }
+ }
}
: distribution
@@ -4447,10 +4522,10 @@
build-include: linux*
build-include: freebsd*
build-exclude: *; Only supports Linux and FreeBSD.
- network-build-config: config.libfoo.network=true; Enable networking API.
network-builds: default
network-build-include: linux*
network-build-exclude: *; Only supports Linux.
+ network-build-config: config.libfoo.network=true; Enable networking API.
bootstrap-build:\
project = libfoo
diff --git a/tests/overrides/testscript b/tests/overrides/testscript
index 07c1451..ba66b7f 100644
--- a/tests/overrides/testscript
+++ b/tests/overrides/testscript
@@ -15,6 +15,10 @@
build-email: foo@example.com
build-error-email: error@example.com
build-warning-email: warning@example.com
+ network-build-config: config.libfoo.network=true
+ network-build-email: network-foo@example.com
+ network-build-error-email: network-error@example.com
+ network-build-warning-email: network-warning@example.com
EOI
: 1
name: libfoo
@@ -22,6 +26,7 @@
summary: Modern C++ parser
license: LGPLv2
build-email: bar@example.com
+ network-build-config: config.libfoo.network=true
EOO
: builds
@@ -99,6 +104,8 @@
: build-configs
:
$* 'network-builds: all' 'network-build-include: windows*' 'network-build-exclude: *' \
+ 'network-build-warning-email: network-warning@example.com' 'sys-build-email:' \
+ 'cache-build-error-email: cache-error@example.com' \
'cache-build-include: freebsd*' 'cache-build-exclude: *' 'cache-builds: legacy' \
'cache-build-config: config.libfoo.cache=true config.libfoo.buffer=1028' \
'deprecated-api-build-config: config.libfoo.deprecated_api=true' 'deprecated-api-builds: windows' \
@@ -110,63 +117,80 @@
version: 2.0.0
summary: Modern C++ parser
license: LGPLv2
+ build-email: foo@example.com
+ build-error-email: error@example.com
+ build-warning-email: warning@example.com
builds: all
build-include: linux*
build-include: macos*
build-include: freebsd*
build-exclude: *
- network-build-config: config.libfoo.network=true
network-builds: default
network-build-include: linux*
network-build-exclude: *
- cache-build-config: config.libfoo.cache=true
+ network-build-config: config.libfoo.network=true
+ network-build-error-email: network-error@example.com
cache-builds: default
cache-build-include: macos*
cache-build-exclude: *
- sys-build-config: ?sys:libcrypto
+ cache-build-config: config.libfoo.cache=true
+ cache-build-email: cache@example.com
sys-builds: default
sys-build-include: freebsd*
sys-build-exclude: *
- older-build-config: ?libbar/1.0.0
+ sys-build-config: ?sys:libcrypto
+ sys-build-email: sys@example.com
older-builds: default
older-build-include: windows*
older-build-exclude: *
- fancy-build-config: config.libfoo.fancy=true
+ older-build-config: ?libbar/1.0.0
fancy-builds: default
fancy-build-include: windows*
fancy-build-exclude: *
+ fancy-build-config: config.libfoo.fancy=true
EOI
: 1
name: libfoo
version: 2.0.0
summary: Modern C++ parser
license: LGPLv2
+ build-email: foo@example.com
+ build-warning-email: warning@example.com
+ build-error-email: error@example.com
builds: all
build-include: linux*
build-include: macos*
build-include: freebsd*
build-exclude: *
default-builds: none
- network-build-config: config.libfoo.network=true
+ default-build-email:
network-builds: all
network-build-include: windows*
network-build-exclude: *
- cache-build-config: config.libfoo.cache=true config.libfoo.buffer=1028
+ network-build-config: config.libfoo.network=true
+ network-build-warning-email: network-warning@example.com
cache-builds: legacy
cache-build-include: freebsd*
cache-build-exclude: *
- sys-build-config: ?sys:libcrypto
+ cache-build-config: config.libfoo.cache=true config.libfoo.buffer=1028
+ cache-build-error-email: cache-error@example.com
sys-builds: default
sys-build-include: linux*
sys-build-exclude: *
- older-build-config: ?libbar/1.0.0
+ sys-build-config: ?sys:libcrypto
+ sys-build-email:
older-builds: none
- fancy-build-config: config.libfoo.fancy=true
+ older-build-config: ?libbar/1.0.0
+ older-build-email:
fancy-builds: gcc
- deprecated-api-build-config: config.libfoo.deprecated_api=true
+ fancy-build-config: config.libfoo.fancy=true
+ fancy-build-email:
deprecated-api-builds: windows
- experimental-api-build-config: config.libfoo.experimental_api=true
+ deprecated-api-build-config: config.libfoo.deprecated_api=true
+ deprecated-api-build-email:
experimental-api-builds: none
+ experimental-api-build-config: config.libfoo.experimental_api=true
+ experimental-api-build-email:
EOO
: build-config-default
@@ -177,8 +201,8 @@
version: 2.0.0
summary: Modern C++ parser
license: LGPLv2
- network-build-config: config.libfoo.network=true
network-builds: all
+ network-build-config: config.libfoo.network=true
EOI
: 1
name: libfoo
@@ -188,8 +212,8 @@
default-builds: all
default-build-include: windows*
default-build-exclude: *
- network-build-config: config.libfoo.network=true
network-builds: none
+ network-build-config: config.libfoo.network=true
EOO
: add-build-config
@@ -208,8 +232,8 @@
version: 2.0.0
summary: Modern C++ parser
license: LGPLv2
- network-build-config: config.libfoo.network=true
network-builds: all
+ network-build-config: config.libfoo.network=true
experimental-api-build-config: config.libfoo.experimental_api=true
EOO
@@ -345,4 +369,30 @@
EOI
cannot override 'deprecated-api-builds' value: no build package configuration 'deprecated-api'
EOE
+
+ : config-email-after-email
+ :
+ $* 'build-email: foo@example.com' 'network-build-warning-email: warning@example.com' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ network-build-config: config.libfoo.network=true
+ EOI
+ 'network-build-warning-email' override specified together with 'build-email' override
+ EOE
+
+ : email-after-config-email
+ :
+ $* 'network-build-warning-email: warning@example.com' 'build-email: foo@example.com' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ network-build-config: config.libfoo.network=true
+ EOI
+ 'build-email' override specified together with 'network-build-warning-email' override
+ EOE
}