summaryrefslogtreecommitdiff
path: root/tests/test_file_cache.cc
diff options
context:
space:
mode:
authorJens Seidel <jensseidel@users.sf.net>2009-11-14 13:50:58 +0100
committerJens Seidel <jensseidel@users.sf.net>2009-11-14 13:50:58 +0100
commit6cf09d356954798889089661d43d59d3e5af04e6 (patch)
tree61ea2476f57c474353d863568ec2746811434d59 /tests/test_file_cache.cc
parent914c9dadfe9392193945e7f40bdd051fe6668243 (diff)
downloadaptitude-6cf09d356954798889089661d43d59d3e5af04e6.tar.gz
Fix the path to a test file in case that a build directory is used
Without this fix "make check" will fail if called outside of the source directory.
Diffstat (limited to 'tests/test_file_cache.cc')
-rw-r--r--tests/test_file_cache.cc3
1 files changed, 2 insertions, 1 deletions
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!).