Skip to content

Commit

Permalink
HYDRA-694 : Remove idiff workaround (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
debloip-adsk authored Dec 20, 2023
1 parent bafe0d3 commit 24dbf2f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions test/testUtils/imageUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,6 @@ def imageDiff(imagePath1, imagePath2, verbose, fail, failpercent, hardfail,
sys.__stdout__.write("\nimage diffing with {0}".format(cmd))
sys.__stdout__.flush()

# LD_LIBRARY_PATH(or PATH or DYLD_LIBRARY_PATH) needs to be set for the idiff executable because its
# RPATH is absolute rather than relative to ORIGIN, meaning the RPATH
# points to the absolute path on the machine where idiff was built.
# This absence of relative paths for RPATH comes from OpenImageIO.
# We introduce a second workaround to avoid Maya using usd's libpng,
# because both use incompatible versions of libpng. This is done by
# setting LD_LIBRARY_PATH to IDIFF_LD_LIBRARY_PATH only when we run
# idiff using Python's subprocess module.

if sys.platform == "darwin":
os.environ["DYLD_LIBRARY_PATH"] = os.environ['IDIFF_LD_LIBRARY_PATH']
elif sys.platform.startswith("linux"):
os.environ["LD_LIBRARY_PATH"] = os.environ['IDIFF_LD_LIBRARY_PATH']

# Run idiff command
proc = subprocess.run(cmd, shell=False, env=os.environ.copy(), stdout=subprocess.PIPE)
return proc
Expand Down

0 comments on commit 24dbf2f

Please sign in to comment.