[oe-commits] [openembedded-core] 12/43: kbd: fix failing ptests

git at git.openembedded.org git at git.openembedded.org
Fri Jan 10 21:19:07 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit ae39de0119ac1d21512fe64f7f7969790e396819
Author: Alexander Kanavin <alex.kanavin at gmail.com>
AuthorDate: Wed Jan 8 14:27:56 2020 +0100

    kbd: fix failing ptests
    
    Some assumptions about where data files are needs to be adjusted.
    
    Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../kbd/kbd/set-proper-path-of-resources.patch     | 58 ++++++++++++++++------
 meta/recipes-core/kbd/kbd_2.2.0.bb                 |  4 +-
 2 files changed, 47 insertions(+), 15 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
index 5872cef..4b1e5b8 100644
--- a/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
+++ b/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
@@ -1,4 +1,4 @@
-From 7f953dd689155bc1224a3369205c310bb5b760a7 Mon Sep 17 00:00:00 2001
+From cb3af8fb072f8999dbb5160bdc95a102b02fd37a Mon Sep 17 00:00:00 2001
 From: Kai Kang <kai.kang at windriver.com>
 Date: Fri, 30 Sep 2016 16:49:55 +0800
 Subject: [PATCH] kbd: create ptest sub-package
@@ -19,38 +19,53 @@ run as expected.
 Signed-off-by: Kai Kang <kai.kang at windriver.com>
 
 ---
- tests/Makefile.am           | 2 +-
- tests/alt-is-meta.in        | 6 ++----
+ tests/Makefile.am           | 4 ++--
+ tests/alt-is-meta.in        | 2 +-
+ tests/dumpkeys-bkeymap.in   | 4 ++--
  tests/dumpkeys-fulltable.in | 2 +-
- 3 files changed, 4 insertions(+), 6 deletions(-)
+ tests/dumpkeys-mktable.in   | 4 ++--
+ 5 files changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/tests/Makefile.am b/tests/Makefile.am
-index f32b9aa..973cd26 100644
+index 8d0ab69..5147c28 100644
 --- a/tests/Makefile.am
 +++ b/tests/Makefile.am
-@@ -7,7 +7,7 @@ AM_CPPFLAGS = \
+@@ -7,8 +7,8 @@ AM_CPPFLAGS = \
  	-I$(builddir)/../src/libkeymap \
  	-I$(srcdir)/../src/libkbdfile \
  	-I$(builddir)/../src/libkbdfile \
 -	-DDATADIR=\"$(srcdir)\" \
+-	-DABS_DATADIR=\"$(realpath $(srcdir))\" \
 +	-DDATADIR=\".\" \
- 	-DABS_DATADIR=\"$(realpath $(srcdir))\" \
++	-DABS_DATADIR=\"/usr/lib/kbd/ptest/tests\" \
  	-DBUILDDIR=\"$(builddir)\"
  
+ AM_CFLAGS = $(CHECK_CFLAGS) $(CODE_COVERAGE_CFLAGS)
 diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in
-index 3a1441f..772fb51 100755
+index 3a1441f..d829f2e 100755
 --- a/tests/alt-is-meta.in
 +++ b/tests/alt-is-meta.in
-@@ -7,10 +7,8 @@ cd "$cwd"
+@@ -7,7 +7,7 @@ cd "$cwd"
  rc=0
  temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
  
 -datadir="@DATADIR@/data/alt-is-meta"
--
--./libkeymap-showmaps "$datadir"/alt-is-meta.map > "$temp" || rc=$?
--cmp -s "$datadir/alt-is-meta.output" "$temp" || rc=$?
-+./libkeymap-showmaps ./alt-is-meta.map > "$temp" || rc=$?
-+cmp -s "./alt-is-meta.output" "$temp" || rc=$?
++datadir="./data/alt-is-meta"
+ 
+ ./libkeymap-showmaps "$datadir"/alt-is-meta.map > "$temp" || rc=$?
+ cmp -s "$datadir/alt-is-meta.output" "$temp" || rc=$?
+diff --git a/tests/dumpkeys-bkeymap.in b/tests/dumpkeys-bkeymap.in
+index 03d4ca2..d1d0e26 100755
+--- a/tests/dumpkeys-bkeymap.in
++++ b/tests/dumpkeys-bkeymap.in
+@@ -9,8 +9,8 @@ temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
+ 
+ datadir="@DATADIR@"
+ 
+-./libkeymap-bkeymap "$datadir/"../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
+-cmp -s "$datadir/data/dumpkeys-bkeymap/bkeymap.bin" "$temp" || rc=$?
++./libkeymap-bkeymap ../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
++cmp -s "./data/dumpkeys-bkeymap/bkeymap.bin" "$temp" || rc=$?
  
  if [ "$rc" != 0 ]; then
  	printf 'failed\n'
@@ -67,3 +82,18 @@ index a3a5ece..67a73ef 100755
  
  check_keymap() {
  	local kmap temp rc
+diff --git a/tests/dumpkeys-mktable.in b/tests/dumpkeys-mktable.in
+index 0f17c40..7e5161d 100755
+--- a/tests/dumpkeys-mktable.in
++++ b/tests/dumpkeys-mktable.in
+@@ -7,8 +7,8 @@ cd "$cwd"
+ rc=0
+ temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
+ 
+-./libkeymap-mktable "@DATADIR@/"../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
+-cmp -s "@DATADIR@/data/dumpkeys-mktable/defkeymap.c" "$temp" || rc=$?
++./libkeymap-mktable ../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
++cmp -s "./data/dumpkeys-mktable/defkeymap.c" "$temp" || rc=$?
+ 
+ if [ "$rc" != 0 ]; then
+ 	printf 'failed\n'
diff --git a/meta/recipes-core/kbd/kbd_2.2.0.bb b/meta/recipes-core/kbd/kbd_2.2.0.bb
index 88041bc..df9b0bb 100644
--- a/meta/recipes-core/kbd/kbd_2.2.0.bb
+++ b/meta/recipes-core/kbd/kbd_2.2.0.bb
@@ -45,7 +45,9 @@ do_install_ptest() {
 	-e '/^lib.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile
 
     find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \;
-    find ${S}/tests \( -name \*.map -o -name \*.bin -o -name \*.output \) -exec install {} ${D}${PTEST_PATH}/tests \;
+    cp -rf ${S}/tests/data ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/findfile ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/data ${D}${PTEST_PATH}
 
     install -D -m 755 ${S}/config/test-driver ${D}${PTEST_PATH}/config/test-driver
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list