Unverified Commit bb79ff3b authored by Dan Field's avatar Dan Field Committed by GitHub

More shards (#34877)

Shard tool_tests
parent cfe4d0d7
...@@ -88,10 +88,33 @@ task: ...@@ -88,10 +88,33 @@ task:
container: container:
cpu: 4 cpu: 4
memory: 12G memory: 12G
# all of the tests except the ones in test/integration and test/commands/create_test for packages/flutter_tools
- name: tool_tests-linux - name: tool_tests-linux
env: env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests SHARD: tool_tests
SUBSHARD: tool
test_script:
- dart --enable-asserts ./dev/bots/test.dart
container:
cpu: 4
memory: 12G
- name: tool_tests_create-linux
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
SUBSHARD: create
test_script:
- dart --enable-asserts ./dev/bots/test.dart
container:
cpu: 4
memory: 12G
# all of the tests in test/integration for packages/flutter_tools
- name: tool_tests_integration-linux
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
SUBSHARD: integration
test_script: test_script:
- dart --enable-asserts ./dev/bots/test.dart - dart --enable-asserts ./dev/bots/test.dart
container: container:
...@@ -185,6 +208,57 @@ task: ...@@ -185,6 +208,57 @@ task:
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
windows_container:
image: cirrusci/android-sdk:28-windowsservercore-2019
os_version: 2019
cpu: 4
env:
CIRRUS_WORKING_DIR: "C:\\Windows\\Temp\\flutter sdk"
git_fetch_script:
- git clean -xfd
- git fetch origin
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
pub_cache:
folder: $APPDATA\Pub\Cache
fingerprint_script:
- ps: $Env:OS; Get-ChildItem -Path "$Env:CIRRUS_WORKING_DIR" pubspec.yaml -Recurse | Select-String -Pattern "PUBSPEC CHECKSUM" -SimpleMatch
flutter_pkg_cache:
folder: bin\cache\pkg
fingerprint_script: echo %OS% & type bin\internal\engine.version
artifacts_cache:
folder: bin\cache\artifacts
fingerprint_script: echo %OS% & type bin\internal\engine.version
setup_script:
- bin\flutter.bat config --no-analytics
- bin\flutter.bat doctor -v
- bin\flutter.bat update-packages
- git fetch origin master
test_all_script:
- bin\cache\dart-sdk\bin\dart.exe --enable-asserts dev\bots\test.dart
matrix:
# all of the tests except test/integration and test/commands/create_test for packages/flutter_tools
- name: tool_tests-windows
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
SUBSHARD: tool
SHARD_INDEX: 1
# all of the tests in test/commands/create_test
- name: tool_tests_create-windows
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
SUBSHARD: create
# all of the tests in test/integration for packages/flutter_tools
- name: tool_tests_integration-windows
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
SUBSHARD: integration
task: task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
windows_container: windows_container:
...@@ -230,10 +304,6 @@ task: ...@@ -230,10 +304,6 @@ task:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tests SHARD: tests
SUBSHARD: extras SUBSHARD: extras
- name: tool_tests-windows
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
- name: build_tests-windows - name: build_tests-windows
env: env:
SHARD: build_tests SHARD: build_tests
...@@ -285,6 +355,58 @@ task: ...@@ -285,6 +355,58 @@ task:
test_all_script: test_all_script:
- ./dev/bots/deploy_gallery.sh - ./dev/bots/deploy_gallery.sh
task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: mojave-xcode-10.1
depends_on:
- analyze
env:
CIRRUS_WORKING_DIR: "/tmp/flutter sdk"
COCOAPODS_DISABLE_STATS: true
print_date_script:
- date
git_fetch_script:
- git clean -xfd
- git fetch origin
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
pub_cache:
folder: $HOME/.pub-cache
fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR"
flutter_pkg_cache:
folder: bin/cache/pkg
fingerprint_script: echo $OS; cat bin/internal/engine.version
artifacts_cache:
folder: bin/cache/artifacts
fingerprint_script: echo $OS; cat bin/internal/engine.version
setup_script:
- bin/flutter config --no-analytics
- bin/flutter doctor -v
- bin/flutter update-packages
test_all_script: |
ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
bin/cache/dart-sdk/bin/dart --enable-asserts dev/bots/test.dart
matrix:
# all of the tests except test/integration and test/commands/create_test for packages/flutter_tools
- name: tool_tests-macos
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
SUBSHARD: tool
SHARD_INDEX: 1
# all of the tests in test/commands/create_test
- name: tool_tests_create-macos
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
SUBSHARD: create
# all of the tests in test/integration for packages/flutter_tools
- name: tool_tests_integration-macos
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
SUBSHARD: integration
task: task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance: osx_instance:
...@@ -310,10 +432,6 @@ task: ...@@ -310,10 +432,6 @@ task:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tests SHARD: tests
SUBSHARD: extras SUBSHARD: extras
- name: tool_tests-macos
env:
GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD: tool_tests
- name: $SHARD-macos - name: $SHARD-macos
env: env:
matrix: matrix:
...@@ -368,6 +486,8 @@ docker_builder: ...@@ -368,6 +486,8 @@ docker_builder:
- tests_framework_other-linux - tests_framework_other-linux
- tests_extras-linux - tests_extras-linux
- tool_tests-linux - tool_tests-linux
- tool_tests_create-linux
- tool_tests_integration-linux
- build_tests-linux - build_tests-linux
- integration_tests-linux - integration_tests-linux
- integration_tests_gradle-linux - integration_tests_gradle-linux
......
...@@ -469,6 +469,19 @@ Future<void> _buildRunnerTest( ...@@ -469,6 +469,19 @@ Future<void> _buildRunnerTest(
pubEnvironment['FLUTTER_TOOL_ARGS'] = toolsArgs.trim(); pubEnvironment['FLUTTER_TOOL_ARGS'] = toolsArgs.trim();
} }
final String subShard = Platform.environment['SUBSHARD'];
switch (subShard) {
case 'integration':
args.addAll(<String>['--tags', 'integration']);
break;
case 'create':
args.addAll(<String>['--tags', 'create']);
break;
case 'tool':
args.addAll(<String>['-x', 'integration', '-x', 'create']);
break;
}
if (useFlutterTestFormatter) { if (useFlutterTestFormatter) {
final FlutterCompactFormatter formatter = FlutterCompactFormatter(); final FlutterCompactFormatter formatter = FlutterCompactFormatter();
final Stream<String> testOutput = runAndGetStdout( final Stream<String> testOutput = runAndGetStdout(
...@@ -512,6 +525,17 @@ Future<void> _pubRunTest( ...@@ -512,6 +525,17 @@ Future<void> _pubRunTest(
toolsArgs += ' --enable-asserts'; toolsArgs += ' --enable-asserts';
pubEnvironment['FLUTTER_TOOL_ARGS'] = toolsArgs.trim(); pubEnvironment['FLUTTER_TOOL_ARGS'] = toolsArgs.trim();
} }
final String subShard = Platform.environment['SUBSHARD'];
switch (subShard) {
case 'integration':
args.addAll(<String>['--tags', 'integration']);
break;
case 'tool':
args.addAll(<String>['--exclude-tags', 'integration']);
break;
}
if (useFlutterTestFormatter) { if (useFlutterTestFormatter) {
final FlutterCompactFormatter formatter = FlutterCompactFormatter(); final FlutterCompactFormatter formatter = FlutterCompactFormatter();
final Stream<String> testOutput = runAndGetStdout( final Stream<String> testOutput = runAndGetStdout(
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
@Tags(<String>['create'])
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:typed_data'; import 'dart:typed_data';
......
...@@ -90,5 +90,5 @@ void main() { ...@@ -90,5 +90,5 @@ void main() {
expect(result, isList); expect(result, isList);
expect(result, isNotEmpty); expect(result, isNotEmpty);
}); });
}, timeout: const Timeout.factor(10)); // This test uses the `flutter` tool, which could be blocked behind the startup lock for a long time. }, timeout: const Timeout.factor(10), tags: <String>['integration']); // This test uses the `flutter` tool, which could be blocked behind the startup lock for a long time.
} }
...@@ -49,5 +49,5 @@ void main() { ...@@ -49,5 +49,5 @@ void main() {
reason: 'After $i steps, debugger should stop at $expectedLine but stopped at $actualLine'); reason: 'After $i steps, debugger should stop at $expectedLine but stopped at $actualLine');
} }
}); });
}, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. }, timeout: const Timeout.factor(10), tags: <String>['integration']); // The DevFS sync takes a really long time, so these tests can be slow.
} }
...@@ -81,7 +81,7 @@ void main() { ...@@ -81,7 +81,7 @@ void main() {
await breakInBuildMethod(_flutter); await breakInBuildMethod(_flutter);
await evaluateComplexReturningExpressions(_flutter); await evaluateComplexReturningExpressions(_flutter);
}); });
}, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. }, timeout: const Timeout.factor(10), tags: <String>['integration']); // The DevFS sync takes a really long time, so these tests can be slow.
group('flutter test expression evaluation', () { group('flutter test expression evaluation', () {
Directory tempDir; Directory tempDir;
...@@ -126,7 +126,7 @@ void main() { ...@@ -126,7 +126,7 @@ void main() {
await evaluateComplexReturningExpressions(_flutter); await evaluateComplexReturningExpressions(_flutter);
}); });
// Skipped due to https://github.com/flutter/flutter/issues/26518 // Skipped due to https://github.com/flutter/flutter/issues/26518
}, timeout: const Timeout.factor(10), skip: true); // The DevFS sync takes a really long time, so these tests can be slow. }, timeout: const Timeout.factor(10), skip: true, tags: <String>['integration']); // The DevFS sync takes a really long time, so these tests can be slow.
} }
Future<void> evaluateTrivialExpressions(FlutterTestDriver flutter) async { Future<void> evaluateTrivialExpressions(FlutterTestDriver flutter) async {
......
...@@ -58,5 +58,5 @@ void main() { ...@@ -58,5 +58,5 @@ void main() {
await _flutterAttach.attach(_flutterRun.vmServicePort); await _flutterAttach.attach(_flutterRun.vmServicePort);
await _flutterAttach.hotReload(); await _flutterAttach.hotReload();
}); });
}, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. }, timeout: const Timeout.factor(10), tags: <String>['integration']); // The DevFS sync takes a really long time, so these tests can be slow.
} }
...@@ -55,5 +55,5 @@ void main() { ...@@ -55,5 +55,5 @@ void main() {
await _flutter.run(pidFile: pidFile); await _flutter.run(pidFile: pidFile);
expect(pidFile.existsSync(), isTrue); expect(pidFile.existsSync(), isTrue);
}); });
}, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. }, timeout: const Timeout.factor(10), tags: <String>['integration']); // The DevFS sync takes a really long time, so these tests can be slow.
} }
...@@ -149,5 +149,5 @@ void main() { ...@@ -149,5 +149,5 @@ void main() {
await _flutter.resume(); await _flutter.resume();
await subscription.cancel(); await subscription.cancel();
}); });
}, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. }, timeout: const Timeout.factor(10), tags: <String>['integration']); // The DevFS sync takes a really long time, so these tests can be slow.
} }
...@@ -45,5 +45,5 @@ void main() { ...@@ -45,5 +45,5 @@ void main() {
await Future<void>.delayed(requiredLifespan); await Future<void>.delayed(requiredLifespan);
expect(_flutter.hasExited, equals(false)); expect(_flutter.hasExited, equals(false));
}); });
}, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. }, timeout: const Timeout.factor(10), tags: <String>['integration']); // The DevFS sync takes a really long time, so these tests can be slow.
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment