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

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: Code review changes 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..69cf5e14ed360fe1b0e6322349f0c386cd9c1910 100644
--- a/tests/compiler/dart2js/source_map_pub_build_validity_test.dart
+++ b/tests/compiler/dart2js/source_map_pub_build_validity_test.dart
@@ -10,25 +10,37 @@ import 'package:expect/expect.dart';
import 'source_map_validator_helper.dart';
void main() {
- asyncTest(() => createTempDir().then((Directory tmpDir) {
- Directory sunflowerDir = new Directory.fromUri(
- Platform.script.resolve('../../../third_party/sunflower'));
+ asyncTest(() async {
+ Directory tmpDir = createTempDir();
Bill Hesse 2015/08/18 09:41:25 This needs to be = await createTempDir();
+ try {
+ Directory sunflowerDir = new Directory.fromUri(
+ Platform.script.resolve('../../../third_party/sunflower'));
- print("Copying '${sunflowerDir.path}' to '${tmpDir.path}'.");
- copyDirectory(sunflowerDir, tmpDir);
- String ext = Platform.isWindows ? '.bat' : '';
- 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 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');
+ print("Copying '${sunflowerDir.path}' to '${tmpDir.path}'.");
+ copyDirectory(sunflowerDir, tmpDir);
+ String ext = Platform.isWindows ? '.bat' : '';
+ 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);
Bill Hesse 2015/08/18 08:05:09 Perhaps put these print statements inside the chec
+ print(getResult.stderr);
+ Expect.equals(0, getResult.exitCode, 'Unexpected exitCode from pub get');
+
+ print("Running '$command build --mode=debug' from '${tmpDir}'.");
+ 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}'.");
+ } finally {
tmpDir.deleteSync(recursive: true);
- });
+ }
}));
Bill Hesse 2015/08/18 09:41:25 Extra parenthesis.
}
« 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