upload_symbols_unittest: clear the http_proxy env var
If 'http_proxy' is set in the env (like when using --proxy-sim), the
unittests will try to use that when accessing the server launched on
the localhost, and everything will fail. Pop that out of the environ
since we know all our connections are going through the localhost.
BUG=chromium:343912
TEST=`./upload_symbols_unittest.py` pass (in & out of --proxy-sim)
Change-Id: I294ac25f25971eaaccf70a944c345e20e273e110
Reviewed-on: https://chromium-review.googlesource.com/222477
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/upload_symbols_unittest.py b/scripts/upload_symbols_unittest.py
index 7f28926..462ab9b 100755
--- a/scripts/upload_symbols_unittest.py
+++ b/scripts/upload_symbols_unittest.py
@@ -20,6 +20,13 @@
import time
import urllib2
+# We specifically set up a local server to connect to, so make sure we
+# delete any proxy settings that might screw that up. We also need to
+# do it here because modules that are imported below will implicitly
+# initialize with this proxy setting rather than dynamically pull it
+# on the fly :(.
+os.environ.pop('http_proxy', None)
+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)),
'..', '..'))
from chromite.lib import cros_build_lib