Audit devicelab log streaming for nullability (#84820)

This commit is contained in:
Jenn Magder
2021-06-18 00:14:03 -07:00
committed by GitHub
parent 15301a6f44
commit 03034e9e4a
11 changed files with 66 additions and 74 deletions

View File

@@ -8,7 +8,6 @@ import 'dart:io';
import 'package:flutter_devicelab/framework/devices.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;
@@ -34,8 +33,6 @@ void main() {
p.join(complexLayoutPath, 'test_driver', 'semantics_perf.dart'),
'-d',
deviceId,
'--screenshot',
hostAgent.dumpDirectory.path,
]);
});

View File

@@ -6,7 +6,6 @@
import 'package:flutter_devicelab/framework/devices.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';
@@ -18,8 +17,6 @@ Future<String> _runWithMode(String mode, String deviceId) async {
'test_driver/scroll_perf.dart',
'-d',
deviceId,
'--screenshot',
hostAgent.dumpDirectory.path,
]);
return stderr.toString();
}

View File

@@ -360,21 +360,24 @@ Future<void> main() async {
);
if (testResultExit != 0) {
// Zip the test results to the artifacts directory for upload.
await inDirectory(resultBundleTemp, () {
final String zipPath = path.join(hostAgent.dumpDirectory.path,
'module_test_ios-objc-${DateTime.now().toLocal().toIso8601String()}.zip');
return exec(
'zip',
<String>[
'-r',
'-9',
zipPath,
'result.xcresult',
],
canFail: true, // Best effort to get the logs.
);
});
final Directory dumpDirectory = hostAgent.dumpDirectory;
if (dumpDirectory != null) {
// Zip the test results to the artifacts directory for upload.
await inDirectory(resultBundleTemp, () {
final String zipPath = path.join(dumpDirectory.path,
'module_test_ios-objc-${DateTime.now().toLocal().toIso8601String()}.zip');
return exec(
'zip',
<String>[
'-r',
'-9',
zipPath,
'result.xcresult',
],
canFail: true, // Best effort to get the logs.
);
});
}
throw TaskResult.failure('Platform unit tests failed');
}

View File

@@ -74,20 +74,23 @@ Future<void> main() async {
);
if (testResultExit != 0) {
// Zip the test results to the artifacts directory for upload.
final String zipPath = path.join(hostAgent.dumpDirectory.path,
'native_ui_tests_ios32-${DateTime.now().toLocal().toIso8601String()}.zip');
await exec(
'zip',
<String>[
'-r',
'-9',
zipPath,
'result.xcresult',
],
workingDirectory: resultBundleTemp,
canFail: true, // Best effort to get the logs.
);
final Directory dumpDirectory = hostAgent.dumpDirectory;
if (dumpDirectory != null) {
// Zip the test results to the artifacts directory for upload.
final String zipPath = path.join(dumpDirectory.path,
'native_ui_tests_ios32-${DateTime.now().toLocal().toIso8601String()}.zip');
await exec(
'zip',
<String>[
'-r',
'-9',
zipPath,
'result.xcresult',
],
workingDirectory: resultBundleTemp,
canFail: true, // Best effort to get the logs.
);
}
return TaskResult.failure('Platform unit tests failed');
}

View File

@@ -11,7 +11,6 @@ import 'dart:io';
import 'package:flutter_devicelab/common.dart';
import 'package:flutter_devicelab/framework/devices.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 path;
@@ -31,8 +30,6 @@ void main() {
'--verbose',
'-d',
device.deviceId,
'--screenshot',
hostAgent.dumpDirectory.path,
'--route',
'/smuggle-it',
'lib/route.dart',