Unverified Commit bb3275b9 authored by Daco Harkes's avatar Daco Harkes Committed by GitHub

Add debugging info to android_plugin_example_app_build_test (#98107)

parent d522179b
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import 'package:file_testing/file_testing.dart'; import 'package:file_testing/file_testing.dart';
import 'package:flutter_tools/src/base/file_system.dart'; import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import '../src/common.dart'; import '../src/common.dart';
import 'test_utils.dart'; import 'test_utils.dart';
...@@ -35,7 +36,7 @@ void main() { ...@@ -35,7 +36,7 @@ void main() {
final String testName = '${template}_test'; final String testName = '${template}_test';
processManager.runSync(<String>[ ProcessResult result = processManager.runSync(<String>[
flutterBin, flutterBin,
...getLocalEngineArguments(), ...getLocalEngineArguments(),
'create', 'create',
...@@ -43,6 +44,9 @@ void main() { ...@@ -43,6 +44,9 @@ void main() {
'--platforms=android', '--platforms=android',
testName, testName,
], workingDirectory: tempDir.path); ], workingDirectory: tempDir.path);
if (result.exitCode != 0) {
throw Exception('flutter create failed: ${result.exitCode}\n${result.stderr}\n${result.stdout}');
}
final Directory exampleAppDir = final Directory exampleAppDir =
tempDir.childDirectory(testName).childDirectory('example'); tempDir.childDirectory(testName).childDirectory('example');
...@@ -60,13 +64,16 @@ void main() { ...@@ -60,13 +64,16 @@ void main() {
buildGradleFile.writeAsStringSync(newBuildGradle); buildGradleFile.writeAsStringSync(newBuildGradle);
// Run flutter build apk using AGP 4.1.0 // Run flutter build apk using AGP 4.1.0
processManager.runSync(<String>[ result = processManager.runSync(<String>[
flutterBin, flutterBin,
...getLocalEngineArguments(), ...getLocalEngineArguments(),
'build', 'build',
'apk', 'apk',
'--target-platform=android-arm', '--target-platform=android-arm',
], workingDirectory: exampleAppDir.path); ], workingDirectory: exampleAppDir.path);
if (result.exitCode != 0) {
throw Exception('flutter build failed: ${result.exitCode}\n${result.stderr}\n${result.stdout}');
}
final File exampleApk = fileSystem.file(fileSystem.path.join( final File exampleApk = fileSystem.file(fileSystem.path.join(
exampleAppDir.path, exampleAppDir.path,
......
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