dart-sdk/pkg/front_end/tool/incremental_perf_test.dart
Martin Kustermann 337f4ebe95 Make pkg/front_end/tool/incremental_perf_test.dart run on existent pkg/front_end/benchmarks/ikg
Change-Id: Icaf9906433846fb855f18e7b4e5716994bad739c
Reviewed-on: https://dart-review.googlesource.com/14402
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-19 06:38:35 +00:00

28 lines
1.1 KiB
Dart

// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// Test to ensure that incremental_perf.dart is running without errors.
import 'dart:async';
import 'dart:io';
import 'package:front_end/src/compute_platform_binaries_location.dart'
show computePlatformBinariesLocation;
import 'incremental_perf.dart' as m;
main() async {
var sdkOutline = computePlatformBinariesLocation().resolve(
// TODO(sigmund): switch to `vm_outline.dill` (issue #29881).
"vm_platform.dill");
final ikgBenchmarks = Platform.script.resolve('../benchmarks/ikg/');
await runExample(sdkOutline, ikgBenchmarks.resolve('hello.dart'),
ikgBenchmarks.resolve('hello.edits.json'));
await runExample(sdkOutline, ikgBenchmarks.resolve('dart2js.dart'),
ikgBenchmarks.resolve('dart2js.edits.json'));
}
Future runExample(Uri sdkOutline, Uri entryUri, Uri jsonUri) async {
await m.main(['--sdk-summary', '$sdkOutline', '$entryUri', '$jsonUri']);
}