projects
/
platform
/
upstream
/
libxkbcommon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16c84cd
)
test: allow for absolute paths to be resolved
author
Peter Hutterer
<peter.hutterer@who-t.net>
Mon, 20 Aug 2018 06:46:19 +0000
(16:46 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Tue, 21 Aug 2018 01:31:10 +0000
(11:31 +1000)
This makes it possible to check a keymap sitting elsewhere than in the test
directory.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/common.c
patch
|
blob
|
history
diff --git
a/test/common.c
b/test/common.c
index
1ee34e3
..
c909707
100644
(file)
--- a/
test/common.c
+++ b/
test/common.c
@@
-161,6
+161,9
@@
test_get_path(const char *path_rel)
size_t path_len;
const char *srcdir = getenv("top_srcdir");
+ if (path_rel[0] == '/')
+ return strdup(path_rel);
+
path_len = strlen(srcdir ? srcdir : ".") +
strlen(path_rel ? path_rel : "") + 12;
path = malloc(path_len);