Skip to content

Commit fd7010b

Browse files
whessepull[bot]
authored andcommitted
[infra] Disallow spaces in test configuration names
Change-Id: Ibd96e414d9a8c76a36b4fc8360ceca3560f1dd91 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181404 Commit-Queue: William Hesse <whesse@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com>
1 parent 90faef9 commit fd7010b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

pkg/smith/lib/configuration.dart

+6-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,12 @@ class Configuration {
381381
useHotReload = useHotReload ?? false,
382382
useHotReloadRollback = useHotReloadRollback ?? false,
383383
useSdk = useSdk ?? false,
384-
useQemu = useQemu ?? false;
384+
useQemu = useQemu ?? false {
385+
if (name.contains(" ")) {
386+
throw ArgumentError(
387+
"Name of test configuration cannot contain spaces: $name");
388+
}
389+
}
385390

386391
/// Returns `true` if this configuration's options all have the same values
387392
/// as [other].

pkg/smith/test/configuration_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ void main() {
303303
);
304304

305305
var debugWithAsserts2 = Configuration(
306-
"different name",
306+
"different-name",
307307
Architecture.x64,
308308
Compiler.dart2js,
309309
Mode.debug,

pkg/test_runner/lib/src/options.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ compiler.''',
854854
for (var sanitizerName in sanitizers.split(",")) {
855855
var sanitizer = Sanitizer.find(sanitizerName);
856856
var configuration = Configuration(
857-
"custom configuration_${configurationNumber++}",
857+
"custom-configuration-${configurationNumber++}",
858858
architecture,
859859
compiler,
860860
mode,

0 commit comments

Comments
 (0)