Point the logDir to abs_builddir instead.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
tests/libxlmock.c | 11 -----------
tests/testutilsxen.c | 3 +++
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/tests/libxlmock.c b/tests/libxlmock.c
index b995b34cc5..60e6b78129 100644
--- a/tests/libxlmock.c
+++ b/tests/libxlmock.c
@@ -94,17 +94,6 @@ VIR_MOCK_STUB_RET_ARGS(bind,
const struct sockaddr *, addr,
socklen_t, addrlen)
-VIR_MOCK_IMPL_RET_ARGS(virFileMakePath, int,
- const char *, path)
-{
- /* replace log path with a writable directory */
- if (strstr(path, "/log/")) {
- g_snprintf((char*)path, strlen(path), ".");
- return 0;
- }
- return real_virFileMakePath(path);
-}
-
VIR_MOCK_IMPL_RET_ARGS(__xstat, int,
int, ver,
const char *, path,
diff --git a/tests/testutilsxen.c b/tests/testutilsxen.c
index b1260dcebf..d50c3003da 100644
--- a/tests/testutilsxen.c
+++ b/tests/testutilsxen.c
@@ -97,6 +97,9 @@ libxlDriverPrivatePtr testXLInitDriver(void)
if (!(driver->config = libxlDriverConfigNew()))
return NULL;
+ g_free(driver->config->logDir);
+ driver->config->logDir = g_strdup(abs_builddir);
+
if (libxlDriverConfigInit(driver->config) < 0)
return NULL;
--
2.24.1