mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Our CI system runs with `--enable-vmservice`, but the default (i.e. for `flutter test`) does not. Closes https://github.com/flutter/flutter/issues/136079.
18 lines
564 B
Dart
18 lines
564 B
Dart
// Copyright 2014 The Flutter 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:developer' as developer;
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
Future<bool> hasVmServiceEnabled() async {
|
|
final developer.ServiceProtocolInfo info = await developer.Service.getInfo();
|
|
final bool result = info.serverUri != null;
|
|
if (!result) {
|
|
// ignore: avoid_print
|
|
print('Run test suite with --enable-vmservice to enable this test.');
|
|
}
|
|
return result;
|
|
}
|