From 6b5eae2d192c3067e2ccce07ebfba89969e4f1a1 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Fri, 26 Aug 2011 17:21:28 +0000 Subject: [PATCH] Make GAE instance bind all interfaces when a variable is set. It's mostly for debugging when testing with a leaking service. It's going to be rarely used but I used it often enough to warrant it being committed. R=dpranke@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/7744030 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@98438 0039d316-1c4b-4281-b951-d872f2087c98 --- tests/local_rietveld.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/local_rietveld.py b/tests/local_rietveld.py index 49d1536f5..d9727f1dd 100755 --- a/tests/local_rietveld.py +++ b/tests/local_rietveld.py @@ -96,6 +96,14 @@ class LocalRietveld(object): '--port=%d' % self.port, '--datastore_path=' + os.path.join(self.rietveld, 'tmp.db'), '-c'] + + # CHEAP TRICK + # By default you only want to bind on loopback but I'm testing over a + # headless computer so it's useful to be able to access the test instance + # remotely. + if os.environ.get('GAE_LISTEN_ALL', '') == 'true': + cmd.extend(('-a', '0.0.0.0')) + self.test_server = subprocess2.Popen( cmd, stdout=pipe, stderr=pipe, cwd=self.rietveld) # Loop until port 127.0.0.1:port opens or the process dies.