diff options
Diffstat (limited to 'meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch')
-rw-r--r-- | meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch b/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch new file mode 100644 index 0000000000..27d6f42aae --- /dev/null +++ b/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | kbd is out of source built, then the value of $(srcdir) is relative path of | ||
4 | ${S}/tests to ${B}/tests. Macro DATADIR is defined with $(srcdir) and replaced | ||
5 | in .c files by compiler, and string @DATADIR@ is replaced with $(srdir) by rule | ||
6 | "%: %.in" in Makefile. | ||
7 | |||
8 | But kbd-ptest puts test cases and resource files in same directory, then some | ||
9 | ptest cases fail to find resources. | ||
10 | |||
11 | Replace DATADIR and @DATADIR@ with current directory(dot) to make test cases | ||
12 | run as expected. | ||
13 | |||
14 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
15 | |||
16 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
17 | index 1976333..b36aef3 100644 | ||
18 | --- a/tests/Makefile.am | ||
19 | +++ b/tests/Makefile.am | ||
20 | @@ -1,7 +1,7 @@ | ||
21 | AM_CPPFLAGS = \ | ||
22 | -I$(srcdir)/../src/libkeymap \ | ||
23 | -I$(builddir)/../src/libkeymap \ | ||
24 | - -DDATADIR=\"$(srcdir)\" -DBUILDDIR=\"$(builddir)\" | ||
25 | + -DDATADIR=\".\" -DBUILDDIR=\"$(builddir)\" | ||
26 | |||
27 | AM_CFLAGS = $(CHECK_CFLAGS) | ||
28 | LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS) | ||
29 | diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in | ||
30 | index ddd5ed8..772fb51 100755 | ||
31 | --- a/tests/alt-is-meta.in | ||
32 | +++ b/tests/alt-is-meta.in | ||
33 | @@ -7,8 +7,8 @@ cd "$cwd" | ||
34 | rc=0 | ||
35 | temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")" | ||
36 | |||
37 | -./libkeymap-showmaps "@DATADIR@"/alt-is-meta.map > "$temp" || rc=$? | ||
38 | -cmp -s "@DATADIR@//alt-is-meta.output" "$temp" || rc=$? | ||
39 | +./libkeymap-showmaps ./alt-is-meta.map > "$temp" || rc=$? | ||
40 | +cmp -s "./alt-is-meta.output" "$temp" || rc=$? | ||
41 | |||
42 | if [ "$rc" != 0 ]; then | ||
43 | printf 'failed\n' | ||
44 | diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in | ||
45 | index 7c856e5..14d92c1 100755 | ||
46 | --- a/tests/dumpkeys-fulltable.in | ||
47 | +++ b/tests/dumpkeys-fulltable.in | ||
48 | @@ -5,7 +5,7 @@ cwd="$(readlink -ev "${0%/*}")" | ||
49 | cd "$cwd" | ||
50 | |||
51 | BUILDDIR="@BUILDDIR@" | ||
52 | -DATADIR="@DATADIR@" | ||
53 | +DATADIR="." | ||
54 | |||
55 | check_keymap() { | ||
56 | local kmap temp rc | ||