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

Unified Diff: PRESUBMIT.py

Issue 3165060: Restart the test server for every test to clear the db, to reduce the likehood (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/git-cl.git
Patch Set: Revert to previous behavior Created 10 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: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index d4f6afe3796b53c40bb7a18fedc2883a68e8d384..10b4b43807fcfdcf4818579c440d9de3ed9cc1ea 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -62,9 +62,11 @@ def RunTests(input_api, output_api):
rietveld]):
return [error('Failed to checkout rietveld')]
print('Checking out django')
- if not call(['svn', 'co', '-q',
- 'http://code.djangoproject.com/svn/django/trunk/django@13630',
- join(rietveld, 'django')]):
+ if not call(
+ ['svn', 'co', '-q',
+ 'http://code.djangoproject.com/'
+ 'svn/django/branches/releases/1.0.X/django@13637',
+ join(rietveld, 'django')]):
return [error('Failed to checkout django')]
@@ -75,11 +77,19 @@ def RunTests(input_api, output_api):
if port == 65000:
return [error('Having issues finding an available port')]
+ verbose = True
+ if verbose:
+ stdout = None
+ stderr = None
+ print('\n\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
+ else:
+ stdout = input_api.subprocess.PIPE
+ stderr = input_api.subprocess.PIPE
output = []
test_server = input_api.subprocess.Popen(
- [dev_app, rietveld, '--port=%d' % port],
- stdout=input_api.subprocess.PIPE,
- stderr=input_api.subprocess.PIPE)
+ [dev_app, rietveld, '--port=%d' % port, '--use_sqlite',
+ '--datastore_path=' + join(rietveld, 'tmp.db'), '-c'],
+ stdout=stdout, stderr=stderr)
try:
# Loop until port 127.0.0.1:port opens or the process dies.
while not test_port(port):
@@ -94,9 +104,7 @@ def RunTests(input_api, output_api):
if test == 'test-lib.sh' or not test.endswith('.sh'):
continue
print('Running %s' % test)
- if not call([join(test_path, test)],
- cwd=test_path,
- stdout=input_api.subprocess.PIPE):
+ if not call([join(test_path, test)], cwd=test_path, stdout=stdout):
output.append(error('%s failed' % test))
finally:
test_server.kill()
« 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