]> code.ossystems Code Review - openembedded-core.git/commit
kbd: make libkbdfile-test08 ptest work for multilib
authorMingde (Matthew) Zeng <matthew.zeng@windriver.com>
Wed, 22 Jan 2020 20:20:03 +0000 (15:20 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jan 2020 16:38:54 +0000 (16:38 +0000)
commitbdcda2c4ff3c96f686b8bd30cd17361ff3722a0f
treee4faef7eb4f5b190c01e616c0d3f22f2eb36451c
parent6768d0d7988294769a41c7ba40f29874366da00f
kbd: make libkbdfile-test08 ptest work for multilib

This patch fixes kbd ptest libkbdfile-test08 failure in 64-bit images.

```sh
root@intel-x86-64:/usr/lib64/kbd/ptest# ./run-ptest
make: Entering directory '/usr/lib64/kbd/ptest/tests'
make[1]: Entering directory '/usr/lib64/kbd/ptest/tests'
PASS: libkbdfile-test01
PASS: libkbdfile-test02
PASS: libkbdfile-test03
PASS: libkbdfile-test04
PASS: libkbdfile-test05
PASS: libkbdfile-test06
PASS: libkbdfile-test07
FAIL: libkbdfile-test08
PASS: libkbdfile-test09
...
```

`DATADIR` and `ABS_DATADIR` are compile flags defined in
./kbd/tests/Makefile.am. `DATADIR` is the relative directory of
kbd, i.e `./kbd/ptest/tests` whereas `ABS_DATADIR` is the full
directory path, i.e `/usr/lib/kbd/ptest/tests`. The latter has a
problem when building ptests for a 64-bit image, because the tests
folder is located at `/usr/lib64/kbd/ptest/tests` instead.

Therefore `ABS_DATADIR` is changed to `DATADIR`, also consistent with
what *every other* kbd test is doing.

The test searches DATADIR recursively for a file named `test0.map`,
but it finds the wrong file at
    `/findfile/test_0/keymaps/test0.map`,
while it actually needs
    `/findfile/test_0/keymaps/i386/qwerty/test0.map`.

Thus appending `/i386` to `dirpath` so that `libkbdfile-test08.c`
    finds the right test file.

Signed-off-by: Matthew Zeng<Matthew.Zeng@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch [new file with mode: 0644]
meta/recipes-core/kbd/kbd_2.2.0.bb