summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Gohad <tushar.gohad@intel.com>2015-03-10 23:58:15 -0700
committerTushar Gohad <tushar.gohad@intel.com>2015-03-11 01:20:24 -0700
commit02bb6148d2b318e1b2cb1a0fffa4121ba87b9d68 (patch)
tree0eb9fc817cc1dc9713373b7f2efd6f366aa36091
parentf48656c5d7a06a759499be9f6945ac8bc26d8d55 (diff)
downloadpyeclib-02bb6148d2b318e1b2cb1a0fffa4121ba87b9d68.tar.gz
test: Improve LD_LIBRARY_PATH determination for local tests
-rw-r--r--Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 18d2cb0..93b3458 100644
--- a/Makefile
+++ b/Makefile
@@ -34,11 +34,17 @@ install: build
UNITS := test/test_pyeclib_api.py test/test_pyeclib_c.py
test: build
- LD_LIBRARY_PATH=${TOPDIR}:${LD_LIBRARY_PATH} nosetests --exe --with-coverage \
- --cover-package pyeclib --cover-erase \
- --cover-html --cover-html-dir=${TOPDIR}/cover \
- $(UNITS)
- rm -f .coverage
+ $(eval SONAMES := $(shell find $(abs_top_builddir) -name '*.so'))
+ $(eval SODIRS := $(dir $(SONAMES)))
+ $(eval LD_LIBRARY_PATH := LD_LIBRARY_PATH="$(subst / ,/:,$(SODIRS))")
+ $(eval DYLD_LIBRARY_PATH := DYLD_LIBRARY_PATH="$(subst / ,/:,$(SODIRS))")
+ $(eval DYLD_FALLBACK_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH="$(subst / ,/:,$(SODIRS))")
+ rm -rf cover .coverage
+ @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) \
+ nosetests --exe --with-coverage \
+ --cover-package pyeclib --cover-erase \
+ --cover-html --cover-html-dir=${TOPDIR}/cover \
+ $(UNITS)
clean:
-rm -f pyeclib_c.so