Make smoke tester work on cygwin when JAVAX_HOME environment variable values are Windows style (X:/blah or X:\blah...) (merge branch lucene_solr_4_0 r1389448)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1389476 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Rowe 2012-09-24 16:33:39 +00:00
parent 6ce99b3d28
commit 2957201208
1 changed files with 5 additions and 3 deletions

View File

@ -38,6 +38,9 @@ import checkJavadocLinks
# must have a working gpg, tar, unzip in your path. This has been
# tested on Linux and on Cygwin under Windows 7.
cygwin = platform.system().lower().startswith('cygwin')
cygwinWindowsRoot = os.popen('cygpath -w /').read().strip().replace('\\','/') if cygwin else ''
def unshortenURL(url):
parsed = urllib.parse.urlparse(url)
if parsed[0] in ('http', 'https'):
@ -55,6 +58,8 @@ def javaExe(version):
path = JAVA7_HOME
else:
raise RuntimeError("unknown Java version '%s'" % version)
if cygwin:
path = os.popen('cygpath -u "%s"' % path).read().strip()
return 'export JAVA_HOME="%s" PATH="%s/bin:$PATH"' % (path, path)
def verifyJavaVersion(version):
@ -77,9 +82,6 @@ except KeyError:
verifyJavaVersion('1.6')
verifyJavaVersion('1.7')
cygwin = platform.system().lower().startswith('cygwin')
cygwinWindowsRoot = os.popen('cygpath -w /').read().strip().replace('\\','/') if cygwin else ''
# TODO
# + verify KEYS contains key that signed the release
# + make sure changes HTML looks ok