mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
test: Fix hardcoded /usr/share in testsuite
This commit is contained in:
parent
85b42d7c95
commit
2bc0525e93
14
configure
vendored
14
configure
vendored
@ -649,6 +649,7 @@ UDEV_SYNC
|
|||||||
UDEV_RULES
|
UDEV_RULES
|
||||||
UDEV_PC
|
UDEV_PC
|
||||||
THIN
|
THIN
|
||||||
|
TESTSUITE_DATA
|
||||||
TESTING
|
TESTING
|
||||||
STATIC_LINK
|
STATIC_LINK
|
||||||
STATICDIR
|
STATICDIR
|
||||||
@ -7351,6 +7352,9 @@ $as_echo "$ac_cv_flag_HAVE_FULL_RELRO" >&6; }
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
if test "$prefix" = NONE; then
|
||||||
|
datarootdir=${ac_default_prefix}/share
|
||||||
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking file owner" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking file owner" >&5
|
||||||
@ -10812,6 +10816,16 @@ $as_echo "yes" >&6; }
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
TESTSUITE_DATA='${datarootdir}/lvm2-testsuite'
|
||||||
|
# double eval needed ${datarootdir} -> ${prefix}/share -> real path
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define TESTSUITE_DATA "$(eval echo $(eval echo $TESTSUITE_DATA))"
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable valgrind awareness of pools" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable valgrind awareness of pools" >&5
|
||||||
$as_echo_n "checking whether to enable valgrind awareness of pools... " >&6; }
|
$as_echo_n "checking whether to enable valgrind awareness of pools... " >&6; }
|
||||||
|
11
configure.in
11
configure.in
@ -174,6 +174,9 @@ AC_SUBST(HAVE_FULL_RELRO)
|
|||||||
################################################################################
|
################################################################################
|
||||||
dnl -- Prefix is /usr by default, the exec_prefix default is setup later
|
dnl -- Prefix is /usr by default, the exec_prefix default is setup later
|
||||||
AC_PREFIX_DEFAULT(/usr)
|
AC_PREFIX_DEFAULT(/usr)
|
||||||
|
if test "$prefix" = NONE; then
|
||||||
|
datarootdir=${ac_default_prefix}/share
|
||||||
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl -- Setup the ownership of the files
|
dnl -- Setup the ownership of the files
|
||||||
@ -1061,6 +1064,13 @@ if test "$TESTING" = yes; then
|
|||||||
PKG_CHECK_MODULES(CUNIT, cunit >= 2.0)
|
PKG_CHECK_MODULES(CUNIT, cunit >= 2.0)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
dnl -- Set LVM2 testsuite data
|
||||||
|
TESTSUITE_DATA='${datarootdir}/lvm2-testsuite'
|
||||||
|
# double eval needed ${datarootdir} -> ${prefix}/share -> real path
|
||||||
|
AC_DEFINE_UNQUOTED(TESTSUITE_DATA, ["$(eval echo $(eval echo $TESTSUITE_DATA))"], [Path to testsuite data])
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl -- Enable valgrind awareness of memory pools
|
dnl -- Enable valgrind awareness of memory pools
|
||||||
AC_MSG_CHECKING(whether to enable valgrind awareness of pools)
|
AC_MSG_CHECKING(whether to enable valgrind awareness of pools)
|
||||||
@ -1971,6 +1981,7 @@ AC_SUBST(SNAPSHOTS)
|
|||||||
AC_SUBST(STATICDIR)
|
AC_SUBST(STATICDIR)
|
||||||
AC_SUBST(STATIC_LINK)
|
AC_SUBST(STATIC_LINK)
|
||||||
AC_SUBST(TESTING)
|
AC_SUBST(TESTING)
|
||||||
|
AC_SUBST(TESTSUITE_DATA)
|
||||||
AC_SUBST(THIN)
|
AC_SUBST(THIN)
|
||||||
AC_SUBST(THIN_CHECK_CMD)
|
AC_SUBST(THIN_CHECK_CMD)
|
||||||
AC_SUBST(THIN_DUMP_CMD)
|
AC_SUBST(THIN_DUMP_CMD)
|
||||||
|
@ -632,6 +632,9 @@
|
|||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Path to testsuite data */
|
||||||
|
#undef TESTSUITE_DATA
|
||||||
|
|
||||||
/* The path to 'thin_check', if available. */
|
/* The path to 'thin_check', if available. */
|
||||||
#undef THIN_CHECK_CMD
|
#undef THIN_CHECK_CMD
|
||||||
|
|
||||||
|
@ -1173,7 +1173,7 @@ static int run( int argc, const char **argv, std::string fl_envvar = "TEST_FLAVO
|
|||||||
opt.workdir = args.opt( "--workdir" );
|
opt.workdir = args.opt( "--workdir" );
|
||||||
|
|
||||||
if ( opt.testdir.empty() )
|
if ( opt.testdir.empty() )
|
||||||
opt.testdir = "/usr/share/lvm2-testsuite";
|
opt.testdir = TESTSUITE_DATA;
|
||||||
|
|
||||||
if ( opt.workdir.empty() )
|
if ( opt.workdir.empty() )
|
||||||
opt.workdir = opt.testdir;
|
opt.workdir = opt.testdir;
|
||||||
|
Loading…
Reference in New Issue
Block a user