From 2b4a23586dbaf009bd3f837bc2ad70f873fff611 Mon Sep 17 00:00:00 2001 From: Amir Hardon Date: Mon, 23 Nov 2020 12:28:28 -0800 Subject: [PATCH] Add a post-submit test shard for flutter/plugins tests (#70887) Adds a new Luci test shard that runs flutter/plugins tests. For now only the analysis phase of the flutter/plugins test suite is executed. Manual invocation on Luci completed successfully: https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/amirha_google.com/3210bb2dac01fca71b7db04dda02fa6ccd4df025afd55abea1970d26087d4962/+/annotations --- dev/bots/test.dart | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 2aca003464..c0c732de40 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -142,6 +142,7 @@ Future main(List args) async { 'web_tests': _runWebUnitTests, 'web_integration_tests': _runWebIntegrationTests, 'web_long_running_tests': _runWebLongRunningTests, + 'flutter_plugins': _runFlutterPluginsTests, }); } on ExitException catch (error) { error.apply(); @@ -860,6 +861,47 @@ Future _runWebLongRunningTests() async { await _stopChromeDriver(); } +/// Executes the test suite for the flutter/plugins repo. +Future _runFlutterPluginsTests() async { + Future runAnalyze() async { + print('${green}Running analysis for flutter/plugins$reset'); + final Directory checkout = Directory.systemTemp.createTempSync('plugins'); + await runCommand( + 'git', + [ + '-c', + 'core.longPaths=true', + 'clone', + 'https://github.com/flutter/plugins.git', + '.' + ], + workingDirectory: checkout.path, + ); + await runCommand( + pub, + [ + 'global', + 'activate', + 'flutter_plugin_tools', + ], + workingDirectory: checkout.path, + ); + await runCommand( + pub, + [ + 'global', + 'run', + 'flutter_plugin_tools', + 'analyze', + ], + workingDirectory: checkout.path, + ); + } + await selectSubshard({ + 'analyze': runAnalyze, + }); +} + // The `chromedriver` process created by this test. // // If an existing chromedriver is already available on port 4444, the existing