add Android instrumentation test (#11063)

* add Android instrumentation test

* add devicelab test

* add to manifest.yaml

* rename _smoke_test.dart to _smoketest.dart to prevent flutter test from picking it up

* volatile fields; style fixes

* use ConditionVariable; fix sh script
This commit is contained in:
Yegor
2017-07-10 17:20:49 -07:00
committed by GitHub
parent 7f0c98ab0b
commit 18d9b20ffb
8 changed files with 291 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'package:flutter_devicelab/framework/adb.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/framework/utils.dart';
Future<Null> main() async {
deviceOperatingSystem = DeviceOperatingSystem.android;
await task(() async {
final Directory galleryDirectory =
dir('${flutterDirectory.path}/examples/flutter_gallery');
await inDirectory(galleryDirectory, () async {
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>[]);
});
return new TaskResult.success(null);
});
}

View File

@@ -133,6 +133,15 @@ tasks:
required_agent_capabilities: ["linux/android"]
flaky: true
flutter_gallery_instrumentation_test:
description: >
Same as flutter_gallery__transition_perf but uses Android instrumentation
framework, and therefore does not require a host computer to run. This
test can run on off-the-shelf infrastructures, such as Firebase Test Lab.
stage: devicelab
required_agent_capabilities: ["linux/android"]
flaky: true
# iOS on-device tests
channels_integration_test_ios: