forked from firka/flutter
Take screenshot when drive fails (#78822)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/host_agent.dart';
|
||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
@@ -29,6 +30,8 @@ void main() {
|
||||
p.join(complexLayoutPath, 'test_driver', 'semantics_perf.dart'),
|
||||
'-d',
|
||||
deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/host_agent.dart';
|
||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
|
||||
@@ -15,6 +16,8 @@ Future<String> _runWithMode(String mode, String deviceId) async {
|
||||
'test_driver/scroll_perf.dart',
|
||||
'-d',
|
||||
deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
]);
|
||||
return stderr.toString();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import 'package:path/path.dart' as path;
|
||||
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/host_agent.dart';
|
||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
|
||||
@@ -24,7 +25,16 @@ void main() {
|
||||
await inDirectory(appDir, () async {
|
||||
return flutter(
|
||||
'drive',
|
||||
options: <String>['--verbose', '-d', device.deviceId, '--route', '/smuggle-it', 'lib/route.dart'],
|
||||
options: <String>[
|
||||
'--verbose',
|
||||
'-d',
|
||||
device.deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
'--route',
|
||||
'/smuggle-it',
|
||||
'lib/route.dart',
|
||||
],
|
||||
canFail: false,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -6,9 +6,9 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:math' as math;
|
||||
|
||||
|
||||
import '../framework/adb.dart';
|
||||
import '../framework/framework.dart';
|
||||
import '../framework/host_agent.dart';
|
||||
import '../framework/task_result.dart';
|
||||
import '../framework/utils.dart';
|
||||
|
||||
@@ -101,6 +101,8 @@ class GalleryTransitionTest {
|
||||
'test_driver/$testDriver.dart',
|
||||
'-d',
|
||||
deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import '../framework/adb.dart';
|
||||
import '../framework/framework.dart';
|
||||
import '../framework/host_agent.dart';
|
||||
import '../framework/task_result.dart';
|
||||
import '../framework/utils.dart';
|
||||
|
||||
@@ -151,6 +152,8 @@ class DriverTest {
|
||||
testTarget,
|
||||
'-d',
|
||||
deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
...extraOptions,
|
||||
];
|
||||
await flutter('drive', options: options, environment: Map<String, String>.from(environment));
|
||||
|
||||
@@ -12,6 +12,7 @@ import 'package:path/path.dart' as path;
|
||||
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/host_agent.dart';
|
||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
|
||||
@@ -292,6 +293,8 @@ TaskFunction createStackSizeTest() {
|
||||
'--driver', testDriver,
|
||||
'-d',
|
||||
deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
]);
|
||||
final Map<String, dynamic> data = json.decode(
|
||||
file('$testDirectory/build/stack_size.json').readAsStringSync(),
|
||||
@@ -387,6 +390,8 @@ TaskFunction createsScrollSmoothnessPerfTest() {
|
||||
'-t', testTarget,
|
||||
'-d',
|
||||
deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
]);
|
||||
final Map<String, dynamic> data = json.decode(
|
||||
file('$testDirectory/build/scroll_smoothness_test.json').readAsStringSync(),
|
||||
@@ -436,6 +441,8 @@ TaskFunction createFramePolicyIntegrationTest() {
|
||||
'-t', testTarget,
|
||||
'-d',
|
||||
deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
]);
|
||||
final Map<String, dynamic> data = json.decode(
|
||||
file('$testDirectory/build/frame_policy_event_delay.json').readAsStringSync(),
|
||||
@@ -689,6 +696,8 @@ class PerfTest {
|
||||
...<String>['--dart-define', dartDefine],
|
||||
'-d',
|
||||
deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
]);
|
||||
final Map<String, dynamic> data = json.decode(
|
||||
file('$testDirectory/build/$resultFilename.json').readAsStringSync(),
|
||||
@@ -1334,6 +1343,8 @@ class DevToolsMemoryTest {
|
||||
options: <String>[
|
||||
'--use-existing-app', _observatoryUri,
|
||||
'-d', _device.deviceId,
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
'--profile',
|
||||
driverTest,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user