Reviewers: Jakob, tandrii(chromium),
Message:
PTAL
Description:
[test] Fix redirect problem for downloading test data on windows.
BUG=v8:4254
LOG=n
NOTRY=true
[email protected]
Please review this at https://codereview.chromium.org/1219013007/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+5, -0 lines):
M tools/testrunner/local/utils.py
Index: tools/testrunner/local/utils.py
diff --git a/tools/testrunner/local/utils.py
b/tools/testrunner/local/utils.py
index
13bd28012e7fb5cb8865d43871c4ed69cefbcf66..b55e1377f740256329b182f61f3d731468a170a5
100644
--- a/tools/testrunner/local/utils.py
+++ b/tools/testrunner/local/utils.py
@@ -32,6 +32,7 @@ from os.path import isdir
from os.path import join
import platform
import re
+import subprocess
import urllib2
@@ -121,5 +122,9 @@ def IsWindows():
def URLRetrieve(source, destination):
"""urllib is broken for SSL connections via a proxy therefore we
can't use urllib.urlretrieve()."""
+ if IsWindows():
+ # In python 2.7.6 on windows, urlopen doesn't follow redirects.
+ # Fall back to curl.
+ subprocess.check_call(["curl", source, '-L', '-o', destination])
with open(destination, 'w') as f:
f.write(urllib2.urlopen(source).read())
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.