From 4e20f00053dd365924a0d9e56f2f79d6b28358aa Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 14 Sep 2020 17:54:59 -0700 Subject: [PATCH] [ci] remove create offline tests (#65791) Currently these tests are taking CI time without providing any value, because there is no verification that network connectivity is avoided. This is better covered by a unit test that verifies that --offline is passed to pub. --- dev/bots/test.dart | 5 ---- .../flutter_create_offline_test_linux.dart | 10 ------- .../flutter_create_offline_test_mac.dart | 10 ------- .../flutter_create_offline_test_windows.dart | 10 ------- .../lib/tasks/integration_tests.dart | 30 ------------------- 5 files changed, 65 deletions(-) delete mode 100644 dev/devicelab/bin/tasks/flutter_create_offline_test_linux.dart delete mode 100644 dev/devicelab/bin/tasks/flutter_create_offline_test_mac.dart delete mode 100644 dev/devicelab/bin/tasks/flutter_create_offline_test_windows.dart diff --git a/dev/bots/test.dart b/dev/bots/test.dart index fc6cc0b7ff..1054da5d94 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -1239,9 +1239,6 @@ Future _runHostOnlyDeviceLabTests() async { final List tests = [ // Keep this in alphabetical order. () => _runDevicelabTest('build_aar_module_test', environment: gradleEnvironment), - if (Platform.isMacOS) () => _runDevicelabTest('flutter_create_offline_test_mac'), - if (Platform.isLinux) () => _runDevicelabTest('flutter_create_offline_test_linux'), - if (Platform.isWindows) () => _runDevicelabTest('flutter_create_offline_test_windows'), () => _runDevicelabTest('gradle_fast_start_test', environment: gradleEnvironment), // TODO(ianh): Fails on macOS looking for "dexdump", https://github.com/flutter/flutter/issues/42494 if (!Platform.isMacOS) () => _runDevicelabTest('gradle_jetifier_test', environment: gradleEnvironment), @@ -1251,12 +1248,10 @@ Future _runHostOnlyDeviceLabTests() async { () => _runDevicelabTest('gradle_plugin_fat_apk_test', environment: gradleEnvironment), () => _runDevicelabTest('gradle_plugin_light_apk_test', environment: gradleEnvironment), () => _runDevicelabTest('gradle_r8_test', environment: gradleEnvironment), - () => _runDevicelabTest('module_host_with_custom_build_test', environment: gradleEnvironment, testEmbeddingV2: true), () => _runDevicelabTest('module_custom_host_app_name_test', environment: gradleEnvironment), () => _runDevicelabTest('module_test', environment: gradleEnvironment, testEmbeddingV2: true), () => _runDevicelabTest('plugin_dependencies_test', environment: gradleEnvironment), - if (Platform.isMacOS) () => _runDevicelabTest('module_test_ios'), if (Platform.isMacOS) () => _runDevicelabTest('build_ios_framework_module_test'), if (Platform.isMacOS) () => _runDevicelabTest('plugin_lint_mac'), diff --git a/dev/devicelab/bin/tasks/flutter_create_offline_test_linux.dart b/dev/devicelab/bin/tasks/flutter_create_offline_test_linux.dart deleted file mode 100644 index 7d2de7da91..0000000000 --- a/dev/devicelab/bin/tasks/flutter_create_offline_test_linux.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter_devicelab/framework/framework.dart'; -import 'package:flutter_devicelab/tasks/integration_tests.dart'; - -Future main() async { - await task(createFlutterCreateOfflineTest()); -} diff --git a/dev/devicelab/bin/tasks/flutter_create_offline_test_mac.dart b/dev/devicelab/bin/tasks/flutter_create_offline_test_mac.dart deleted file mode 100644 index 7d2de7da91..0000000000 --- a/dev/devicelab/bin/tasks/flutter_create_offline_test_mac.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter_devicelab/framework/framework.dart'; -import 'package:flutter_devicelab/tasks/integration_tests.dart'; - -Future main() async { - await task(createFlutterCreateOfflineTest()); -} diff --git a/dev/devicelab/bin/tasks/flutter_create_offline_test_windows.dart b/dev/devicelab/bin/tasks/flutter_create_offline_test_windows.dart deleted file mode 100644 index 7d2de7da91..0000000000 --- a/dev/devicelab/bin/tasks/flutter_create_offline_test_windows.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter_devicelab/framework/framework.dart'; -import 'package:flutter_devicelab/tasks/integration_tests.dart'; - -Future main() async { - await task(createFlutterCreateOfflineTest()); -} diff --git a/dev/devicelab/lib/tasks/integration_tests.dart b/dev/devicelab/lib/tasks/integration_tests.dart index 2607a29582..c9a4dc0aa7 100644 --- a/dev/devicelab/lib/tasks/integration_tests.dart +++ b/dev/devicelab/lib/tasks/integration_tests.dart @@ -3,9 +3,7 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:io'; -import 'package:path/path.dart' as path; import '../framework/adb.dart'; import '../framework/framework.dart'; import '../framework/utils.dart'; @@ -88,34 +86,6 @@ TaskFunction createImageLoadingIntegrationTest() { ); } -TaskFunction createFlutterCreateOfflineTest() { - return () async { - final Directory tempDir = Directory.systemTemp.createTempSync('flutter_create_test.'); - String output; - // The default create template has an actual online dependency against - // a pub package. Make sure it's available in pub cache first before - // trying to resolve it offline. - await inDirectory(tempDir, () async { - output = await eval( - path.join(flutterDirectory.path, 'bin', 'flutter'), - ['pub', 'cache', 'add', 'cupertino_icons', '--version', '1.0.0'], - ); - }); - await inDirectory(tempDir, () async { - output = await eval( - path.join(flutterDirectory.path, 'bin', 'flutter'), - ['create', '--offline', 'flutter_create_test'], - ); - }); - if (output.contains(RegExp('building flutter tool', caseSensitive: false))) { - return TaskResult.failure('`flutter create --offline` should not rebuild flutter tool'); - } else if (!output.contains('All done!')) { - return TaskResult.failure('`flutter create` failed'); - } - return TaskResult.success(null); - }; -} - TaskFunction createAndroidSplashScreenKitchenSinkTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink',