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

Unified Diff: testing_support/local_rietveld.py

Issue 1156923006: Install google appengine. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Remove unnecessary lines. 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 | « testing_support/get_appengine.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing_support/local_rietveld.py
diff --git a/testing_support/local_rietveld.py b/testing_support/local_rietveld.py
index 41b0166bf3c22a98774d24b0c27a70a36be3a229..83d232f4befd4702a976892205e7b58082dcb289 100755
--- a/testing_support/local_rietveld.py
+++ b/testing_support/local_rietveld.py
@@ -63,23 +63,18 @@ class LocalRietveld(object):
self.test_server = None
self.port = None
self.tempdir = None
-
- # Find the GAE SDK
- previous_dir = ''
- self.sdk_path = ''
- base_dir = self.base_dir
- while base_dir != previous_dir:
- previous_dir = base_dir
- self.sdk_path = os.path.join(base_dir, 'google_appengine')
- if not os.path.isfile(os.path.join(self.sdk_path, 'VERSION')):
- base_dir = os.path.dirname(base_dir)
- self.dev_app = os.path.join(self.sdk_path, 'dev_appserver.py')
+ self.dev_app = None
def install_prerequisites(self):
- # First, verify the Google AppEngine SDK is available.
- if not os.path.isfile(self.dev_app):
- raise Failure(
- 'Install google_appengine sdk in %s or higher up' % self.base_dir)
+ # First, install the Google AppEngine SDK.
+ cmd = [os.path.join(self.base_dir, 'get_appengine.py'),
+ '--dest=%s' % self.base_dir]
+ try:
+ subprocess2.check_call(cmd)
+ except (OSError, subprocess2.CalledProcessError), e:
+ raise Failure('Failed to run %s\n%s' % (cmd, e))
+ sdk_path = os.path.join(self.base_dir, 'google_appengine')
+ self.dev_app = os.path.join(sdk_path, 'dev_appserver.py')
if os.path.isdir(os.path.join(self.rietveld, '.hg')):
# Left over from mercurial. Delete it.
« no previous file with comments | « testing_support/get_appengine.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698