Add startup test for Platform View example (#17645)
This commit is contained in:
14
dev/devicelab/bin/tasks/platform_view__start_up.dart
Normal file
14
dev/devicelab/bin/tasks/platform_view__start_up.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright 2018 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 'package:flutter_devicelab/tasks/perf_tests.dart';
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
|
||||
Future<Null> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
await task(createPlatformViewStartupTest());
|
||||
}
|
||||
26
dev/devicelab/bin/tasks/platform_view_ios__start_up.dart
Normal file
26
dev/devicelab/bin/tasks/platform_view_ios__start_up.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright 2018 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/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
|
||||
Future<Null> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||
await task(() async {
|
||||
final Directory iosDirectory = dir(
|
||||
'${flutterDirectory.path}/examples/platform_view/ios',
|
||||
);
|
||||
await inDirectory(iosDirectory, () async {
|
||||
await exec('pod', <String>['install']);
|
||||
});
|
||||
|
||||
final TaskFunction taskFunction = createPlatformViewStartupTest();
|
||||
return await taskFunction();
|
||||
});
|
||||
}
|
||||
@@ -77,6 +77,13 @@ TaskFunction createFlutterViewStartupTest() {
|
||||
).run;
|
||||
}
|
||||
|
||||
TaskFunction createPlatformViewStartupTest() {
|
||||
return new StartupTest(
|
||||
'${flutterDirectory.path}/examples/platform_view',
|
||||
reportMetrics: false,
|
||||
).run;
|
||||
}
|
||||
|
||||
TaskFunction createBasicMaterialCompileTest() {
|
||||
return () async {
|
||||
const String sampleAppName = 'sample_flutter_app';
|
||||
|
||||
@@ -136,6 +136,12 @@ tasks:
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["mac/android"]
|
||||
|
||||
platform_view__start_up:
|
||||
description: >
|
||||
Verifies that Platform View can be used from an Android project.
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["mac/android"]
|
||||
|
||||
complex_layout__start_up:
|
||||
description: >
|
||||
Measures the startup time of the Complex Layout sample app on Android.
|
||||
@@ -289,6 +295,12 @@ tasks:
|
||||
stage: devicelab_ios
|
||||
required_agent_capabilities: ["mac/ios"]
|
||||
|
||||
platform_view_ios__start_up:
|
||||
description: >
|
||||
Verifies that Platform View can be used from an iOS project.
|
||||
stage: devicelab_ios
|
||||
required_agent_capabilities: ["mac/ios"]
|
||||
|
||||
complex_layout_scroll_perf_ios__timeline_summary:
|
||||
description: >
|
||||
Measures the runtime performance of the Complex Layout sample app on
|
||||
|
||||
Reference in New Issue
Block a user