diff options
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/test_file_cache.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 7ed7febd..9f75a753 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ MAINTAINERCLEANFILES = Makefile.in INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/src -I$(srcdir) -AM_CPPFLAGS = -DBOOST_TEST_DYN_LINK +AM_CPPFLAGS = -DBOOST_TEST_DYN_LINK -DSRCDIR=\"$(srcdir)\" LDADD = $(top_builddir)/src/loggers.o \ $(top_builddir)/src/generic/apt/matching/libgeneric-matching.a \ $(top_builddir)/src/generic/apt/libgeneric-apt.a \ diff --git a/tests/test_file_cache.cc b/tests/test_file_cache.cc index 5c109599..b8bb5aa6 100644 --- a/tests/test_file_cache.cc +++ b/tests/test_file_cache.cc @@ -437,7 +437,8 @@ void testCacheUpgradeFrom(int version) free(argv0_copy); } - std::string inputFilename = (boost::format("%s/file_caches/ver%d_cache.db") % argv0_dirname % version).str(); + const std::string srcdir = SRCDIR; + std::string inputFilename = (boost::format(std::string("%s/") + srcdir + "/file_caches/ver%d_cache.db") % argv0_dirname % version).str(); // Make a temporary copy, since the upgrade is in-place (don't want // to modify the test data!). |