aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbbot/manifest.cxx16
-rw-r--r--tests/manifest/task.testscript35
2 files changed, 28 insertions, 23 deletions
diff --git a/libbbot/manifest.cxx b/libbbot/manifest.cxx
index 45a4668..4cc1849 100644
--- a/libbbot/manifest.cxx
+++ b/libbbot/manifest.cxx
@@ -811,8 +811,7 @@ namespace bbot
auxiliary_environment = move (v);
}
- else if (n == "config" || // @@ TMP Until toolchain 0.16.0 is released.
- n == "target-config")
+ else if (n == "target-config")
{
if (!target_config.empty ())
bad_name ("task target configuration redefinition");
@@ -828,6 +827,9 @@ namespace bbot
bad_name ("task package configuration redefinition");
package_config = move (v);
+
+ if (package_config.empty ())
+ bad_value ("empty task package configuration");
}
else if (n == "host")
{
@@ -993,16 +995,10 @@ namespace bbot
}
};
- // @@ TMP Always use 'target-config' name and always serialize
- // package_config after toolchain 0.16.0 is released.
- //
+ serialize_list ("target-config", target_config);
+
if (!package_config.empty ())
- {
- serialize_list ("target-config", target_config);
s.next ("package-config", package_config);
- }
- else
- serialize_list ("config", target_config);
if (host)
s.next ("host", *host ? "true" : "false");
diff --git a/tests/manifest/task.testscript b/tests/manifest/task.testscript
index 8320f59..b9bc3e5 100644
--- a/tests/manifest/task.testscript
+++ b/tests/manifest/task.testscript
@@ -37,8 +37,6 @@ test.options += -t
worker-checksum: 1
EOF
- # @@ TMP Remove when toolchain 0.16.0 is released.
- #
: no-package-config
:
$* <<EOF >>EOF
@@ -55,7 +53,7 @@ test.options += -t
machine: windows_10-msvc_14
target: x86_64-microsoft-win32-msvc14.0
environment: lld
- config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG
+ target-config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG
warning-regex: '^warning: ' '^.+: warning: '
interactive: error
worker-checksum: 1
@@ -161,7 +159,7 @@ test.options += -t
repository-url: http://pkg.example.org/1/math
machine: windows
target: x86_64-microsoft-win32-msvc14.0
- config: abc=
+ target-config: abc=
EOF
: var-value-quoting
@@ -173,7 +171,7 @@ test.options += -t
repository-url: http://pkg.example.org/1/math
machine: windows
target: x86_64-microsoft-win32-msvc14.0
- config: abc='a "b '"d\e x y="
+ target-config: abc='a "b '"d\e x y="
EOF
}
@@ -215,7 +213,7 @@ test.options += -t
trust: yes
machine: windows_10-msvc_14
target: x86_64-microsoft-win32-msvc14.0
- config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG
+ target-config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG
EOF
}
@@ -290,8 +288,8 @@ test.options += -t
:
$* <<EOI 2>'stdin:3:1: error: task target configuration redefinition' == 1
: 1
- config: config.cc.coptions=/Z7
- config: config.cc.loptions=/DEBUG
+ target-config: config.cc.coptions=/Z7
+ target-config: config.cc.loptions=/DEBUG
EOI
: host
@@ -401,16 +399,16 @@ test.options += -t
{
: empty
:
- $* <<EOI 2>'stdin:2:8: error: empty task target configuration' == 1
+ $* <<EOI 2>'stdin:2:15: error: empty task target configuration' == 1
: 1
- config:
+ target-config:
EOI
: bad-field
:
- $* <<EOI 2>'stdin:2:15: error: invalid task configuration: unterminated quoted string' == 1
+ $* <<EOI 2>'stdin:2:22: error: invalid task configuration: unterminated quoted string' == 1
: 1
- config: 'abc=x
+ target-config: 'abc=x
EOI
: multiline
@@ -420,13 +418,24 @@ test.options += -t
:
$* <<EOI 2>'stdin:3:7: error: invalid task configuration: unterminated quoted string' == 1
: 1
- config:\
+ target-config:\
'abc=x
\
EOI
}
}
+ : package-config
+ :
+ {
+ : empty
+ :
+ $* <<EOI 2>'stdin:2:16: error: empty task package configuration' == 1
+ : 1
+ package-config:
+ EOI
+ }
+
: host
:
$* <<EOI 2>"stdin:2:7: error: invalid task host value 'yes'" == 1