unlock device and pass JAVA_HOME to instrumentation test (#11174)
This commit is contained in:
parent
be9f99a8b7
commit
832c0f1f03
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user