platform_view_ios__start_up.dart 1.23 KB
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:io';

7
import 'package:flutter_devicelab/framework/devices.dart';
8
import 'package:flutter_devicelab/framework/framework.dart';
9 10
import 'package:flutter_devicelab/framework/utils.dart';
import 'package:flutter_devicelab/tasks/perf_tests.dart';
11

12
Future<void> main() async {
13 14
  deviceOperatingSystem = DeviceOperatingSystem.ios;
  await task(() async {
15 16 17 18 19 20
    final String platformViewDirectoryPath = '${flutterDirectory.path}/examples/platform_view';
    final Directory platformViewDirectory = dir(
      platformViewDirectoryPath
    );
    await inDirectory(platformViewDirectory, () async {
      await flutter('pub', options: <String>['get']);
21 22 23 24 25 26 27 28 29 30 31 32
      // 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',
        ],
      );
33
    });
34

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