Index: tests/compiler/dart2js/dill_loader_test.dart |
diff --git a/tests/compiler/dart2js/dill_loader_test.dart b/tests/compiler/dart2js/dill_loader_test.dart |
index 8cb2b86bbf7f00d985442a552b3c24ab01d11a58..19b2ef8707d469b3e6f287c8e1197e63f7e0a0e6 100644 |
--- a/tests/compiler/dart2js/dill_loader_test.dart |
+++ b/tests/compiler/dart2js/dill_loader_test.dart |
@@ -17,17 +17,18 @@ import 'package:compiler/src/apiimpl.dart' show CompilerImpl; |
import "package:expect/expect.dart"; |
import 'package:path/path.dart' as path; |
+final String dartkExecutable = Platform.isWindows |
+ ? 'tools/dartk_wrappers/dartk.bat' |
+ : 'tools/dartk_wrappers/dartk'; |
+ |
/// Run the dartk.dart script, and return the binary encoded results. |
-List<int> runDartk(Uri filename) { |
+List<int> runDartk(String filename) { |
String basePath = path.fromUri(Uri.base); |
- String dartkPath = |
- path.normalize(path.join(basePath, 'tools/dartk_wrappers/dartk')); |
+ String dartkPath = path.normalize(path.join(basePath, dartkExecutable)); |
- var args = [filename.path, '-fbin', '-ostdout']; |
- ProcessResult result = Process.runSync( |
- dartkPath, [filename.path, '-fbin', '-ostdout'], |
- stdoutEncoding: null); |
- Expect.equals(0, result.exitCode); |
+ var args = [filename, '-fbin', '-ostdout']; |
+ ProcessResult result = Process.runSync(dartkPath, args, stdoutEncoding: null); |
+ Expect.equals(0, result.exitCode, result.stderr); |
return result.stdout; |
} |
@@ -43,12 +44,12 @@ class TestScriptLoader implements ScriptLoader { |
/// than just string source files. |
main() { |
asyncTest(() async { |
- Uri uri = Uri.base.resolve('tests/corelib/list_literal_test.dart'); |
- File entity = new File.fromUri(uri); |
+ String filename = 'tests/corelib/list_literal_test.dart'; |
+ Uri uri = Uri.base.resolve(filename); |
DiagnosticCollector diagnostics = new DiagnosticCollector(); |
OutputCollector output = new OutputCollector(); |
Uri entryPoint = Uri.parse('memory:main.dill'); |
- List<int> kernelBinary = runDartk(entity.uri); |
+ List<int> kernelBinary = runDartk(filename); |
CompilerImpl compiler = compilerFor( |
entryPoint: entryPoint, |