Add piping and bringup nodes for _vulkan and _opengles suites. (#162020)

Towards https://github.com/flutter/flutter/issues/161333.

This adds the initial `.ci.yaml` configuration (marked `bringup: true`),
without changing the existing shard to avoid the problems we ran into
last time when I renamed the shard atomically, as well as piping for
providing context in which the test will run (Vulkan or OpenGLES), which
can't be introspected in the _running_ app.

In a follow-up PR I'll:

- Edit `AndroidManifest.xml` before the suite, setting `ImpellerBackend`
appropriately
- Move the bringup nodes to presubmit
- Delete the existing (legacy) node
This commit is contained in:
Matan Lurey 2025-01-22 13:06:10 -08:00 committed by GitHub
parent e0392194d3
commit 30f4fecfeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 73 additions and 23 deletions

View File

@ -1523,6 +1523,32 @@ targets:
- engine/**
- DEPS
- name: Linux_android_emu_34 android_engine_vulkan_tests
recipe: flutter/flutter_drone
bringup: true
timeout: 60
properties:
shard: android_engine_vulkan_tests
tags: >
["framework", "hostonly", "shard", "linux"]
dependencies: >-
[
{"dependency": "goldctl", "version": "git_revision:2387d6fff449587eecbb7e45b2692ca0710b63b9"}
]
- name: Linux_android_emu_34 android_engine_opengles_tests
recipe: flutter/flutter_drone
bringup: true
timeout: 60
properties:
shard: android_engine_opengles_tests
tags: >
["framework", "hostonly", "shard", "linux"]
dependencies: >-
[
{"dependency": "goldctl", "version": "git_revision:2387d6fff449587eecbb7e45b2692ca0710b63b9"}
]
- name: Linux_android_emu flutter_driver_android_test
recipe: flutter/flutter_drone
bringup: true

View File

@ -323,12 +323,14 @@
# https://github.com/flutter/flutter/issues/82068
#
# analyze @Piinks @flutter/framework
# android_engine_vulkan_tests @matanlurey @jonahwilliams
# android_engine_opengles_tests @matanlurey @jonahwilliams
# build_tests @andrewkolos @flutter/tool
# ci_yaml flutter roller @keyonghan @flutter/infra
# coverage @goderbauer @flutter/infra
# customer_testing @Piinks @flutter/framework
# docs @Piinks @flutter/framework
# flutter_driver_android_test @matanlurey @johnmccutchan
# flutter_driver_android_test @matanlurey @jonahwilliams
# flutter_packaging @christopherfujino @flutter/infra
# flutter_plugins @stuartmorgan @flutter/plugin
# framework_tests @Piinks @flutter/framework

View File

@ -18,35 +18,42 @@ import '../utils.dart';
///
/// ```sh
/// # Generate a baseline of local golden files.
/// SHARD=android_engine_tests UPDATE_GOLDENS=1 bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// SHARD=android_engine_vulkan_tests UPDATE_GOLDENS=1 bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// ```
///
/// 4. Then, re-run the command against the baseline images:
///
/// ```sh
/// SHARD=android_engine_tests bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// SHARD=android_engine_vulkan_tests bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// ```
///
/// If you are trying to debug a commit, you will want to run step (3) first,
/// then apply the commit (or flag), and then run step (4). If you are trying
/// to determine flakiness in the *same* state, or want better debugging, see
/// `dev/integration_tests/android_engine_test/README.md`.
Future<void> runAndroidEngineTests() async {
Future<void> runAndroidEngineTests({required ImpellerBackend impellerBackend}) async {
print('Running Flutter Driver Android tests...');
final String androidEngineTestPath = path.join('dev', 'integration_tests', 'android_engine_test');
final List<FileSystemEntity> mains = Glob('$androidEngineTestPath/lib/**_main.dart').listSync();
for (final FileSystemEntity file in mains) {
await runCommand('flutter', <String>[
'drive',
path.relative(file.path, from: androidEngineTestPath),
// There are no reason to enable development flags for this test.
// Disable them to work around flakiness issues, and in general just
// make less things start up unnecessarily.
'--no-dds',
'--no-enable-dart-profiling',
'--test-arguments=test',
'--test-arguments=--reporter=expanded',
], workingDirectory: androidEngineTestPath);
await runCommand(
'flutter',
<String>[
'drive',
path.relative(file.path, from: androidEngineTestPath),
// There are no reason to enable development flags for this test.
// Disable them to work around flakiness issues, and in general just
// make less things start up unnecessarily.
'--no-dds',
'--no-enable-dart-profiling',
'--test-arguments=test',
'--test-arguments=--reporter=expanded',
],
workingDirectory: androidEngineTestPath,
environment: <String, String>{'ANDROID_ENGINE_TEST_GOLDEN_VARIANT': impellerBackend.name},
);
}
}
enum ImpellerBackend { vulkan, opengles }

View File

@ -137,7 +137,13 @@ Future<void> main(List<String> args) async {
'web_skwasm_tests': webTestsSuite.runWebSkwasmUnitTests,
// All web integration tests
'web_long_running_tests': webTestsSuite.webLongRunningTestsRunner,
'android_engine_tests': runAndroidEngineTests,
// TODO(matanlurey): Remove once a post-submit runs with the new shards.
// (Part of https://github.com/flutter/flutter/issues/161333)
'android_engine_tests': () => runAndroidEngineTests(impellerBackend: ImpellerBackend.vulkan),
'android_engine_vulkan_tests':
() => runAndroidEngineTests(impellerBackend: ImpellerBackend.vulkan),
'android_engine_opengles_tests':
() => runAndroidEngineTests(impellerBackend: ImpellerBackend.opengles),
'flutter_plugins': flutterPackagesRunner,
'skp_generator': skpGeneratorTestsRunner,
'customer_testing': customerTestingRunner,

View File

@ -6,3 +6,12 @@ import 'dart:io' as io;
/// Whether the current environment is LUCI.
bool get isLuci => io.Platform.environment['LUCI_CI'] == 'True';
/// What golden suffix this test should use for different engine configurations.
String get goldenVariant {
final String? variant = io.Platform.environment['ANDROID_ENGINE_TEST_GOLDEN_VARIANT'];
if (variant == null) {
return '';
}
return '.$variant';
}

View File

@ -29,7 +29,7 @@ void main() async {
setUpAll(() async {
if (isLuci) {
await enableSkiaGoldComparator(namePrefix: 'android_engine_test');
await enableSkiaGoldComparator(namePrefix: 'android_engine_test$goldenVariant');
}
flutterDriver = await FlutterDriver.connect();
nativeDriver = await AndroidNativeDriver.connect(flutterDriver);

View File

@ -28,7 +28,7 @@ void main() async {
setUpAll(() async {
if (isLuci) {
await enableSkiaGoldComparator(namePrefix: 'android_engine_test');
await enableSkiaGoldComparator(namePrefix: 'android_engine_test$goldenVariant');
}
flutterDriver = await FlutterDriver.connect();
nativeDriver = await AndroidNativeDriver.connect(flutterDriver);

View File

@ -28,7 +28,7 @@ void main() async {
setUpAll(() async {
if (isLuci) {
await enableSkiaGoldComparator(namePrefix: 'android_engine_test');
await enableSkiaGoldComparator(namePrefix: 'android_engine_test$goldenVariant');
}
flutterDriver = await FlutterDriver.connect();
nativeDriver = await AndroidNativeDriver.connect(flutterDriver);

View File

@ -30,7 +30,7 @@ void main() async {
setUpAll(() async {
if (isLuci) {
await enableSkiaGoldComparator(namePrefix: 'android_engine_test');
await enableSkiaGoldComparator(namePrefix: 'android_engine_test$goldenVariant');
}
flutterDriver = await FlutterDriver.connect();
nativeDriver = await AndroidNativeDriver.connect(flutterDriver);

View File

@ -30,7 +30,7 @@ void main() async {
setUpAll(() async {
if (isLuci) {
await enableSkiaGoldComparator(namePrefix: 'android_engine_test');
await enableSkiaGoldComparator(namePrefix: 'android_engine_test$goldenVariant');
}
flutterDriver = await FlutterDriver.connect();
nativeDriver = await AndroidNativeDriver.connect(flutterDriver);

View File

@ -30,7 +30,7 @@ void main() async {
setUpAll(() async {
if (isLuci) {
await enableSkiaGoldComparator(namePrefix: 'android_engine_test');
await enableSkiaGoldComparator(namePrefix: 'android_engine_test$goldenVariant');
}
flutterDriver = await FlutterDriver.connect();
nativeDriver = await AndroidNativeDriver.connect(flutterDriver);

View File

@ -28,7 +28,7 @@ void main() async {
setUpAll(() async {
if (isLuci) {
await enableSkiaGoldComparator(namePrefix: 'android_engine_test');
await enableSkiaGoldComparator(namePrefix: 'android_engine_test$goldenVariant');
}
flutterDriver = await FlutterDriver.connect();
nativeDriver = await AndroidNativeDriver.connect(flutterDriver);