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

Unified Diff: tests/fake_repos.py

Issue 6349053: Add comment to clarify SHOULD_LEAK (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 11 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/fake_repos.py
diff --git a/tests/fake_repos.py b/tests/fake_repos.py
index 55fd976b6deacd3dfb2729c250611c70477d652c..8674aca56acf1f5a6ea2cbe23bec013a1623ccd8 100755
--- a/tests/fake_repos.py
+++ b/tests/fake_repos.py
@@ -208,7 +208,10 @@ class FakeReposBase(object):
populateSvn() and populateGit() need to be implemented by the subclass.
"""
- # Should leak the repositories.
+ # When SHOULD_LEAK is set to True, temporary directories created while the
+ # tests are running aren't deleted at the end of the tests. Expect failures
+ # when running more than one test due to inter-test side-effects. Helps with
+ # debugging.
SHOULD_LEAK = False
# Override if unhappy.
TRIAL_DIR = None
@@ -725,8 +728,8 @@ def main(argv):
return 0
-# Kind of hack.
if '-l' in sys.argv:
+ # See SHOULD_LEAK definition in FakeReposBase for its purpose.
FakeReposBase.SHOULD_LEAK = True
print 'Leaking!'
sys.argv.remove('-l')
« 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