b96ac4520a
Change-Id: I6e6960c471b2fab3f0cd8a672da05d7699217410 Reviewed-on: https://dart-review.googlesource.com/12291 Commit-Queue: Peter von der Ahé <ahe@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
25 lines
910 B
Dart
25 lines
910 B
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.
|
|
|
|
library compiler.tool.generate_kernel_test;
|
|
|
|
import 'dart:io';
|
|
import 'generate_kernel.dart' as m;
|
|
import 'package:front_end/src/compute_platform_binaries_location.dart'
|
|
show computePlatformBinariesLocation;
|
|
|
|
main() async {
|
|
Directory dir;
|
|
try {
|
|
dir = Directory.systemTemp.createTempSync('generate_kernel_test');
|
|
var file = dir.absolute.uri.resolve('hi.dart');
|
|
new File.fromUri(file).writeAsStringSync("main() => print('hello world');");
|
|
var platformUri =
|
|
computePlatformBinariesLocation().resolve('dart2js_platform.dill');
|
|
await m.main(['--platform=${platformUri.toFilePath()}', file.toFilePath()]);
|
|
} finally {
|
|
dir.deleteSync(recursive: true);
|
|
}
|
|
}
|