mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
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
This commit is contained in:
parent
2da1a00f3d
commit
1728034084
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue