[Windows] Add a flutter run console output test (#116626)
Adds a test to verify the console output of `flutter run --release` on Windows. Part of: https://github.com/flutter/flutter/issues/111577
This commit is contained in:
12
dev/devicelab/bin/tasks/run_release_test_windows.dart
Normal file
12
dev/devicelab/bin/tasks/run_release_test_windows.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
// 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:flutter_devicelab/framework/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/run_tests.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.windows;
|
||||
await task(createWindowsRunReleaseTest());
|
||||
}
|
||||
@@ -26,6 +26,14 @@ TaskFunction createMacOSRunReleaseTest() {
|
||||
);
|
||||
}
|
||||
|
||||
TaskFunction createWindowsRunReleaseTest() {
|
||||
return DesktopRunOutputTest(
|
||||
'${flutterDirectory.path}/dev/integration_tests/ui',
|
||||
'lib/empty.dart',
|
||||
release: true,
|
||||
);
|
||||
}
|
||||
|
||||
class AndroidRunOutputTest extends RunOutputTask {
|
||||
AndroidRunOutputTest({required super.release}) : super(
|
||||
'${flutterDirectory.path}/dev/integration_tests/ui',
|
||||
@@ -130,9 +138,9 @@ class DesktopRunOutputTest extends RunOutputTask {
|
||||
TaskResult verify(List<String> stdout, List<String> stderr) {
|
||||
_findNextMatcherInList(
|
||||
stdout,
|
||||
(String line) => line.startsWith('Launching lib/main.dart on ') &&
|
||||
(String line) => line.startsWith('Launching $testTarget on ') &&
|
||||
line.endsWith(' in ${release ? 'release' : 'debug'} mode...'),
|
||||
'Launching lib/main.dart on',
|
||||
'Launching $testTarget on',
|
||||
);
|
||||
|
||||
_findNextMatcherInList(
|
||||
|
||||
Reference in New Issue
Block a user