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

Unified Diff: test/test_pub.dart

Issue 1162603009: A few more fixes for testing in the repo. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 7 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 | « lib/src/io.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_pub.dart
diff --git a/test/test_pub.dart b/test/test_pub.dart
index b816d9f11045ca214db9e411019beaf81436fec0..381f7381b7c39695b88c25af2463cce37b19ad8f 100644
--- a/test/test_pub.dart
+++ b/test/test_pub.dart
@@ -573,10 +573,13 @@ void _ensureSnapshot() {
}
}
- var dartSnapshot = runProcessSync(Platform.executable, [
- '--snapshot=$snapshotPath',
- p.join(pubRoot, 'bin', 'pub.dart')
- ]);
+ var args = ['--snapshot=$snapshotPath'];
+ if (Platform.packageRoot.isNotEmpty) {
+ args.add('--package-root=${Platform.packageRoot}');
+ }
+ args.add(p.join(pubRoot, 'bin', 'pub.dart'));
+
+ var dartSnapshot = runProcessSync(Platform.executable, args);
if (dartSnapshot.exitCode != 0) throw "Failed to run dart --snapshot.";
writeTextFile(hashPath, hash);
« no previous file with comments | « lib/src/io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698