Unverified Commit cf18d01e authored by Siva's avatar Siva Committed by GitHub

Disable unsafePackageSerialization as it causes issues when coverage is turned on (#23280)

* Disable unsafePackageSerialization as it causes issues when coverage is
used (see https://github.com/dart-lang/sdk/issues/34841)

* Restore Coverage.
parent f87a2a32
......@@ -194,28 +194,26 @@ Future<void> _runTests() async {
print('${bold}DONE: All tests successful.$reset');
}
// TODO(yjbanov): re-enable coverage collection when https://github.com/dart-lang/sdk/issues/34841 is fixed.
Future<void> _runCoverage() async {
print('${bold}DONE: Coverage collection SKIPPED due to https://github.com/dart-lang/sdk/issues/34841.$reset');
// final File coverageFile = File(path.join(flutterRoot, 'packages', 'flutter', 'coverage', 'lcov.info'));
// if (!coverageFile.existsSync()) {
// print('${red}Coverage file not found.$reset');
// print('Expected to find: ${coverageFile.absolute}');
// print('This file is normally obtained by running `flutter update-packages`.');
// exit(1);
// }
// coverageFile.deleteSync();
// await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter'),
// options: const <String>['--coverage'],
// );
// if (!coverageFile.existsSync()) {
// print('${red}Coverage file not found.$reset');
// print('Expected to find: ${coverageFile.absolute}');
// print('This file should have been generated by the `flutter test --coverage` script, but was not.');
// exit(1);
// }
final File coverageFile = File(path.join(flutterRoot, 'packages', 'flutter', 'coverage', 'lcov.info'));
if (!coverageFile.existsSync()) {
print('${red}Coverage file not found.$reset');
print('Expected to find: ${coverageFile.absolute}');
print('This file is normally obtained by running `flutter update-packages`.');
exit(1);
}
coverageFile.deleteSync();
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter'),
options: const <String>['--coverage'],
);
if (!coverageFile.existsSync()) {
print('${red}Coverage file not found.$reset');
print('Expected to find: ${coverageFile.absolute}');
print('This file should have been generated by the `flutter test --coverage` script, but was not.');
exit(1);
}
// print('${bold}DONE: Coverage collection successful.$reset');
print('${bold}DONE: Coverage collection successful.$reset');
}
Future<void> _pubRunTest(
......
......@@ -239,7 +239,7 @@ class _Compiler {
trackWidgetCreation: trackWidgetCreation,
compilerMessageConsumer: reportCompilerMessage,
initializeFromDill: testFilePath,
unsafePackageSerialization: true,
unsafePackageSerialization: false,
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment