From aa0125387caf0450e888ac375205fda57d2e720f Mon Sep 17 00:00:00 2001 From: Tong Wu <6259181+digiter@users.noreply.github.com> Date: Fri, 10 Jul 2020 21:49:40 -0700 Subject: [PATCH] [devicelab] This no-op change marks 3 tests to run on LUCI builders. (#61257) --- dev/devicelab/lib/framework/manifest.dart | 12 ++++++++++++ dev/devicelab/manifest.yaml | 7 +++++++ dev/devicelab/test/manifest_test.dart | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dev/devicelab/lib/framework/manifest.dart b/dev/devicelab/lib/framework/manifest.dart index 1c5095d8d04..581833d721d 100644 --- a/dev/devicelab/lib/framework/manifest.dart +++ b/dev/devicelab/lib/framework/manifest.dart @@ -36,6 +36,7 @@ class ManifestTask { @required this.requiredAgentCapabilities, @required this.isFlaky, @required this.timeoutInMinutes, + @required this.onLuci, }) { final String taskName = 'task "$name"'; _checkIsNotBlank(name, 'Task name', taskName); @@ -64,6 +65,9 @@ class ManifestTask { /// An optional custom timeout specified in minutes. final int timeoutInMinutes; + /// (Optional) Whether this test runs on LUCI. + final bool onLuci; + /// Whether the task is supported by the current host platform bool isSupportedByHost() { final Set supportedHosts = Set.from( @@ -111,6 +115,7 @@ ManifestTask _validateAndParseTask(dynamic taskName, dynamic taskYaml) { 'required_agent_capabilities', 'flaky', 'timeout_in_minutes', + 'on_luci', ]); final dynamic isFlaky = taskYaml['flaky']; @@ -124,6 +129,12 @@ ManifestTask _validateAndParseTask(dynamic taskName, dynamic taskYaml) { } final List capabilities = _validateAndParseCapabilities(taskName as String, taskYaml['required_agent_capabilities']); + + final dynamic onLuci = taskYaml['on_luci']; + if (onLuci != null) { + _checkType(onLuci is bool, onLuci, 'on_luci', 'boolean'); + } + return ManifestTask._( name: taskName as String, description: taskYaml['description'] as String, @@ -131,6 +142,7 @@ ManifestTask _validateAndParseTask(dynamic taskName, dynamic taskYaml) { requiredAgentCapabilities: capabilities as List, isFlaky: isFlaky as bool ?? false, timeoutInMinutes: timeoutInMinutes as int, + onLuci: onLuci as bool ?? false, ); } diff --git a/dev/devicelab/manifest.yaml b/dev/devicelab/manifest.yaml index 6fb82558591..275405f6c69 100644 --- a/dev/devicelab/manifest.yaml +++ b/dev/devicelab/manifest.yaml @@ -30,6 +30,10 @@ # on should be hidden because they just cause confusion otherwise. # * timeout_in_minutes: integer # a custom task timeout, specified in minutes. +# * on_luci: boolean true or false +# whether the task runs on LUCI builders. Tests will be gradually marked on_luci during the +# devicelab to LUCI migration. And when the migration is complete, on_luci flag will be +# removed. tasks: # Tests of compiling in a variety of modes @@ -96,6 +100,7 @@ tasks: Gallery for iOS from Mac. stage: devicelab_ios required_agent_capabilities: ["mac/ios"] + on_luci: true flutter_gallery_win__compile: description: > @@ -224,6 +229,7 @@ tasks: Checks that flavored builds work on Android. stage: devicelab required_agent_capabilities: ["mac/android"] + on_luci: true channels_integration_test: description: > @@ -369,6 +375,7 @@ tasks: Builds an APK with a --dart-define and verifies it can be used as a constant stage: devicelab required_agent_capabilities: ["linux/android"] + on_luci: true android_obfuscate_test: description: > diff --git a/dev/devicelab/test/manifest_test.dart b/dev/devicelab/test/manifest_test.dart index 8282a9f2491..d0d1fc9b6ca 100644 --- a/dev/devicelab/test/manifest_test.dart +++ b/dev/devicelab/test/manifest_test.dart @@ -103,7 +103,7 @@ tasks: testManifestError( 'invalid task property', - 'Unrecognized property "bar" in Value of task "foo". Allowed properties: description, stage, required_agent_capabilities, flaky, timeout_in_minutes', + 'Unrecognized property "bar" in Value of task "foo". Allowed properties: description, stage, required_agent_capabilities, flaky, timeout_in_minutes, on_luci', ''' tasks: foo: