summaryrefslogtreecommitdiff
path: root/scripts/TestUtil.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-12-22 08:33:40 -0800
committerMark Spruiell <mes@zeroc.com>2009-12-22 08:33:40 -0800
commit7171379f83c29dbd476d029b08f8c8d3cb366485 (patch)
tree329b596359ca78e2bea84869d66bc5fd950ae93c /scripts/TestUtil.py
parentVarious fixes to Windows installer (diff)
downloadice-7171379f83c29dbd476d029b08f8c8d3cb366485.tar.bz2
ice-7171379f83c29dbd476d029b08f8c8d3cb366485.tar.xz
ice-7171379f83c29dbd476d029b08f8c8d3cb366485.zip
bug 4551 - PHP test suite broken for RPM install
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-xscripts/TestUtil.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index 189735453a5..6fb89a9bd69 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -504,27 +504,33 @@ def phpSetup():
ext = "IcePHP.so"
if not iceHome:
extDir = os.path.abspath(os.path.join(toplevel, "php", "lib"))
+ incDir = extDir
else:
#
# If ICE_HOME points to the installation directory of a source build, the
- # PHP extension will be located in $ICE_HOME/lib or $ICE_HOME/lib64.
- # For an RPM installation, PHP is already configured to load the extension.
- # We could also execute "php -m" and check if the output includes "ice".
+ # PHP extension will be located in $ICE_HOME/php. For an RPM installation,
+ # PHP is already configured to load the extension. (We could also execute
+ # "php -m" and check if the output includes "ice".)
#
- if x64:
- extDir = os.path.join(iceHome, "lib64")
- else:
- extDir = os.path.join(iceHome, "lib")
+ extDir = os.path.join(iceHome, "php")
+ incDir = extDir
if not os.path.exists(os.path.join(extDir, ext)):
if iceHome == "/usr":
extDir = None # Assume PHP is already configured to load the extension.
+ #
+ # On SLES11, the PHP run time files are installed in /usr/share/php5, but
+ # this directory is not in the default include path when you specify an
+ # alternate configuration file, so we have to configure it explicitly.
+ #
+ if os.path.exists("/usr/share/php5/Ice.php"):
+ incDir = "/usr/share/php5"
+ else:
+ incDir = None
else:
print "unable to find IcePHP extension!"
sys.exit(1)
- incDir = extDir
-
tmpini = open("tmp.ini", "w")
tmpini.write("; Automatically generated by Ice test driver.\n")
if extDir: