platform_view_ios__start_up.dart 1.25 KB
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6 7 8 9 10 11 12
// 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';

13
Future<void> main() async {
14 15
  deviceOperatingSystem = DeviceOperatingSystem.ios;
  await task(() async {
16 17 18 19 20 21
    final String platformViewDirectoryPath = '${flutterDirectory.path}/examples/platform_view';
    final Directory platformViewDirectory = dir(
      platformViewDirectoryPath
    );
    await inDirectory(platformViewDirectory, () async {
      await flutter('pub', options: <String>['get']);
22 23 24 25 26 27 28 29 30 31 32 33
      // Pre-cache the iOS artifacts; this may be the first test run on this machine.
      await flutter(
        'precache',
        options: <String>[
          '--no-android',
          '--no-fuchsia',
          '--no-linux',
          '--no-macos',
          '--no-web',
          '--no-windows',
        ],
      );
34
    });
35

36 37 38 39
    final TaskFunction taskFunction = createPlatformViewStartupTest();
    return await taskFunction();
  });
}