diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:47:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:47:37 +0000 |
commit | 00e2eb4fd0266c5be01e3a527a66aaad5ab4b634 (patch) | |
tree | a6a58bd544eb0b76b9d3acc678ea88791acca045 /bin/run-python-test-osx.sh | |
parent | Initial commit. (diff) | |
download | libixion-00e2eb4fd0266c5be01e3a527a66aaad5ab4b634.tar.xz libixion-00e2eb4fd0266c5be01e3a527a66aaad5ab4b634.zip |
Adding upstream version 0.19.0.upstream/0.19.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | bin/run-python-test-osx.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/bin/run-python-test-osx.sh b/bin/run-python-test-osx.sh new file mode 100755 index 0000000..d2d40b8 --- /dev/null +++ b/bin/run-python-test-osx.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# I have to write this wrapper for OSX because ixion.so module is hardcoded to +# find libixion-<version>.dylib to the installed location, and the only way to +# have it use libixion-<version>.dylib in src/libixion/.libs is to physically +# re-write the path in ixion.so. + +PROGDIR=$(dirname $0) +source $PROGDIR/env.sh + +TESTPYTHONPATH=$PROGDIR/../src/python/.test +PYTESTFILEDIR=$PROGDIR/../test/python + +# Copy ixion.so into the special test directory. +mkdir -p $TESTPYTHONPATH +cp $PROGDIR/../src/python/.libs/ixion.so $TESTPYTHONPATH/ + +echo "library installation directory: $IXION_INSTLIBDIR" +echo "library base name: $IXION_LIBNAME" + +# Re-write the path to libixion.dylib in ixion.so. +install_name_tool -change \ + $IXION_INSTLIBDIR/$IXION_LIBNAME.dylib \ + $PROGDIR/../src/libixion/.libs/$IXION_LIBNAME.dylib \ + $TESTPYTHONPATH/ixion.so + +# Use that ixion.so module to run the tests. +export PYTHONPATH=$TESTPYTHONPATH + +TESTS=$(ls $PYTESTFILEDIR/*.py) + +for _file in $TESTS; do + echo running $_file... + $_file +done + |