From 826980badbe357efee6e57f214fc00df8504e0f0 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Fri, 23 Apr 2021 15:12:43 -0700 Subject: [PATCH] Test the skp_generator. --- dev/bots/test.dart | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 245c865df6266..69ea696a5acee 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -112,6 +112,7 @@ Future main(List args) async { 'web_integration_tests': _runWebIntegrationTests, 'web_long_running_tests': _runWebLongRunningTests, 'flutter_plugins': _runFlutterPluginsTests, + 'skp_generator': _runSkpGeneratorTests, kSmokeTestShardName: () async {}, // No-op, the smoke tests already ran. Used for testing this script. }); } on ExitException catch (error) { @@ -308,7 +309,7 @@ Future _runToolTests() async { Future runForbiddenFromReleaseTests() async { // Build a release APK to get the snapshot json. - final Directory tempDirectory = Directory.systemTemp.createTempSync('forbidden_imports'); + final Directory tempDirectory = Directory.systemTemp.createTempSync('flutter_forbidden_imports.'); final List command = [ 'build', 'apk', @@ -868,7 +869,7 @@ Future getFlutterPluginsVersion({ Future _runFlutterPluginsTests() async { Future runAnalyze() async { print('${green}Running analysis for flutter/plugins$reset'); - final Directory checkout = Directory.systemTemp.createTempSync('plugins'); + final Directory checkout = Directory.systemTemp.createTempSync('flutter_plugins.'); await runCommand( 'git', [ @@ -907,6 +908,32 @@ Future _runFlutterPluginsTests() async { }); } +/// Runs the skp_generator from the flutter/tests repo. +/// +/// See also the customer_tests shard. +/// +/// Generated SKPs are ditched, this just verifies that it can run without failure. +Future _runSkpGeneratorTests() async { + print('${green}Running skp_generator from flutter/tests$reset'); + final Directory checkout = Directory.systemTemp.createTempSync('flutter_skp_generator.'); + await runCommand( + 'git', + [ + '-c', + 'core.longPaths=true', + 'clone', + 'https://github.com/flutter/tests.git', + '.' + ], + workingDirectory: checkout.path, + ); + await runCommand( + './build.sh', + [ ], + workingDirectory: path.join(checkout.path, 'skp_generator'), + ); +} + // The `chromedriver` process created by this test. // // If an existing chromedriver is already available on port 4444, the existing