Code

integration tests: Use LD_PRELOAD instead of chrpath.
authorSebastian Harl <sh@tokkee.org>
Thu, 1 May 2014 19:57:55 +0000 (21:57 +0200)
committerSebastian Harl <sh@tokkee.org>
Thu, 1 May 2014 19:57:55 +0000 (21:57 +0200)
chrpath requires that the new path be shorter or the same length as the
previous path.

.travis.yml
README
configure.ac
t/integration/test_lib.sh

index f91c75f5387db8e0308d497b3696693a76a0312e..1ee48b38b2420fc17cbf0286e5d8e0154cedc99a 100644 (file)
@@ -11,7 +11,7 @@ before_install:
 install:
   - sudo apt-get install -qq check flex bison libtool libltdl-dev
   - sudo apt-get install -qq libdbi-dev libedit-dev libreadline-dev
-  - sudo apt-get install -qq valgrind chrpath
+  - sudo apt-get install -qq valgrind
   - sudo pip install cpp-coveralls
   - pip show cpp-coveralls
 script: ./t/cibuild.sh
diff --git a/README b/README
index a737ebc07900611427eea606e0fd773ecd5ac1e4..d3d4d6200e127d6826b61d24fbd4d68d4db25f4c 100644 (file)
--- a/README
+++ b/README
@@ -68,8 +68,8 @@ Testing
   library. It used used to mock I/O related functions. In case this function
   is not available, the respective tests will be disabled automatically.
 
-  The integration tests require valgrind and chrpath. If any of these are not
-  available, integration tests will be disabled automatically.
+  The integration tests require valgrind. If it is not available, integration
+  tests will be disabled automatically.
 
   For the latest build status, see:
   <https://travis-ci.org/tokkee/sysdb>
index 7b8d801dbb04c3b10c0b373074e18e781e94d448..2e55bc70d687a162cdb61a5969f90c2a299e80c8 100644 (file)
@@ -398,9 +398,8 @@ AC_SUBST([A2X])
 
 integration_tests="yes"
 AC_PATH_PROG([VALGRIND], [valgrind])
-AC_PATH_PROG([CHRPATH], [chrpath])
-if test "x$VALGRIND" = "x" || test "x$CHRPATH" = "x"; then
-       integration_tests="no (missing valgrind and/or chrpath)"
+if test "x$VALGRIND" = "x"; then
+       integration_tests="no (missing valgrind)"
 fi
 AM_CONDITIONAL([INTEGRATION_TESTING], test "x$integration_tests" = "xyes")
 
index a5dece69f64986c16493e98ffd2721314ae68558..b7f7c9714d9b9e6fad80ad69e4098f00a7dde8c3 100644 (file)
@@ -38,8 +38,6 @@ cp "$TOP_SRCDIR/t/integration/.libs/mock_plugin.so" "$TESTDIR/backend"
 cp "$TOP_SRCDIR"/src/.libs/sysdb "$TESTDIR"
 cp "$TOP_SRCDIR"/src/.libs/sysdbd "$TESTDIR"
 cp "$TOP_SRCDIR"/src/.libs/libsysdb*.so* "$TESTDIR"
-chrpath -r "$TESTDIR" "$TESTDIR/sysdb" > /dev/null
-chrpath -r "$TESTDIR" "$TESTDIR/sysdbd" > /dev/null
 
 MEMCHECK="valgrind --quiet --tool=memcheck --error-exitcode=1"
 MEMCHECK="$MEMCHECK --trace-children=yes"
@@ -54,6 +52,8 @@ PLUGIN_DIR="$TESTDIR"
 SYSDB="$MEMCHECK $TESTDIR/sysdb"
 SYSDBD="$MEMCHECK $TESTDIR/sysdbd"
 
+export LD_PRELOAD=$TESTDIR/libsysdbclient.so:$TESTDIR/libsysdb.so
+
 function wait_for_sysdbd() {
        local i
        for (( i=0; i<10; i++ )); do