1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From 16bb294384bb4ae4ba83af51fbb64fdd14d02838 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Thu, 21 Nov 2019 18:37:48 +0000
Subject: [PATCH] tests/repo-finder: Run realpath() on /tmp
This fixes running this test case inside
https://github.com/cgwalters/coretoolbox
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Upstream-Status: Backport
---
tests/test-repo-finder-mount.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/test-repo-finder-mount.c b/tests/test-repo-finder-mount.c
index 847f4becd1c6..af2f5e085f68 100644
--- a/tests/test-repo-finder-mount.c
+++ b/tests/test-repo-finder-mount.c
@@ -62,7 +62,9 @@ setup (Fixture *fixture,
g_clear_error (&error);
g_assert_no_error (error);
- fixture->working_dir = g_file_new_for_path (fixture->tmpdir.path);
+ /* Realpath since at least coretoolbox makes /tmp a symlink to /host/tmp */
+ g_autofree char *tmpdir_real_path = realpath (fixture->tmpdir.path, NULL);
+ fixture->working_dir = g_file_new_for_path (tmpdir_real_path);
fixture->parent_repo = ot_test_setup_repo (NULL, &error);
g_assert_no_error (error);
@@ -443,9 +445,8 @@ test_repo_finder_mount_mixed_mounts (Fixture *fixture,
}
else
{
- g_test_message ("Unknown result ‘%s’ with keyring ‘%s’.",
- result->remote->name, result->remote->keyring);
- g_assert_not_reached ();
+ g_error ("Unknown result ‘%s’ with keyring ‘%s’",
+ result->remote->name, result->remote->keyring);
}
}
--
2.17.1
|