summaryrefslogtreecommitdiff
path: root/scripts/TestUtil.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-11-24 09:57:57 +0100
committerBenoit Foucher <benoit@zeroc.com>2014-11-24 09:57:57 +0100
commitb1232b1355a31b047f4bad5a3e96f521d0333c92 (patch)
tree1491b8437e4771930533ed2239901481947849bc /scripts/TestUtil.py
parentfixing RPM arch dependencies (diff)
downloadice-b1232b1355a31b047f4bad5a3e96f521d0333c92.tar.bz2
ice-b1232b1355a31b047f4bad5a3e96f521d0333c92.tar.xz
ice-b1232b1355a31b047f4bad5a3e96f521d0333c92.zip
Fixed TestUtil.py warning related to global declaration of x64
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-xscripts/TestUtil.py36
1 files changed, 17 insertions, 19 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index 6ed6e6adbcd..58d3ad1f6f3 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -50,7 +50,6 @@ serverOnly = False
mx = False
global linuxDistribution
-
if os.path.isfile("/etc/issue"):
f = open("/etc/issue", "r")
issue = f.read()
@@ -119,24 +118,6 @@ def isRhel():
def isSles():
return isLinux() and linuxDistribution and linuxDistribution == "SUSE LINUX"
-#
-# Set the default arch to x64 in x64 machines, this could be override with --x86
-# argument
-#
-if isWin32():
- if (os.environ.get("PROCESSOR_ARCHITECTURE", "") == "AMD64" or
- os.environ.get("PROCESSOR_ARCHITEW6432", "") == "AMD64"):
- global x64
- x64 = True
-else:
- p = subprocess.Popen("uname -m", shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
- if(p.wait() != 0):
- print("uname failed:\n" + p.stdout.read().strip())
- sys.exit(1)
- if p.stdout.readline().decode('UTF-8').strip() == "x86_64":
- global x64
- x64 = True
-
def getCppCompiler():
compiler = ""
if os.environ.get("CPP_COMPILER", "") != "":
@@ -209,6 +190,22 @@ def getThirdpartyHome():
return None
#
+# Set the default arch to x64 on x64 machines, this could be overriden
+# with the --x86 command line argument.
+#
+if isWin32():
+ if (os.environ.get("PROCESSOR_ARCHITECTURE", "") == "AMD64" or
+ os.environ.get("PROCESSOR_ARCHITEW6432", "") == "AMD64"):
+ x64 = True
+else:
+ p = subprocess.Popen("uname -m", shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
+ if(p.wait() != 0):
+ print("uname failed:\n" + p.stdout.read().strip())
+ sys.exit(1)
+ if p.stdout.readline().decode('UTF-8').strip() == "x86_64":
+ x64 = True
+
+#
# The PHP interpreter is called "php5" on some platforms (e.g., SLES).
#
phpCmd = "php"
@@ -221,6 +218,7 @@ for path in os.environ["PATH"].split(os.pathsep):
elif os.path.exists(os.path.join(path, "php5")):
phpCmd = "php5"
break
+
#
# The NodeJS interpreter is called "nodejs" on some platforms
# (e.g., Ubuntu)