aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/manifest/testscript328
-rw-r--r--tests/overrides/testscript276
2 files changed, 604 insertions, 0 deletions
diff --git a/tests/manifest/testscript b/tests/manifest/testscript
index 4f6433b..d7ec37f 100644
--- a/tests/manifest/testscript
+++ b/tests/manifest/testscript
@@ -1048,6 +1048,225 @@
EOI
}
+ : build-auxiliary
+ :
+ {
+ : named
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql_*
+ build-auxiliary-mysql: *-mysql_*
+ EOF
+ }
+
+ : unnamed
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary: *-postgresql**
+ EOF
+ }
+
+ : empty-config-pattern
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary:
+ EOI
+ stdin:6:17: error: empty build auxiliary configuration name pattern
+ EOE
+ }
+
+ : mixed
+ :
+ {
+ : named-unnamed
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql**
+ build-auxiliary: *-mysql**
+ EOF
+ }
+
+ : unnamed-named
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary: *-mysql**
+ build-auxiliary-pgsql: *-postgresql**
+ EOF
+ }
+
+ : unnamed-unnamed
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary: *-mysql**
+ build-auxiliary: *-postgresql**
+ EOI
+ stdin:7:1: error: build auxiliary environment redefinition
+ EOE
+ }
+
+ : redefinition
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql**
+ build-auxiliary-pgsql: *-postgresql**
+ EOI
+ stdin:7:1: error: build auxiliary environment redefinition
+ EOE
+ }
+ }
+ }
+
+ : build-bot
+ :
+ {
+ : basics
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-bot:\
+ -----BEGIN PUBLIC KEY-----
+ MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAw5liP5pyU9ebC/nD3djZ
+ 1H2dlKmUyiX0Z8POvKhLREd0B3rM59bPcnbRB4HMIhj0J0hUBvS8xb4u5udCPToa
+ x0A/LMWZ6claiivNtJ3CdLV98eklWdNUg5WXOuqq9QDKXw2ZpGbwDwCOh6aHSWVq
+ 98N9AQx0ZMmMWz3qhRyxPfh+GeJ05uj2ohU9FeUJxeqUcgJT/UcMZ3+7KYbwr+Uq
+ /HCoX1BmN6nvzhQGHvJIZ2IcjvOQ0AUrPmpSZN01Zr3ZEpkHM3hJWNLu3ntJLGBQ
+ 0aT5kG3iqFyr9q3M3c4J8c0AWrnDjvj0qnCyjNwqW+qIpatmCNT43DmgYr9fQLW0
+ UHusburz53AbXs12zu3gZzkb0irlShatkMqqQaqaU0/+zw1LnoZ+rvmn2XV97UuK
+ LFKMKXCnyi2ZG65IZHGkjBVAPuvsX6RgLNyner/QtkDJTbfhktInbG08dCPqv1EF
+ 1OtcYKMTn8I5P2VmMO6SXXDLMSdU8b5DA5EY6Ca6JBB8g06S9sqGqXgQFysAnZs1
+ VFgMopf8WZqj23x+DX+9KKT2pVnjbwRvBAntuCDoO75gWoETDnCQXEei/PbyamPq
+ 9+NjNsTDn67iJTGncZbII+eciY2YiFHm6GMzBPsUYlQcxiuO4X36jW6m2rwuw37K
+ oFDbGI3uY4LnhwmDFLbjtk8CAwEAAQ==
+ -----END PUBLIC KEY-----
+ \
+ build-bot:\
+ -----BEGIN PUBLIC KEY-----
+ AIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAw5liP5pyU9ebC/nD3djZ
+ 2H2dlKmUyiX0Z8POvKhLREd0B3rM59bPcnbRB4HMIhj0J0hUBvS8xb4u5udCPToa
+ x0A/LMWZ6claiivNtJ3CdLV98eklWdNUg5WXOuqq9QDKXw2ZpGbwDwCOh6aHSWVq
+ 98N9AQx0ZMmMWz3qhRyxPfh+GeJ05uj2ohU9FeUJxeqUcgJT/UcMZ3+7KYbwr+Uq
+ /HCoX1BmN6nvzhQGHvJIZ2IcjvOQ0AUrPmpSZN01Zr3ZEpkHM3hJWNLu3ntJLGBQ
+ 0aT5kG3iqFyr9q3M3c4J8c0AWrnDjvj0qnCyjNwqW+qIpatmCNT43DmgYr9fQLW0
+ UHusburz53AbXs12zu3gZzkb0irlShatkMqqQaqaU0/+zw1LnoZ+rvmn2XV97UuK
+ LFKMKXCnyi2ZG65IZHGkjBVAPuvsX6RgLNyner/QtkDJTbfhktInbG08dCPqv1EF
+ 1OtcYKMTn8I5P2VmMO6SXXDLMSdU8b5DA5EY6Ca6JBB8g06S9sqGqXgQFysAnZs1
+ VFgMopf8WZqj23x+DX+9KKT2pVnjbwRvBAntuCDoO75gWoETDnCQXEei/PbyamPq
+ 9+NjNsTDn67iJTGncZbII+eciY2YiFHm6GMzBPsUYlQcxiuO4X36jW6m2rwuw37K
+ oFDbGI3uY4LnhwmDFLbjtk8CAwEAAQ==
+ -----END PUBLIC KEY-----
+ \
+ EOF
+ }
+
+ : empty
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-bot:
+ EOI
+ stdin:6:11: error: empty custom build bot public key
+ EOE
+ }
+
+ : duplicate
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-bot:\
+ -----BEGIN PUBLIC KEY-----
+ MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAw5liP5pyU9ebC/nD3djZ
+ 1H2dlKmUyiX0Z8POvKhLREd0B3rM59bPcnbRB4HMIhj0J0hUBvS8xb4u5udCPToa
+ x0A/LMWZ6claiivNtJ3CdLV98eklWdNUg5WXOuqq9QDKXw2ZpGbwDwCOh6aHSWVq
+ 98N9AQx0ZMmMWz3qhRyxPfh+GeJ05uj2ohU9FeUJxeqUcgJT/UcMZ3+7KYbwr+Uq
+ /HCoX1BmN6nvzhQGHvJIZ2IcjvOQ0AUrPmpSZN01Zr3ZEpkHM3hJWNLu3ntJLGBQ
+ 0aT5kG3iqFyr9q3M3c4J8c0AWrnDjvj0qnCyjNwqW+qIpatmCNT43DmgYr9fQLW0
+ UHusburz53AbXs12zu3gZzkb0irlShatkMqqQaqaU0/+zw1LnoZ+rvmn2XV97UuK
+ LFKMKXCnyi2ZG65IZHGkjBVAPuvsX6RgLNyner/QtkDJTbfhktInbG08dCPqv1EF
+ 1OtcYKMTn8I5P2VmMO6SXXDLMSdU8b5DA5EY6Ca6JBB8g06S9sqGqXgQFysAnZs1
+ VFgMopf8WZqj23x+DX+9KKT2pVnjbwRvBAntuCDoO75gWoETDnCQXEei/PbyamPq
+ 9+NjNsTDn67iJTGncZbII+eciY2YiFHm6GMzBPsUYlQcxiuO4X36jW6m2rwuw37K
+ oFDbGI3uY4LnhwmDFLbjtk8CAwEAAQ==
+ -----END PUBLIC KEY-----
+ \
+ build-bot:\
+ -----BEGIN PUBLIC KEY-----
+ MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAw5liP5pyU9ebC/nD3djZ
+ 1H2dlKmUyiX0Z8POvKhLREd0B3rM59bPcnbRB4HMIhj0J0hUBvS8xb4u5udCPToa
+ x0A/LMWZ6claiivNtJ3CdLV98eklWdNUg5WXOuqq9QDKXw2ZpGbwDwCOh6aHSWVq
+ 98N9AQx0ZMmMWz3qhRyxPfh+GeJ05uj2ohU9FeUJxeqUcgJT/UcMZ3+7KYbwr+Uq
+ /HCoX1BmN6nvzhQGHvJIZ2IcjvOQ0AUrPmpSZN01Zr3ZEpkHM3hJWNLu3ntJLGBQ
+ 0aT5kG3iqFyr9q3M3c4J8c0AWrnDjvj0qnCyjNwqW+qIpatmCNT43DmgYr9fQLW0
+ UHusburz53AbXs12zu3gZzkb0irlShatkMqqQaqaU0/+zw1LnoZ+rvmn2XV97UuK
+ LFKMKXCnyi2ZG65IZHGkjBVAPuvsX6RgLNyner/QtkDJTbfhktInbG08dCPqv1EF
+ 1OtcYKMTn8I5P2VmMO6SXXDLMSdU8b5DA5EY6Ca6JBB8g06S9sqGqXgQFysAnZs1
+ VFgMopf8WZqj23x+DX+9KKT2pVnjbwRvBAntuCDoO75gWoETDnCQXEei/PbyamPq
+ 9+NjNsTDn67iJTGncZbII+eciY2YiFHm6GMzBPsUYlQcxiuO4X36jW6m2rwuw37K
+ oFDbGI3uY4LnhwmDFLbjtk8CAwEAAQ==
+ -----END PUBLIC KEY-----
+ \
+ EOI
+ stdin:23:1: error: duplicate custom build bot public key
+ EOE
+ }
+ }
+
: build-config
:
{
@@ -1112,6 +1331,115 @@
EOI
}
+ : auxiliary
+ {
+ : named
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ bar-build-auxiliary-pgsql: *-postgresql_*
+ baz-build-auxiliary-mysql: *-mysql_*
+ EOF
+ }
+
+ : unnamed
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ bar-build-auxiliary: *-postgresql**
+ EOF
+ }
+
+ : empty-config-pattern
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ bar-build-auxiliary:
+ EOI
+ stdin:6:21: error: empty build auxiliary configuration name pattern
+ EOE
+ }
+
+ : mixed
+ :
+ {
+ : named-unnamed
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ bar-build-auxiliary-pgsql: *-postgresql**
+ bar-build-auxiliary: *-mysql**
+ EOF
+ }
+
+ : unnamed-named
+ :
+ {
+ $* <<EOF >>EOF
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ bar-build-auxiliary: *-mysql**
+ bar-build-auxiliary-pgsql: *-postgresql**
+ EOF
+ }
+
+ : unnamed-unnamed
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ bar-build-auxiliary: *-mysql**
+ bar-build-auxiliary: *-postgresql**
+ EOI
+ stdin:7:1: error: build auxiliary environment redefinition
+ EOE
+ }
+
+ : redefinition
+ :
+ {
+ $* <<EOI 2>>EOE != 0
+ : 1
+ name: foo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ bar-build-auxiliary-pgsql: *-postgresql**
+ bar-build-auxiliary-pgsql: *-postgresql**
+ EOI
+ stdin:7:1: error: build auxiliary environment redefinition
+ EOE
+ }
+ }
+ }
+
: email
:
{
diff --git a/tests/overrides/testscript b/tests/overrides/testscript
index ba66b7f..a903d05 100644
--- a/tests/overrides/testscript
+++ b/tests/overrides/testscript
@@ -254,6 +254,153 @@
license: LGPLv2
build-email: foo@example.com
EOO
+
+ : build-auxiliary
+ :
+ {
+ : named
+ :
+ $* 'build-auxiliary-pgsql: *-postgresql**' \
+ 'foo-build-auxiliary-oracle: *-oracle**' <<EOI >>EOO
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql_*
+ build-auxiliary-mysql: *-mysql_*
+ foo-build-auxiliary-mssql: *-mssql_*
+ foo-build-auxiliary-oracle: *-oracle_*
+ EOI
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql**
+ build-auxiliary-mysql: *-mysql_*
+ foo-build-auxiliary-mssql: *-mssql_*
+ foo-build-auxiliary-oracle: *-oracle**
+ EOO
+
+ : unnamed
+ :
+ $* 'build-auxiliary: *-postgresql**' \
+ 'foo-build-auxiliary: *-oracle**' <<EOI >>EOO
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary: *-postgresql_*
+ foo-build-auxiliary: *-oracle_*
+ EOI
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary: *-postgresql**
+ foo-build-auxiliary: *-oracle**
+ EOO
+
+ : new-config
+ :
+ $* 'bar-build-config:' \
+ 'bar-build-auxiliary-mysql: *-mysql_8' \
+ 'bar-build-auxiliary-pgsql: *-postgresql_16' <<EOI >>EOO
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql_*
+ build-auxiliary-mssql: *-mssql_*
+ foo-build-auxiliary-mysql: *-mysql_*
+ foo-build-auxiliary-oracle: *-oracle_*
+ EOI
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql_*
+ build-auxiliary-mssql: *-mssql_*
+ foo-build-auxiliary-mysql: *-mysql_*
+ foo-build-auxiliary-oracle: *-oracle_*
+ bar-build-auxiliary-mysql: *-mysql_8
+ bar-build-auxiliary-pgsql: *-postgresql_16
+ EOO
+ }
+
+ : build-bot
+ :
+ {
+ : common
+ :
+ $* 'build-bot: key3' 'build-bot: key4' <<EOI >>EOO
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-bot: key1
+ foo-build-bot: key2
+ EOI
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-bot: key3
+ build-bot: key4
+ EOO
+
+ : config
+ :
+ $* 'foo-build-bot: key3' 'foo-build-bot: key4' <<EOI >>EOO
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-bot: key1
+ foo-build-bot: key2
+ EOI
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-bot: key1
+ foo-build-bot: key3
+ foo-build-bot: key4
+ EOO
+
+ : new-config
+ :
+ $* 'bar-build-config:' \
+ 'bar-build-bot: key1' \
+ 'bar-build-bot: key2' <<EOI >>EOO
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-bot: key1
+ foo-build-bot: key2
+ EOI
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-bot: key1
+ foo-build-bot: key2
+ bar-build-bot: key1
+ bar-build-bot: key2
+ EOO
+ }
}
: invalid
@@ -370,6 +517,44 @@
cannot override 'deprecated-api-builds' value: no build package configuration 'deprecated-api'
EOE
+ : config-bot-after-built-bot
+ :
+ $* 'build-bot: key1' 'foo-build-bot: key2' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ foo-build-config:
+ EOI
+ 'foo-build-bot' override specified together with 'build-bot' override
+ EOE
+
+ : built-bot-after-config-bot
+ :
+ $* 'foo-build-bot: key1' 'build-bot: key2' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ foo-build-config:
+ EOI
+ 'build-bot' override specified together with 'foo-build-bot' override
+ EOE
+
+ : no-build-bot-config
+ :
+ $* 'foo-build-bot: key1' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ EOI
+ cannot override 'foo-build-bot' value: no build package configuration 'foo'
+ EOE
+
: config-email-after-email
:
$* 'build-email: foo@example.com' 'network-build-warning-email: warning@example.com' <<EOI 2>>EOE != 0
@@ -395,4 +580,95 @@
EOI
'build-email' override specified together with 'network-build-warning-email' override
EOE
+
+ : build-auxiliary
+ :
+ {
+ : named-common
+ :
+ $* 'build-auxiliary-mysql: *-mysql_*' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql_*
+ foo-build-auxiliary-mssql: *-mssql_*
+ foo-build-auxiliary-oracle: *-oracle_*
+ EOI
+ no match for 'build-auxiliary-mysql' value override
+ EOE
+
+ : named-config1
+ :
+ $* 'foo-build-auxiliary-mysql: *-mysql_*' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql_*
+ foo-build-auxiliary-mssql: *-mssql_*
+ foo-build-auxiliary-oracle: *-oracle_*
+ EOI
+ no match for 'foo-build-auxiliary-mysql' value override
+ EOE
+
+ : named-config2
+ :
+ $* 'bar-build-auxiliary-oracle: *-oracle**' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary-pgsql: *-postgresql_*
+ foo-build-auxiliary-mssql: *-mssql_*
+ foo-build-auxiliary-oracle: *-oracle_*
+ EOI
+ cannot override 'bar-build-auxiliary-oracle' value: no build package configuration 'bar'
+ EOE
+
+ : unnamed-common
+ :
+ $* 'build-auxiliary-mysql: *-mysql_*' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary: *-postgresql_*
+ foo-build-auxiliary: *-oracle_*
+ EOI
+ no match for 'build-auxiliary-mysql' value override
+ EOE
+
+ : unnamed-config1
+ :
+ $* 'foo-build-auxiliary-mysql: *-mysql_*' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary: *-postgresql_*
+ foo-build-auxiliary: *-oracle_*
+ EOI
+ no match for 'foo-build-auxiliary-mysql' value override
+ EOE
+
+ : unnamed-config2
+ :
+ $* 'bar-build-auxiliary: *-mysql_*' <<EOI 2>>EOE != 0
+ : 1
+ name: libfoo
+ version: 2.0.0
+ summary: Modern C++ parser
+ license: LGPLv2
+ build-auxiliary: *-postgresql_*
+ foo-build-auxiliary: *-oracle_*
+ EOI
+ cannot override 'bar-build-auxiliary' value: no build package configuration 'bar'
+ EOE
+ }
}