diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-04-14 10:32:53 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-04-14 10:32:53 -0230 |
commit | 4a32b447136a604c5e2f6323a3427ce6d52225dc (patch) | |
tree | e2f0e7e320956ef879f48ac97f82f8a34677a021 | |
parent | (ICE-6452) - C# nmake install doesn't work (diff) | |
download | ice-4a32b447136a604c5e2f6323a3427ce6d52225dc.tar.bz2 ice-4a32b447136a604c5e2f6323a3427ce6d52225dc.tar.xz ice-4a32b447136a604c5e2f6323a3427ce6d52225dc.zip |
ICE-6451 test/Slice/headers does not work against bindist
-rwxr-xr-x | cpp/test/Slice/headers/run.py | 14 | ||||
-rwxr-xr-x | scripts/TestUtil.py | 16 |
2 files changed, 23 insertions, 7 deletions
diff --git a/cpp/test/Slice/headers/run.py b/cpp/test/Slice/headers/run.py index 803901b61d8..3d832a90210 100755 --- a/cpp/test/Slice/headers/run.py +++ b/cpp/test/Slice/headers/run.py @@ -21,15 +21,15 @@ sys.path.append(os.path.join(path[0], "scripts")) import TestUtil def clean(): - for f in ["iceslices", - "linktoslices", - os.path.join("slices", "linktodir2"), + for f in ["iceslices", + "linktoslices", + os.path.join("slices", "linktodir2"), os.path.join("slices", "linktodir1"), os.path.join("slices", "dir1", "linktoa3.ice")]: if os.path.exists(f): os.unlink(f) os.system("rm -rf project1 tmp") - + clean() os.symlink("slices", "linktoslices") os.symlink("dir1", os.path.join("slices", "linktodir1")) @@ -39,7 +39,7 @@ os.symlink("dir2", os.path.join("slices", "linktodir2")) slice2cpp = TestUtil.getSliceTranslator() basedir = os.path.dirname(os.path.abspath(__file__)) -slicedir = os.path.join(TestUtil.getIceDir(), "slice") +slicedir = TestUtil.getSliceDir() os.symlink(slicedir, "iceslices") def runTest(cmd): @@ -67,7 +67,7 @@ runTest("%s -I%s -Ilinktoslices linktoslices/linktodir2/b.ice" % (slice2cpp, sli if os.path.exists("SLICES"): runTest("%s -IICESLICES -ISLICES SLICES/DIR2/B.ice" % (slice2cpp)) runTest("%s -IICESLICES -ILINKTOSLICES LINKTOSLICES/LINKTODIR2/B.ice" % (slice2cpp)) - + # # Slice files are symlinks, include dir is a regular directory # @@ -95,7 +95,7 @@ clean() # Slice file is regular file, include dir is a symlink to a second symlink # os.system("mkdir -p tmp/Ice-x.y.z/share") -os.system("cd tmp/Ice-x.y.z/share && ln -s %s" % TestUtil.getIceDir("slice")) +os.system("cd tmp/Ice-x.y.z/share && ln -s %s" % slicedir) os.system("mkdir -p project1/share") diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py index 31b79671e31..ae87ebaaba8 100755 --- a/scripts/TestUtil.py +++ b/scripts/TestUtil.py @@ -665,6 +665,22 @@ def getIceDir(subdir = None, testdir = None): else: return toplevel +def getSliceDir(): + # + # If ICE_HOME is set we're running the test against a binary distribution. Otherwise, + # we're running the test against a source distribution. + # + global iceHome + if iceHome: + if isDarwin() and iceHome == "/usr/local": + return "/usr/local/share/slice" + elif isLinux() and iceHome == "/usr": + return "/usr/share/Ice-" + iceVersion + "/slice" + else: + return os.path.join(iceHome, "slice") + else: + return os.path.join(toplevel, "slice") + def phpCleanup(): if os.path.exists("tmp.ini"): os.remove("tmp.ini") |