This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ec536b  Setting the correct directory for test_Cache
8ec536b is described below

commit 8ec536bf5a2c35a95bea9e8c5028f554e192f973
Author: Bryan Call <bc...@apache.org>
AuthorDate: Fri Apr 5 17:10:36 2019 -0700

    Setting the correct directory for test_Cache
---
 include/tscore/ink_config.h.in | 2 ++
 iocore/cache/test/main.cc      | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/tscore/ink_config.h.in b/include/tscore/ink_config.h.in
index 3e3aa28..53b02db 100644
--- a/include/tscore/ink_config.h.in
+++ b/include/tscore/ink_config.h.in
@@ -118,6 +118,8 @@
 #define TS_BUILD_CACHEDIR "@rel_cachedir@"
 #define TS_BUILD_INFODIR "@rel_infodir@"
 
+#define TS_ABS_TOP_SRCDIR "@abs_top_srcdir@"
+
 #define TS_BUILD_CANONICAL_HOST "@host@"
 
 #define TS_BUILD_DEFAULT_LOOPBACK_IFACE "@default_loopback_iface@"
diff --git a/iocore/cache/test/main.cc b/iocore/cache/test/main.cc
index c62cd3f..777d9ca 100644
--- a/iocore/cache/test/main.cc
+++ b/iocore/cache/test/main.cc
@@ -65,8 +65,9 @@ struct EventProcessorListener : Catch::TestEventListenerBase {
     thread->set_specific();
     init_buffer_allocators(0);
 
-    Layout::get()->sysconfdir = std::string_view("./test");
-    Layout::get()->prefix     = std::string_view("./test");
+    std::string src_dir       = std::string(TS_ABS_TOP_SRCDIR) + 
"/iocore/cache/test";
+    Layout::get()->sysconfdir = src_dir;
+    Layout::get()->prefix     = src_dir;
     ::remove("./test/var/trafficserver/cache.db");
   }
 };

Reply via email to