Commit 832c0f1f authored by Yegor's avatar Yegor Committed by GitHub

unlock device and pass JAVA_HOME to instrumentation test (#11174)

parent be9f99a8
......@@ -16,9 +16,15 @@ Future<Null> main() async {
final Directory galleryDirectory =
dir('${flutterDirectory.path}/examples/flutter_gallery');
await inDirectory(galleryDirectory, () async {
final Device device = await devices.workingDevice;
await device.unlock();
await flutter('packages', options: <String>['get']);
await flutter('build', options: <String>['clean']); // to reset the Dart entry point
await exec('tool/run_instrumentation_test.sh', <String>[]);
await flutter('build', options: <String>['clean']);
await flutter('build', options: <String>['apk', '--target', 'test/live_smoketest.dart']);
final String androidStudioPath = grep('Android Studio at', from: await evalFlutter('doctor')).first.split(' ').last;
await exec('./tool/run_instrumentation_test.sh', <String>[], environment: <String, String>{
'JAVA_HOME': '$androidStudioPath/jre',
});
});
return new TaskResult.success(null);
......
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