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

Unified Diff: lib/src/io.dart

Issue 1216433003: Stop auto-generating Pub snapshots for testing. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Fix an environment variable name. Created 5 years, 6 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 | « .gitignore ('k') | test/test_pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/io.dart
diff --git a/lib/src/io.dart b/lib/src/io.dart
index 944e0a5a8c995f9ae15e2499569954ce37a7f0e6..7a45b115c01bc3a15e6075bde3ee6f532fdc22a9 100644
--- a/lib/src/io.dart
+++ b/lib/src/io.dart
@@ -486,7 +486,7 @@ final bool runningAsTest =
///
/// This works because when running from tests, pub always uses a snapshot named
/// "pub.test.snapshot", which is not used outside of tests.
Bob Nystrom 2015/06/26 16:41:16 Update the doc comment.
nweiz 2015/06/26 19:49:10 Done.
-final bool runningFromTest = Platform.script.path.endsWith('.test.snapshot');
+final bool runningFromTest = Platform.environment.containsKey('_PUB_TESTING');
/// Whether pub is running from within the Dart SDK, as opposed to from the Dart
/// source repository.
« no previous file with comments | « .gitignore ('k') | test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698