From abb1758edf29139fe7ec6eca03a447dbf217fb39 Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Thu, 4 Oct 2018 15:30:08 -0700 Subject: [PATCH] Fix places in devicelab tests where it expects the app template. (#22696) I missed some create template conversions in the devicelab directory. --- .../tasks/{module_test.dart => application_test.dart} | 10 +++++----- ...{module_test_ios.dart => application_test_ios.dart} | 8 ++++---- dev/devicelab/bin/tasks/gradle_plugin_test.dart | 4 ++-- dev/devicelab/lib/tasks/perf_tests.dart | 2 +- dev/devicelab/manifest.yaml | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) rename dev/devicelab/bin/tasks/{module_test.dart => application_test.dart} (93%) rename dev/devicelab/bin/tasks/{module_test_ios.dart => application_test_ios.dart} (93%) diff --git a/dev/devicelab/bin/tasks/module_test.dart b/dev/devicelab/bin/tasks/application_test.dart similarity index 93% rename from dev/devicelab/bin/tasks/module_test.dart rename to dev/devicelab/bin/tasks/application_test.dart index 2e037916b0c..1136544883e 100644 --- a/dev/devicelab/bin/tasks/module_test.dart +++ b/dev/devicelab/bin/tasks/application_test.dart @@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart'; import 'package:flutter_devicelab/framework/utils.dart'; import 'package:path/path.dart' as path; -/// Tests that the Flutter module project template works and supports +/// Tests that the Flutter application project template works and supports /// adding Flutter to an existing Android app. Future main() async { await task(() async { @@ -21,15 +21,15 @@ Future main() async { return TaskResult.failure('Could not find Java'); print('\nUsing JAVA_HOME=$javaHome'); - section('Create Flutter module project'); + section('Create Flutter application project'); - final Directory tempDir = Directory.systemTemp.createTempSync('flutter_module_test.'); + final Directory tempDir = Directory.systemTemp.createTempSync('flutter_application_test.'); final Directory projectDir = Directory(path.join(tempDir.path, 'hello')); try { await inDirectory(tempDir, () async { await flutter( 'create', - options: ['--org', 'io.flutter.devicelab', '-t', 'module', 'hello'], + options: ['--org', 'io.flutter.devicelab', '--template=application', 'hello'], ); }); @@ -49,7 +49,7 @@ Future main() async { ); }); - section('Build Flutter module library archive'); + section('Build Flutter application library archive'); await inDirectory(Directory(path.join(projectDir.path, '.android')), () async { await exec( diff --git a/dev/devicelab/bin/tasks/module_test_ios.dart b/dev/devicelab/bin/tasks/application_test_ios.dart similarity index 93% rename from dev/devicelab/bin/tasks/module_test_ios.dart rename to dev/devicelab/bin/tasks/application_test_ios.dart index d8869e9ae5f..e3dfa9a31d1 100644 --- a/dev/devicelab/bin/tasks/module_test_ios.dart +++ b/dev/devicelab/bin/tasks/application_test_ios.dart @@ -10,20 +10,20 @@ import 'package:flutter_devicelab/framework/ios.dart'; import 'package:flutter_devicelab/framework/utils.dart'; import 'package:path/path.dart' as path; -/// Tests that the Flutter module project template works and supports +/// Tests that the Flutter application project template works and supports /// adding Flutter to an existing iOS app. Future main() async { await task(() async { - section('Create Flutter module project'); + section('Create Flutter application project'); - final Directory tempDir = Directory.systemTemp.createTempSync('flutter_module_test.'); + final Directory tempDir = Directory.systemTemp.createTempSync('flutter_application_test.'); final Directory projectDir = Directory(path.join(tempDir.path, 'hello')); try { await inDirectory(tempDir, () async { await flutter( 'create', - options: ['--org', 'io.flutter.devicelab', '-t', 'module', 'hello'], + options: ['--org', 'io.flutter.devicelab', '--template=application', 'hello'], ); }); await prepareProvisioningCertificates(projectDir.path); diff --git a/dev/devicelab/bin/tasks/gradle_plugin_test.dart b/dev/devicelab/bin/tasks/gradle_plugin_test.dart index bda0a9e737a..bbb1db016b1 100644 --- a/dev/devicelab/bin/tasks/gradle_plugin_test.dart +++ b/dev/devicelab/bin/tasks/gradle_plugin_test.dart @@ -158,7 +158,7 @@ class FlutterProject { static Future create(Directory directory, String name) async { await inDirectory(directory, () async { - await flutter('create', options: [name]); + await flutter('create', options: ['--template=app', name]); }); return FlutterProject(directory, name); } @@ -234,7 +234,7 @@ class FlutterPluginProject { static Future create(Directory directory, String name) async { await inDirectory(directory, () async { - await flutter('create', options: ['-t', 'plugin', name]); + await flutter('create', options: ['--template=plugin', name]); }); return FlutterPluginProject(directory, name); } diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart index 1c0901201ef..67ebc07a83c 100644 --- a/dev/devicelab/lib/tasks/perf_tests.dart +++ b/dev/devicelab/lib/tasks/perf_tests.dart @@ -76,7 +76,7 @@ TaskFunction createBasicMaterialCompileTest() { rmTree(sampleDir); await inDirectory(Directory.systemTemp, () async { - await flutter('create', options: [sampleAppName]); + await flutter('create', options: ['--template=app', sampleAppName]); }); if (!(await sampleDir.exists())) diff --git a/dev/devicelab/manifest.yaml b/dev/devicelab/manifest.yaml index 699af3257a3..ee8c90d0ca8 100644 --- a/dev/devicelab/manifest.yaml +++ b/dev/devicelab/manifest.yaml @@ -263,9 +263,9 @@ tasks: stage: devicelab required_agent_capabilities: ["linux/android"] - module_test: + application_test: description: > - Checks that the module project template works and supports add2app on Android. + Checks that the application project template works and supports add2app on Android. stage: devicelab required_agent_capabilities: ["linux/android"] @@ -297,9 +297,9 @@ tasks: stage: devicelab_ios required_agent_capabilities: ["mac/ios"] - module_test_ios: + application_test_ios: description: > - Checks that the module project template works and supports add2app on iOS. + Checks that the application project template works and supports add2app on iOS. stage: devicelab required_agent_capabilities: ["mac/ios"]