| Index: tests/standalone/precompilation_dart2js_test.dart
|
| diff --git a/tests/standalone/precompilation_test.dart b/tests/standalone/precompilation_dart2js_test.dart
|
| similarity index 80%
|
| copy from tests/standalone/precompilation_test.dart
|
| copy to tests/standalone/precompilation_dart2js_test.dart
|
| index 047ac0d5c6ba00c765ba178e92a21587c0e2d889..c961a5e36c2b9ed4a92270655857621efc4cbc61 100644
|
| --- a/tests/standalone/precompilation_test.dart
|
| +++ b/tests/standalone/precompilation_dart2js_test.dart
|
| @@ -43,15 +43,18 @@ main(List args) {
|
| return;
|
| }
|
|
|
| + var abs_package_root = new File(Platform.packageRoot).absolute.path;
|
| var dart_executable =
|
| Directory.current.path + Platform.pathSeparator + Platform.executable;
|
| Directory tmp;
|
| try {
|
| tmp = Directory.current.createTempSync("temp_precompilation_test");
|
| - var result = Process.runSync(
|
| - "${dart_executable}_no_snapshot",
|
| - ["--gen-precompiled-snapshot", Platform.script.path],
|
| - workingDirectory: tmp.path);
|
| + var exec = "${dart_executable}_no_snapshot";
|
| + var args = ["--package-root=$abs_package_root",
|
| + "--gen-precompiled-snapshot",
|
| + "${abs_package_root}compiler/src/dart2js.dart"];
|
| + print("$exec ${args.join(' ')}");
|
| + var result = Process.runSync(exec, args, workingDirectory: tmp.path);
|
| if (result.exitCode != 0) {
|
| print(result.stdout);
|
| print(result.stderr);
|
| @@ -84,10 +87,10 @@ main(List args) {
|
|
|
| var ld_library_path = new String.fromEnvironment("LD_LIBRARY_PATH");
|
| ld_library_path = "${ld_library_path}:${tmp.path}";
|
| -
|
| - result = Process.runSync(
|
| - "${dart_executable}",
|
| - ["--run-precompiled-snapshot", "ignored_script", "--hello"],
|
| + exec = "${dart_executable}";
|
| + args = ["--run-precompiled-snapshot", "ignored_script", "--version"];
|
| + print("LD_LIBRARY_PATH=$ld_library_path $exec ${args.join(' ')}");
|
| + result = Process.runSync(exec, args,
|
| workingDirectory: tmp.path,
|
| environment: {"LD_LIBRARY_PATH": ld_library_path});
|
| if (result.exitCode != 0) {
|
| @@ -96,7 +99,7 @@ main(List args) {
|
| throw "Precompiled binary failed.";
|
| }
|
| print(result.stdout);
|
| - if (result.stdout != "Hello\n") {
|
| + if (!result.stdout.contains("Dart-to-JavaScript compiler")) {
|
| throw "Precompiled binary output mismatch.";
|
| }
|
| } finally {
|
|
|