Unverified Commit f761ae2c authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Adopt tool_test shard builders (#75171)

parent 9fd5242e
...@@ -119,8 +119,6 @@ Future<void> main(List<String> args) async { ...@@ -119,8 +119,6 @@ Future<void> main(List<String> args) async {
'framework_tests': _runFrameworkTests, 'framework_tests': _runFrameworkTests,
'tool_coverage': _runToolCoverage, 'tool_coverage': _runToolCoverage,
'tool_tests': _runToolTests, 'tool_tests': _runToolTests,
'tool_general_tests': _runGeneralToolTests,
'tool_command_tests': _runCommandsToolTests,
'tool_integration_tests': _runIntegrationToolTests, 'tool_integration_tests': _runIntegrationToolTests,
'web_tool_tests': _runWebToolTests, 'web_tool_tests': _runWebToolTests,
'web_tests': _runWebUnitTests, 'web_tests': _runWebUnitTests,
...@@ -348,39 +346,11 @@ Future<void> _runIntegrationToolTests() async { ...@@ -348,39 +346,11 @@ Future<void> _runIntegrationToolTests() async {
); );
} }
// TODO(jmagman): Remove once LUCI configs are migrated to tool_tests_general, tool_tests_command, and tool_tests_integration.
Future<void> _runToolTests() async { Future<void> _runToolTests() async {
const String kDotShard = '.shard'; await selectSubshard(<String, ShardRunner>{
const String kWeb = 'web'; 'general': _runGeneralToolTests,
const String kTest = 'test'; 'commands': _runCommandsToolTests,
final String toolsPath = path.join(flutterRoot, 'packages', 'flutter_tools'); });
final Map<String, ShardRunner> subshards = Map<String, ShardRunner>.fromIterable(
Directory(path.join(toolsPath, kTest))
.listSync()
.map<String>((FileSystemEntity entry) => entry.path)
.where((String name) => name.endsWith(kDotShard))
.where((String name) => path.basenameWithoutExtension(name) != kWeb)
.map<String>((String name) => path.basenameWithoutExtension(name)),
// The `dynamic` on the next line is because Map.fromIterable isn't generic.
value: (dynamic subshard) => () async {
// Due to https://github.com/flutter/flutter/issues/46180, skip the hermetic directory
// on Windows.
final String suffix = Platform.isWindows && subshard == 'commands'
? 'permeable'
: '';
await _pubRunTest(
toolsPath,
forceSingleCore: subshard != 'general',
testPaths: <String>[path.join(kTest, '$subshard$kDotShard', suffix)],
enableFlutterToolAsserts: subshard != 'general',
// Detect unit test time regressions (poor time delay handling, etc).
perTestTimeout: (subshard == 'general') ? const Duration(seconds: 2) : null,
);
},
);
await selectSubshard(subshards);
} }
Future<void> _runWebToolTests() async { Future<void> _runWebToolTests() async {
......
...@@ -378,6 +378,12 @@ ...@@ -378,6 +378,12 @@
"task_name": "linux_tool_tests", "task_name": "linux_tool_tests",
"flaky": false "flaky": false
}, },
{
"name": "Linux tool_integration_tests",
"repo": "flutter",
"task_name": "linux_tool_integration_tests",
"flaky": true
},
{ {
"name": "Linux web_tool_tests", "name": "Linux web_tool_tests",
"repo": "flutter", "repo": "flutter",
...@@ -762,6 +768,12 @@ ...@@ -762,6 +768,12 @@
"task_name": "mac_tool_tests", "task_name": "mac_tool_tests",
"flaky": false "flaky": false
}, },
{
"name": "Mac tool_integration_tests",
"repo": "flutter",
"task_name": "mac_tool_integration_tests",
"flaky": true
},
{ {
"name": "Windows build_aar_module_test", "name": "Windows build_aar_module_test",
"repo": "flutter", "repo": "flutter",
...@@ -840,6 +852,12 @@ ...@@ -840,6 +852,12 @@
"task_name": "win_tool_tests", "task_name": "win_tool_tests",
"flaky": false "flaky": false
}, },
{
"name": "Windows tool_integration_tests",
"repo": "flutter",
"task_name": "win_tool_integration_tests",
"flaky": true
},
{ {
"name": "Windows web_tool_tests", "name": "Windows web_tool_tests",
"repo": "flutter", "repo": "flutter",
......
...@@ -133,6 +133,13 @@ ...@@ -133,6 +133,13 @@
"enabled":true, "enabled":true,
"run_if":["dev/", "packages/flutter_tools/", "bin/"] "run_if":["dev/", "packages/flutter_tools/", "bin/"]
}, },
{
"name":"Linux tool_integration_tests",
"repo":"flutter",
"task_name":"linux_tool_integration_tests",
"enabled":true,
"run_if":["dev/", "packages/flutter_tools/", "bin/"]
},
{ {
"name":"Linux web_tool_tests", "name":"Linux web_tool_tests",
"repo":"flutter", "repo":"flutter",
...@@ -298,6 +305,13 @@ ...@@ -298,6 +305,13 @@
"enabled":true, "enabled":true,
"run_if":["dev/**", "packages/flutter_tools/**", "bin/**"] "run_if":["dev/**", "packages/flutter_tools/**", "bin/**"]
}, },
{
"name":"Mac tool_integration_tests",
"repo":"flutter",
"task_name":"mac_tool_integration_tests",
"enabled":true,
"run_if":["dev/**", "packages/flutter_tools/**", "bin/**"]
},
{ {
"name":"Mac web_tool_tests", "name":"Mac web_tool_tests",
"repo":"flutter", "repo":"flutter",
...@@ -384,7 +398,15 @@ ...@@ -384,7 +398,15 @@
"name": "Windows tool_tests", "name": "Windows tool_tests",
"repo": "flutter", "repo": "flutter",
"task_name": "win_tool_tests", "task_name": "win_tool_tests",
"enabled":true "enabled":true,
"run_if":["dev/**", "packages/flutter_tools/**", "bin/**"]
},
{
"name": "Windows tool_integration_tests",
"repo": "flutter",
"task_name": "win_tool_integration_tests",
"enabled":true,
"run_if":["dev/**", "packages/flutter_tools/**", "bin/**"]
}, },
{ {
"name": "Windows web_tool_tests", "name": "Windows web_tool_tests",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment