Ptest data are installed to PTEST_PATH ?= "${libdir}/${BPN}/ptest".
When libdir isn't "/usr/lib", it will cause "No ptests found" error
when running "ptest-runner" command. Here pass libdir to
DEFAULT_DIRECTORY when compiling to avoid that error.Signed-off-by: Li Zhou <[email protected]> --- ...r-remove-DEFAULT_DIRECTORY-s-hard-coded-i.patch | 36 ++++++++++++++++++++++ .../ptest-runner/ptest-runner_2.3.bb | 5 +-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-support/ptest-runner/ptest-runner/0001-ptest-runner-remove-DEFAULT_DIRECTORY-s-hard-coded-i.patch diff --git a/meta/recipes-support/ptest-runner/ptest-runner/0001-ptest-runner-remove-DEFAULT_DIRECTORY-s-hard-coded-i.patch b/meta/recipes-support/ptest-runner/ptest-runner/0001-ptest-runner-remove-DEFAULT_DIRECTORY-s-hard-coded-i.patch new file mode 100644 index 0000000..56e1f96 --- /dev/null +++ b/meta/recipes-support/ptest-runner/ptest-runner/0001-ptest-runner-remove-DEFAULT_DIRECTORY-s-hard-coded-i.patch @@ -0,0 +1,36 @@ +From 6a663ac38c71108890e42f451f3a7b22afee0a40 Mon Sep 17 00:00:00 2001 +From: Li Zhou <[email protected]> +Date: Wed, 16 Jan 2019 15:00:17 +0800 +Subject: [PATCH] ptest-runner: remove DEFAULT_DIRECTORY's hard coded + initialization + +Ptest data are installed to PTEST_PATH ?= "${libdir}/${BPN}/ptest". +Here make DEFAULT_DIRECTORY be able to be defined outside of c code, +in case libdir isn't "/usr/lib", which will cause "No ptests found" +error when running "ptest-runner" command. We will pass libdir to +DEFAULT_DIRECTORY when compiling to avoid that error. + +Upstream-Status: Pending + +Signed-off-by: Li Zhou <[email protected]> +--- + main.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/main.c b/main.c +index 83600b7..e963efe 100644 +--- a/main.c ++++ b/main.c +@@ -37,7 +37,9 @@ + + #include "utils.h" + ++#ifndef DEFAULT_DIRECTORY + #define DEFAULT_DIRECTORY "/usr/lib" ++#endif + #define DEFAULT_TIMEOUT 300 + + static inline void +-- +1.9.1 + diff --git a/meta/recipes-support/ptest-runner/ptest-runner_2.3.bb b/meta/recipes-support/ptest-runner/ptest-runner_2.3.bb index 26add9b..9866d1a 100644 --- a/meta/recipes-support/ptest-runner/ptest-runner_2.3.bb +++ b/meta/recipes-support/ptest-runner/ptest-runner_2.3.bb @@ -10,12 +10,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" SRCREV = "80712583732b4a809532f644fb09e7d2e812d7ba" PV = "2.3+git${SRCPV}" -SRC_URI = "git://git.yoctoproject.org/ptest-runner2" +SRC_URI = "git://git.yoctoproject.org/ptest-runner2 \ + file://0001-ptest-runner-remove-DEFAULT_DIRECTORY-s-hard-coded-i.patch" S = "${WORKDIR}/git" FILES_${PN} = "${bindir}/ptest-runner" -EXTRA_OEMAKE = "-e MAKEFLAGS=" +EXTRA_OEMAKE = "-e MAKEFLAGS= CFLAGS="${CFLAGS} -DDEFAULT_DIRECTORY=\\\"${libdir}\\\""" do_compile () { oe_runmake -- 1.9.1 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
