summaryrefslogtreecommitdiff
path: root/scripts/TestUtil.py
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2014-10-09 13:31:19 -0230
committerDwayne Boone <dwayne@zeroc.com>2014-10-09 13:31:19 -0230
commitcec775ffebd3c2bb6c395d5c9f1e4106f3d72d09 (patch)
tree385630603c4fbb9b22c537812314c6deaf89925c /scripts/TestUtil.py
parentFix Ruby Mingw install to install ruby x64 in ruby/x64 directory (diff)
downloadice-cec775ffebd3c2bb6c395d5c9f1e4106f3d72d09.tar.bz2
ice-cec775ffebd3c2bb6c395d5c9f1e4106f3d72d09.tar.xz
ice-cec775ffebd3c2bb6c395d5c9f1e4106f3d72d09.zip
ICE-5441 tests hang on Windows if executable not present
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-xscripts/TestUtil.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index 043245cbc47..f8cbcd3a8f6 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -7,7 +7,7 @@
#
# **********************************************************************
-import sys, os, re, getopt, time, string, threading, atexit, platform
+import sys, os, re, getopt, time, string, threading, atexit, platform, traceback
# Global flags and their default values.
protocol = "" # If unset, default to TCP. Valid values are "tcp", "ssl", "ws" or "wss".
@@ -151,7 +151,7 @@ for path in os.environ["PATH"].split(os.pathsep):
phpCmd = "php5"
break
#
-# The NodeJS interpreter is called "nodejs" on some platforms
+# The NodeJS interpreter is called "nodejs" on some platforms
# (e.g., Ubuntu)
#
nodeCmd = "node"
@@ -723,7 +723,7 @@ sslConfigTree = {
"colloc" : " --IceSSL.CertFile=c_rsa1024.pfx --IceSSL.CheckCertName=0"
},
}
-
+
if isDarwin():
sslConfigTree["cpp"]["client"] += " --IceSSL.Keychain=client.keychain --IceSSL.KeychainPassword=password"
#
@@ -732,7 +732,7 @@ if isDarwin():
sslConfigTree["cpp"]["server"] += " --IceSSL.Keychain=server.keychain --IceSSL.KeychainPassword=password " + \
"--IceSSL.ProtocolVersionMax=tls1_1"
sslConfigTree["cpp"]["colloc"] += " --IceSSL.Keychain=colloc.keychain --IceSSL.KeychainPassword=password"
-
+
sslConfigTree["py"] = sslConfigTree["cpp"]
sslConfigTree["rb"] = sslConfigTree["cpp"]
sslConfigTree["php"] = sslConfigTree["cpp"]
@@ -1081,7 +1081,14 @@ def _spawn(cmd, env=None, cwd=None, startReader=True, lang=None):
if printenv:
dumpenv(env, lang)
- return Expect.Expect(cmd, startReader=startReader, env=env, logfile=tracefile, cwd=cwd)
+ try:
+ process = Expect.Expect(cmd, startReader=startReader, env=env, logfile=tracefile, cwd=cwd)
+ except:
+ print("Command failed:\n" + cmd)
+ traceback.print_exc(file=sys.stderr)
+ sys.exit(1)
+
+ return process
def spawn(cmd, cwd=None):
# Spawn given command with test environment.