"Fossies" - the Fresh Open Source Software Archive

Member "flutter-1.22.4/dev/devicelab/lib/tasks/defines_task.dart" (13 Nov 2020, 951 Bytes) of package /linux/misc/flutter-1.22.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Dart source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // Copyright 2014 The Flutter Authors. All rights reserved.
    2 // Use of this source code is governed by a BSD-style license that can be
    3 // found in the LICENSE file.
    4 
    5 import 'dart:async';
    6 import 'dart:io';
    7 
    8 import '../framework/adb.dart';
    9 import '../framework/framework.dart';
   10 import '../framework/utils.dart';
   11 
   12 Future<TaskResult> runDartDefinesTask() async {
   13   final Device device = await devices.workingDevice;
   14   await device.unlock();
   15   final String deviceId = device.deviceId;
   16   final Directory testDirectory = dir('${flutterDirectory.path}/dev/integration_tests/ui');
   17   await inDirectory<void>(testDirectory, () async {
   18     await flutter('packages', options: <String>['get']);
   19 
   20     await flutter('drive', options: <String>[
   21       '--verbose',
   22       '-d',
   23       deviceId,
   24       '--dart-define=test.valueA=Example',
   25       '--dart-define=test.valueB=Value',
   26       'lib/defines.dart',
   27     ]);
   28   });
   29 
   30   return TaskResult.success(<String, dynamic>{});
   31 }