Whamcloud - gitweb
tests: Add to LD_LIBRARY_PATH instead of overriding
authorMichael Forney <forney@google.com>
Fri, 5 Sep 2014 22:35:13 +0000 (15:35 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 8 Sep 2014 22:55:42 +0000 (18:55 -0400)
Signed-off-by: Michael Forney <forney@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
MCONFIG.in
e2fsck/Makefile.in
lib/ext2fs/Makefile.in
lib/ss/Makefile.in
resize/Makefile.in
tests/test_config

index 7393379..f1003cf 100644 (file)
@@ -117,6 +117,7 @@ DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
 DEPLIBUUID = @DEPLIBUUID@
 DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
 DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID)
+TESTENV = LD_LIBRARY_PATH="$(LIB):$${LD_LIBRARY_PATH}" DYLD_LIBRARY_PATH="$(LIB):$${DYLD_LIBRARY_PATH}"
 
 STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@
 STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@
index 9a2f8f5..3ab2d8e 100644 (file)
@@ -168,10 +168,10 @@ tst_region: region.c $(DEPLIBCOM_ERR)
                $(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR) $(SYSLIBS)
 
 check:: tst_refcount tst_region tst_crc32 tst_problem
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_refcount
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_region
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_crc32
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_problem
+       $(TESTENV) ./tst_refcount
+       $(TESTENV) ./tst_region
+       $(TESTENV) ./tst_crc32
+       $(TESTENV) ./tst_problem
 
 extend: extend.o
        $(E) "  LD $@"
index 4fc149a..b631489 100644 (file)
@@ -453,27 +453,23 @@ mkjournal: mkjournal.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR)
 check:: tst_bitops tst_badblocks tst_iscan tst_types tst_icount \
     tst_super_size tst_types tst_inode_size tst_csum tst_crc32c tst_bitmaps \
     tst_inline tst_libext2fs
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_bitops
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_badblocks
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_iscan
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_types
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_icount
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_super_size
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_inode_size
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_csum
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_inline
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_crc32c
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) \
-               ./tst_bitmaps -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+       $(TESTENV) ./tst_bitops
+       $(TESTENV) ./tst_badblocks
+       $(TESTENV) ./tst_iscan
+       $(TESTENV) ./tst_types
+       $(TESTENV) ./tst_icount
+       $(TESTENV) ./tst_super_size
+       $(TESTENV) ./tst_inode_size
+       $(TESTENV) ./tst_csum
+       $(TESTENV) ./tst_inline
+       $(TESTENV) ./tst_crc32c
+       $(TESTENV) ./tst_bitmaps -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
        diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) \
-               ./tst_bitmaps -t 2 -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+       $(TESTENV) ./tst_bitmaps -t 2 -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
        diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) \
-               ./tst_bitmaps -t 3 -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+       $(TESTENV) ./tst_bitmaps -t 3 -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
        diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) \
-               ./tst_bitmaps -l -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
+       $(TESTENV) ./tst_bitmaps -l -f $(srcdir)/tst_bitmaps_cmds > tst_bitmaps_out
        diff $(srcdir)/tst_bitmaps_exp tst_bitmaps_out
 
 installdirs::
index 24c5e37..a9c7e25 100644 (file)
@@ -164,7 +164,7 @@ test_ss: test_ss.o test_cmd.o $(DEPLIBSS) $(DEPLIBCOM_ERR)
 
 check:: all test_ss
        $(E) "  RUN TEST test_ss"
-       -@(LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./test_ss -f $(srcdir)/test_script > test_out 2>&1; exit 0)
+       -@($(TESTENV) ./test_ss -f $(srcdir)/test_script > test_out 2>&1; exit 0)
        $(Q) if diff test_out $(srcdir)/test_script_expected > test.diff; then \
                true ; else echo "Regression test for ss library failed!"; exit 1 ; fi
 
index f7b80ef..29f55d0 100644 (file)
@@ -92,8 +92,7 @@ uninstall:
        done
 
 test_extent.out: test_extent $(srcdir)/test_extent.in
-       LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./test_extent < $(srcdir)/test_extent.in \
-               > test_extent.out
+       $(TESTENV) ./test_extent < $(srcdir)/test_extent.in > test_extent.out
 
 check:: test_extent.out
        $(Q) if cmp -s test_extent.out $(srcdir)/test_extent.in ; then \
index 1872e5c..dbc36fe 100644 (file)
@@ -20,8 +20,8 @@ E2UNDO_EXE="../misc/e2undo"
 TEST_REL=../tests/progs/test_rel
 TEST_ICOUNT=../tests/progs/test_icount
 CRCSUM=../tests/progs/crcsum
-LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
-DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
+LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${LD_LIBRARY_PATH}
+DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${DYLD_LIBRARY_PATH}
 export LD_LIBRARY_PATH
 export DYLD_LIBRARY_PATH
 TZ=GMT0