Index: tests/compiler/dart2js/source_map_pub_build_validity_test.dart |
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 939f9a233d3afc4f776c88b98409e02c1cd0243a..f0261b6848342dfe3518964d9bd4184ac4730b14 100644 |
--- a/tests/compiler/dart2js/source_map_pub_build_validity_test.dart |
+++ b/tests/compiler/dart2js/source_map_pub_build_validity_test.dart |
@@ -10,7 +10,7 @@ import 'package:expect/expect.dart'; |
import 'source_map_validator_helper.dart'; |
void main() { |
- asyncTest(() => createTempDir().then((Directory tmpDir) { |
+ asyncTest(() => createTempDir().then((Directory tmpDir) async { |
Bill Hesse
2015/08/17 20:40:44
Why not put createTempDir() inside the async funct
nweiz
2015/08/17 21:46:51
Done.
|
Directory sunflowerDir = new Directory.fromUri( |
Platform.script.resolve('../../../third_party/sunflower')); |
@@ -20,15 +20,22 @@ void main() { |
String command = path.normalize(path.join(path.fromUri(Platform.script), |
'../../../../sdk/bin/pub${ext}')); |
String file = path.join(tmpDir.path, 'build/web/sunflower.dart.js'); |
+ |
+ print("Running '$command get' from '${tmpDir}'."); |
+ ProcessResult getResult = await Process.run( |
+ command, ['get'], workingDirectory: tmpDir.path); |
+ print(getResult.stdout); |
+ print(getResult.stderr); |
+ Expect.equals(0, getResult.exitCode, 'Unexpected exitCode from pub get'); |
+ |
print("Running '$command build --mode=debug' from '${tmpDir}'."); |
- return Process.run(command, ['build','--mode=debug'], |
- 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); |
- }); |
+ ProcessResult buildResult = await Process.run( |
+ command, ['build','--mode=debug'], workingDirectory: tmpDir.path); |
+ print(buildResult.stdout); |
+ print(buildResult.stderr); |
+ Expect.equals(0, buildResult.exitCode, 'Unexpected exitCode from pub'); |
+ validateSourceMap(new Uri.file(file, windows: Platform.isWindows)); |
+ print("Deleting '${tmpDir.path}'."); |
+ tmpDir.deleteSync(recursive: true); |
})); |
} |