[go: nahoru, domu]

Skip to content

Commit

Permalink
Enable linux and win hostonly devicelab tests. (flutter#66085)
Browse files Browse the repository at this point in the history
  • Loading branch information
godofredoc committed Sep 21, 2020
1 parent cb232dd commit cfe53fd
Show file tree
Hide file tree
Showing 4 changed files with 261 additions and 47 deletions.
22 changes: 2 additions & 20 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ task:
<<: *FIREBASE_SHARD_TEMPLATE

- name: web_smoke_test
only_if: "changesInclude('.cirrus.yml', 'examples/hello_world/**' ,'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'packages/flutter_web_plugins/**', 'bin/**') || $CIRRUS_PR == ''"
only_if: "changesInclude('.cirrus.yml', 'examples/hello_world/**' ,'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'packages/flutter_web_plugins/**', 'bin/**') && $CIRRUS_PR != ''"
environment:
# Tests Hello World with Flutter Web Engine using Flutter Driver. Should not need more resources.
CPU: 2
Expand Down Expand Up @@ -314,7 +314,7 @@ task:
CPU: 6
MEMORY: 8G

- name: hostonly_devicelab_tests-1-windows
- name: hostonly_devicelab_tests-1_last-windows
<< : *WINDOWS_SHARD_TEMPLATE
environment:
# As of December 2019, the hostonly_devicelab_tests-1-windows shard requires 4 GB RAM to
Expand All @@ -323,24 +323,6 @@ task:
CPU: 4
MEMORY: 6G

- name: hostonly_devicelab_tests-2-windows
<< : *WINDOWS_SHARD_TEMPLATE
environment:
# As of December 2019, the hostonly_devicelab_tests-2-windows shard required 2 GB RAM to
# succeed. The optimal configuration was 4 CPUs and 8 GB RAM, running in ~33 minutes.
# Less CPU or RAM ran slower, and more CPU or RAM yielded no extra gain.
CPU: 4
MEMORY: 8G

- name: hostonly_devicelab_tests-3_last-windows
<< : *WINDOWS_SHARD_TEMPLATE
environment:
# As of December 2019, the hostonly_devicelab_tests-3_last-windows shard required 6 GB RAM
# to succeed. The optimal configuration was 4 CPUs and 6 GB RAM, running in ~43 minutes.
# Less CPU or RAM ran slower, and more CPU or RAM yielded no extra gain.
CPU: 4
MEMORY: 6G

# MACOS SHARDS
# Mac doesn't use caches because they apparently take longer to populate and save
# than just fetching the data in the first place.
Expand Down
25 changes: 2 additions & 23 deletions dev/bots/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ final bool useFlutterTestFormatter = Platform.environment['FLUTTER_TEST_FORMATTE
///
/// WARNING: if you change this number, also change .cirrus.yml
/// and make sure it runs _all_ shards.
const int kDeviceLabShardCount = 4;
const int kDeviceLabShardCount = 2;

/// The number of Cirrus jobs that run build tests in parallel.
///
Expand Down Expand Up @@ -1223,39 +1223,18 @@ Future<void> _runHostOnlyDeviceLabTests() async {
// TODO(ianh): Move the tests that are not running on devicelab any more out
// of the device lab directory.

const Map<String, String> kChromeVariables = <String, String>{
// This is required to be able to run Chrome on Cirrus and LUCI.
'CHROME_NO_SANDBOX': 'true',
// Causes Chrome to run in headless mode in environments without displays,
// such as Cirrus and LUCI. Do not use this variable when recording actual
// benchmark numbers.
'UNCALIBRATED_SMOKE_TEST': 'true',
};

// List the tests to run.
// We split these into subshards. The tests are randomly distributed into
// those subshards so as to get a uniform distribution of costs, but the
// seed is fixed so that issues are reproducible.
final List<ShardRunner> tests = <ShardRunner>[
// Keep this in alphabetical order.
() => _runDevicelabTest('build_aar_module_test', environment: gradleEnvironment),
() => _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),
() => _runDevicelabTest('gradle_non_android_plugin_test', environment: gradleEnvironment),
() => _runDevicelabTest('gradle_plugin_bundle_test', environment: gradleEnvironment),
() => _runDevicelabTest('gradle_plugin_fat_apk_test', environment: gradleEnvironment),
() => _runDevicelabTest('gradle_jetifier_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'),
() => _runDevicelabTest('plugin_test', environment: gradleEnvironment),
if (Platform.isLinux) () => _runDevicelabTest('web_benchmarks_html', environment: kChromeVariables),
]..shuffle(math.Random(0));

await _selectIndexedSubshard(tests, kDeviceLabShardCount);
Expand Down
124 changes: 122 additions & 2 deletions dev/prod_builders.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"task_name": "linux_analyze",
"flaky": false
},
{
"name": "Linux build_aar_module_test",
"repo": "flutter",
"task_name": "linux_build_aar_module_test",
"flaky": false
},
{
"name": "Linux customer_testing",
"repo": "flutter",
Expand Down Expand Up @@ -37,9 +43,75 @@
"flaky": false
},
{
"name": "Linux hostonly_devicelab_tests",
"name": "Linux gradle_fast_start_test",
"repo": "flutter",
"task_name": "linux_gradle_fast_start_test",
"flaky": false
},
{
"name": "Linux gradle_jetifier_test",
"repo": "flutter",
"task_name": "linux_gradle_jetifier_test",
"flaky": false
},
{
"name": "Linux gradle_non_android_plugin_test",
"repo": "flutter",
"task_name": "linux_gradle_non_android_plugin_test",
"flaky": false
},
{
"name": "Linux gradle_plugin_bundle_test",
"repo": "flutter",
"task_name": "linux_gradle_plugin_bundle_test",
"flaky": false
},
{
"name": "Linux gradle_plugin_fat_apk_test",
"repo": "flutter",
"task_name": "linux_gradle_plugin_fat_apk_test",
"flaky": false
},
{
"name": "Linux gradle_plugin_light_apk_test",
"repo": "flutter",
"task_name": "linux_gradle_plugin_light_apk_test",
"flaky": false
},
{
"name": "Linux gradle_r8_test",
"repo": "flutter",
"task_name": "linux_gradle_r8_test",
"flaky": false
},
{
"name": "Linux module_custom_host_app_name_test",
"repo": "flutter",
"task_name": "linux_module_custom_host_app_name_test",
"flaky": false
},
{
"name": "Linux module_host_with_custom_build_test",
"repo": "flutter",
"task_name": "linux_module_host_with_custom_build_test",
"flaky": false
},
{
"name": "Linux module_test",
"repo": "flutter",
"task_name": "linux_hostonly_devicelab_tests",
"task_name": "linux_module_test",
"flaky": false
},
{
"name": "Linux plugin_dependencies_test",
"repo": "flutter",
"task_name": "linux_plugin_dependencies_test",
"flaky": false
},
{
"name": "Linux plugin_test",
"repo": "flutter",
"task_name": "linux_plugin_test",
"flaky": false
},
{
Expand All @@ -48,6 +120,12 @@
"task_name": "linux_tool_tests",
"flaky": false
},
{
"name": "Linux web_benchmarks_html",
"repo": "flutter",
"task_name": "linux_web_benchmarks_html",
"flaky": false
},
{
"name": "Linux web_tests",
"repo": "flutter",
Expand Down Expand Up @@ -204,6 +282,48 @@
"task_name": "win_framework_tests",
"flaky": false
},
{
"name": "Windows gradle_fast_start_test",
"repo": "flutter",
"task_name": "win_gradle_fast_start_test",
"flaky": false
},
{
"name": "Windows gradle_non_android_plugin_test",
"repo": "flutter",
"task_name": "win_gradle_non_android_plugin_test",
"flaky": false
},
{
"name": "Windows gradle_plugin_bundle_test",
"repo": "flutter",
"task_name": "win_gradle_plugin_bundle_test",
"flaky": false
},
{
"name": "Windows gradle_plugin_fat_apk_test",
"repo": "flutter",
"task_name": "win_gradle_plugin_fat_apk_test",
"flaky": false
},
{
"name": "Windows gradle_r8_test",
"repo": "flutter",
"task_name": "win_gradle_r8_test",
"flaky": false
},
{
"name": "Windows module_host_with_custom_build_test",
"repo": "flutter",
"task_name": "win_module_host_with_custom_build_test",
"flaky": false
},
{
"name": "Windows plugin_test",
"repo": "flutter",
"task_name": "win_plugin_test",
"flaky": false
},
{
"name": "Windows tool_tests",
"repo": "flutter",
Expand Down
Loading

0 comments on commit cfe53fd

Please sign in to comment.