flutter/dev/bots/suite_runners/run_flutter_driver_android_tests.dart
Matan Lurey 5d5e633c44
Move (dev/tools), complete v0 of native_driver (Android) (#154843)
**This is a WIP**, and the only reason it is not a draft PR is so that Flutter (Skia) Gold is executed.

---

Closes https://github.com/flutter/flutter/issues/148269.

Work towards https://github.com/flutter/flutter/issues/148269.
2024-09-11 23:56:21 +00:00

83 lines
2.4 KiB
Dart

// 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:path/path.dart' as path;
import '../run_command.dart';
import '../utils.dart';
/// To run this test locally:
///
/// 1. Connect an Android device or emulator.
/// 2. Run the following command from the root of the Flutter repository:
///
/// ```sh
/// SHARD=flutter_driver_android bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// ```
///
/// For debugging, it is recommended to instead just run and launch these tests
/// individually _in_ the `dev/integration_tests/native_driver_test` directory.
Future<void> runFlutterDriverAndroidTests() async {
print('Running Flutter Driver Android tests...');
await runCommand(
'flutter',
<String>[
'drive',
'lib/flutter_rendered_blue_rectangle_main.dart',
// 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: path.join(
'dev',
'integration_tests',
'native_driver_test',
),
);
await runCommand(
'flutter',
<String>[
'drive',
'lib/platform_view_blue_orange_gradient_main.dart',
// 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: path.join(
'dev',
'integration_tests',
'native_driver_test',
),
);
await runCommand(
'flutter',
<String>[
'drive',
'lib/external_texture_smiley_face_main.dart',
// 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: path.join(
'dev',
'integration_tests',
'native_driver_test',
),
);
}