Unverified Commit 8d643013 authored by Yegor's avatar Yegor Committed by GitHub

add AOT smoke tests to Cirrus (#22751)

parent c689c97d
...@@ -62,6 +62,14 @@ task: ...@@ -62,6 +62,14 @@ task:
container: container:
cpu: 4 cpu: 4
memory: 8G memory: 8G
- name: aot_build_tests-linux
env:
SHARD: aot_build_tests
test_script:
- dart ./dev/bots/test.dart
container:
cpu: 4
memory: 8G
- name: codelabs-build-test - name: codelabs-build-test
env: env:
SHARD: codelabs-build-test SHARD: codelabs-build-test
......
...@@ -21,6 +21,7 @@ final List<String> flutterTestArgs = <String>[]; ...@@ -21,6 +21,7 @@ final List<String> flutterTestArgs = <String>[];
const Map<String, ShardRunner> _kShards = <String, ShardRunner>{ const Map<String, ShardRunner> _kShards = <String, ShardRunner>{
'tests': _runTests, 'tests': _runTests,
'tool_tests': _runToolTests, 'tool_tests': _runToolTests,
'aot_build_tests': _runAotBuildTests,
'coverage': _runCoverage, 'coverage': _runCoverage,
}; };
...@@ -149,6 +150,27 @@ Future<void> _runToolTests() async { ...@@ -149,6 +150,27 @@ Future<void> _runToolTests() async {
print('${bold}DONE: All tests successful.$reset'); print('${bold}DONE: All tests successful.$reset');
} }
/// Verifies that AOT builds of some examples apps finish
/// without crashing. It does not actually launch the AOT-built
/// apps. That happens later in the devicelab. This is just
/// a smoke-test.
Future<void> _runAotBuildTests() async {
await _flutterBuildAot(path.join('examples', 'hello_world'));
await _flutterBuildAot(path.join('examples', 'flutter_gallery'));
await _flutterBuildAot(path.join('examples', 'flutter_view'));
print('${bold}DONE: All AOT build tests successful.$reset');
}
Future<void> _flutterBuildAot(String relativePathToApplication) {
return runCommand(flutter,
<String>['build', 'aot'],
workingDirectory: path.join(flutterRoot, relativePathToApplication),
expectNonZeroExit: false,
timeout: _kShortTimeout,
);
}
Future<void> _runTests() async { Future<void> _runTests() async {
await _runSmokeTests(); await _runSmokeTests();
......
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