From 17280340841f03223e15d2dc53f587002b07f947 Mon Sep 17 00:00:00 2001 From: "johnniwinther@google.com" Date: Wed, 25 Mar 2015 07:59:23 +0000 Subject: [PATCH] Make unittests work on Windows (again) BUG= R=floitsch@google.com Review URL: https://codereview.chromium.org//1024463007 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44680 260f80e4-7a28-3924-810f-c04153c831b5 --- sdk/bin/pub.bat | 2 +- tests/compiler/dart2js/dart2js_batch2_test.dart | 2 +- .../dart2js/source_map_pub_build_validity_test.dart | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sdk/bin/pub.bat b/sdk/bin/pub.bat index 7fd3f915d27..904d054de3d 100644 --- a/sdk/bin/pub.bat +++ b/sdk/bin/pub.bat @@ -35,7 +35,7 @@ set PACKAGES_DIR=%BUILD_DIR%\packages set DART=%BUILD_DIR%\dart-sdk\bin\dart rem Run pub. -set PUB="%SDK_DIR%\lib\_internal\pub.dart" +set PUB="%SDK_DIR%\lib\_internal\pub\bin\pub.dart" "%DART%" %VM_OPTIONS% --package-root="%PACKAGES_DIR%" "%PUB%" %* endlocal diff --git a/tests/compiler/dart2js/dart2js_batch2_test.dart b/tests/compiler/dart2js/dart2js_batch2_test.dart index d2a1845614b..644c790a975 100644 --- a/tests/compiler/dart2js/dart2js_batch2_test.dart +++ b/tests/compiler/dart2js/dart2js_batch2_test.dart @@ -39,7 +39,7 @@ Future setup() { tmpDir = directory; String newPath = path.join(directory.path, "dart2js_batch2_run.dart"); File source = - new File(Platform.script.resolve("dart2js_batch2_run.dart").path); + new File.fromUri(Platform.script.resolve("dart2js_batch2_run.dart")); source.copySync(newPath); }); } diff --git a/tests/compiler/dart2js/source_map_pub_build_validity_test.dart b/tests/compiler/dart2js/source_map_pub_build_validity_test.dart index 46b671edac6..939f9a233d3 100644 --- a/tests/compiler/dart2js/source_map_pub_build_validity_test.dart +++ b/tests/compiler/dart2js/source_map_pub_build_validity_test.dart @@ -6,7 +6,7 @@ import 'dart:io'; import 'package:path/path.dart' as path; import 'package:async_helper/async_helper.dart'; - +import 'package:expect/expect.dart'; import 'source_map_validator_helper.dart'; void main() { @@ -22,8 +22,10 @@ void main() { String file = path.join(tmpDir.path, 'build/web/sunflower.dart.js'); print("Running '$command build --mode=debug' from '${tmpDir}'."); return Process.run(command, ['build','--mode=debug'], - workingDirectory: tmpDir.path).then((process) { - print(process.stdout); + workingDirectory: tmpDir.path).then((ProcessResult processResult) { + print(processResult.stdout); + print(processResult.stderr); + Expect.equals(0, processResult.exitCode, 'Unexpected exitCode from pub'); validateSourceMap(new Uri.file(file, windows: Platform.isWindows)); print("Deleting '${tmpDir.path}'."); tmpDir.deleteSync(recursive: true);