summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Gohad <tushar.gohad@intel.com>2015-03-10 18:48:03 -0700
committerTushar Gohad <tushar.gohad@intel.com>2015-03-10 18:48:03 -0700
commit93446db9414f311bd9fc7dc047eb4dbbeb3e6feb (patch)
treef044e881bef1400cc9ec3371af84b3b400769b19
parentd81488a6b7629abdf625515cc503f847cdf6bc2d (diff)
downloadliberasurecode-93446db9414f311bd9fc7dc047eb4dbbeb3e6feb.tar.gz
Set runtime ld path to point to local so's when running tests
-rw-r--r--Makefile.am21
1 files changed, 15 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 6787508..cf64273 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,14 +27,23 @@ include_HEADERS = \
include/erasurecode/list.h \
include/xor_codes/xor_hd_code_defs.h \
include/xor_codes/xor_code.h \
- include/config_liberasurecode.h
+ include/config_liberasurecode.h
test: check
- @./test/alg_sig_test
- @./test/test_xor_hd_code
- @./test/liberasurecode_test
- @./test/libec_slap
-
+ $(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))")
+ @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) \
+ ./test/alg_sig_test
+ @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) \
+ ./test/test_xor_hd_code
+ @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) \
+ ./test/liberasurecode_test
+ @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) \
+ ./test/libec_slap
+
VALGRIND_EXEC_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=memcheck \
--error-exitcode=1 --leak-check=yes --track-fds=yes \
--malloc-fill=A5 --free-fill=DE --fullpath-after=.