summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-02-06 22:02:38 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-08 10:59:06 +0000
commit3ab7f0af56d0a12fa890faec4f24506669eb7e39 (patch)
tree79d028d559ae4d3be09e16118b02b0ac1610c697 /meta/classes-recipe
parent2d4d362de10479004990e89ae9e72bd48a752dfb (diff)
downloadpoky-3ab7f0af56d0a12fa890faec4f24506669eb7e39.tar.gz
ptest.bbclass: Handle the case when Makefile does not exist in do_install_ptest_base
Some recipes e.g. expant generate ninja files and no Makefile may exist, therefore grep -q would fail on a non-existent file, we just need the return code to decide if intall-ptest target should be run or not. Fixes errors like | grep: Makefile: No such file or directory (From OE-Core rev: 01f3966d6bf2442a28b460b67bfc02241cd9ddc2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r--meta/classes-recipe/ptest.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes-recipe/ptest.bbclass b/meta/classes-recipe/ptest.bbclass
index a1c3c3f1a6..348d729aef 100644
--- a/meta/classes-recipe/ptest.bbclass
+++ b/meta/classes-recipe/ptest.bbclass
@@ -56,9 +56,9 @@ do_install_ptest_base() {
56 if [ -f ${WORKDIR}/run-ptest ]; then 56 if [ -f ${WORKDIR}/run-ptest ]; then
57 install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest 57 install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
58 fi 58 fi
59 if grep -q install-ptest: Makefile; then 59
60 oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest 60 grep -q install-ptest: Makefile 2>/dev/null && oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
61 fi 61
62 do_install_ptest 62 do_install_ptest
63 chown -R root:root ${D}${PTEST_PATH} 63 chown -R root:root ${D}${PTEST_PATH}
64 64