flutter/dev/bots/suite_runners/run_realm_checker_tests.dart
Jesse f8a06f6418
Refactor realm_checker (#145905)
Refactor realm_checker suite in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing realm_checker tests

Part of https://github.com/flutter/flutter/issues/145482

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2024-04-01 21:49:19 +00:00

19 lines
611 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:io' show File;
import 'package:path/path.dart' as path;
import '../utils.dart';
Future<void> realmCheckerTestRunner(String flutterRoot) async {
final String engineRealmFile = path.join(flutterRoot, 'bin', 'internal', 'engine.realm');
final String engineRealm = File(engineRealmFile).readAsStringSync().trim();
if (engineRealm.isNotEmpty) {
foundError(<String>['The checked-in engine.realm file must be empty.']);
}
}