diff options
author | Jose <jose@zeroc.com> | 2013-09-13 18:03:45 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2013-09-13 18:03:45 +0200 |
commit | 8f6e1e18e6717164f5ff67292c364057eb0eaa65 (patch) | |
tree | 441930f380b3ae22196ea8a003fb9534fac47564 /demoscript/Util.py | |
parent | Added --start-at-test/--start-at-demo options to testicedist.py (diff) | |
download | ice-8f6e1e18e6717164f5ff67292c364057eb0eaa65.tar.bz2 ice-8f6e1e18e6717164f5ff67292c364057eb0eaa65.tar.xz ice-8f6e1e18e6717164f5ff67292c364057eb0eaa65.zip |
Minor fixes to TestUtil.py
* Use java from JAVA_HOME when JAVA_HOME is set
* Remove unused function
Diffstat (limited to 'demoscript/Util.py')
-rw-r--r-- | demoscript/Util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/demoscript/Util.py b/demoscript/Util.py index af74d024a35..970283e717b 100644 --- a/demoscript/Util.py +++ b/demoscript/Util.py @@ -16,6 +16,9 @@ import signal import time import subprocess +javaHome = os.environ.get("JAVA_HOME", "") +javaCmd = os.path.join('"%s"' % javaHome, "bin", "java") if javaHome else "java" + # Locate the top level directory of the demo dist (or the top of the # source tree for a source dist). path = [ ".", "..", "../..", "../../..", "../../../.." ] @@ -610,6 +613,8 @@ def spawn(command, cwd = None, mapping = None): command = command.replace("java", "java -Djava.net.preferIPv4Stack=true", 1) if isSolaris() and x64: command = command.replace("java", "java -d64", 1) + if javaCmd != "java": + command = command.replace("java", javaCmd, 1) elif mapping == "cpp": if cwd != None: desc = os.path.join(cwd, desc) |