From cedd242274a762dfb8d8efa530a0bbb3d16446a5 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 1 May 2014 21:57:55 +0200 Subject: [PATCH] integration tests: Use LD_PRELOAD instead of chrpath. chrpath requires that the new path be shorter or the same length as the previous path. --- .travis.yml | 2 +- README | 4 ++-- configure.ac | 5 ++--- t/integration/test_lib.sh | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index f91c75f..1ee48b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 a737ebc..d3d4d62 100644 --- 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: diff --git a/configure.ac b/configure.ac index 7b8d801..2e55bc7 100644 --- a/configure.ac +++ b/configure.ac @@ -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") diff --git a/t/integration/test_lib.sh b/t/integration/test_lib.sh index a5dece6..b7f7c97 100644 --- a/t/integration/test_lib.sh +++ b/t/integration/test_lib.sh @@ -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 -- 2.30.2