Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1295)

Unified Diff: tests/compiler/dart2js/source_map_pub_build_validity_test.dart

Issue 1295653005: Fix dart2js/source_map_pub_build_validity_test. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698