diff mbox series

[meta-oe,master,scarthgap] cjson: fix buildpath warnings

Message ID 20240625081259.1785605-1-peter.marko@siemens.com
State New
Headers show
Series [meta-oe,master,scarthgap] cjson: fix buildpath warnings | expand

Commit Message

Peter Marko June 25, 2024, 8:12 a.m. UTC
From: Peter Marko <peter.marko@siemens.com>

Following warning occurs when building with ptests enabled:
WARNING: cjson-1.7.17-r0 do_package_qa: QA Issue: File /usr/lib/cjson/ptest/CTestTestfile.cmake in package cjson-ptest contains reference to TMPDIR
File /usr/lib/cjson/ptest/tests/CTestTestfile.cmake in package cjson-ptest contains reference to TMPDIR
File /usr/lib/cjson/ptest/fuzzing/CTestTestfile.cmake in package cjson-ptest contains reference to TMPDIR [buildpaths]

The cmake files also contain full paths to original CMakeLists.txt file
in _BACKTRACE_TRIPLES property;
These are not needed for successful ptests as we don't install the
CMakeLists.txt files anyway.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
 meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Khem Raj June 25, 2024, 3:36 p.m. UTC | #1
It does not appy on master btw. I have to manually transplant it.
Please look into the one in master-next

On Tue, Jun 25, 2024 at 1:14 AM Peter Marko via lists.openembedded.org
<peter.marko=siemens.com@lists.openembedded.org> wrote:
>
> From: Peter Marko <peter.marko@siemens.com>
>
> Following warning occurs when building with ptests enabled:
> WARNING: cjson-1.7.17-r0 do_package_qa: QA Issue: File /usr/lib/cjson/ptest/CTestTestfile.cmake in package cjson-ptest contains reference to TMPDIR
> File /usr/lib/cjson/ptest/tests/CTestTestfile.cmake in package cjson-ptest contains reference to TMPDIR
> File /usr/lib/cjson/ptest/fuzzing/CTestTestfile.cmake in package cjson-ptest contains reference to TMPDIR [buildpaths]
>
> The cmake files also contain full paths to original CMakeLists.txt file
> in _BACKTRACE_TRIPLES property;
> These are not needed for successful ptests as we don't install the
> CMakeLists.txt files anyway.
>
> Signed-off-by: Peter Marko <peter.marko@siemens.com>
> ---
>  meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb b/meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb
> index 6c8934b342..ea74f1d680 100644
> --- a/meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb
> +++ b/meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb
> @@ -24,6 +24,11 @@ do_install_ptest() {
>          sed s#${B}#${PTEST_PATH}# ${B}/CTestTestfile.cmake > ${D}${PTEST_PATH}/CTestTestfile.cmake
>          sed s#${B}#${PTEST_PATH}# ${B}/tests/CTestTestfile.cmake > ${D}${PTEST_PATH}/tests/CTestTestfile.cmake
>          sed s#${B}#${PTEST_PATH}# ${B}/fuzzing/CTestTestfile.cmake > ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake
> +        # The cmake files also contain full paths to original CMakeLists.txt file in _BACKTRACE_TRIPLES property;
> +        # these are not needed for successful ptests as we don't install the CMakeLists.txt files anyway.
> +        sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/CTestTestfile.cmake
> +        sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/tests/CTestTestfile.cmake
> +        sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake
>          # install test artifacts
>          install ${B}/cJSON_test ${D}${PTEST_PATH}
>          install ${B}/tests/cjson_add ${B}/tests/*_tests ${B}/tests/parse_*  ${B}/tests/print_*  ${B}/tests/readme_examples ${D}${PTEST_PATH}/tests/
> --
> 2.30.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#111013): https://lists.openembedded.org/g/openembedded-devel/message/111013
> Mute This Topic: https://lists.openembedded.org/mt/106866076/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Peter Marko June 25, 2024, 3:53 p.m. UTC | #2
-----Original Message-----
From: Khem Raj <raj.khem@gmail.com> 
Sent: Tuesday, June 25, 2024 17:37
To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [oe] [meta-oe][master][scarthgap][PATCH] cjson: fix buildpath warnings

> It does not appy on master btw. I have to manually transplant it.
> Please look into the one in master-next

I have sent a new one for master.
But the old one should be still valid for scarthgap, correct?

Peter

> 
> On Tue, Jun 25, 2024 at 1:14 AM Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote:
...
Khem Raj June 25, 2024, 3:55 p.m. UTC | #3
On Tue, Jun 25, 2024 at 8:53 AM Marko, Peter <Peter.Marko@siemens.com> wrote:
>
> -----Original Message-----
> From: Khem Raj <raj.khem@gmail.com>
> Sent: Tuesday, June 25, 2024 17:37
> To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>
> Cc: openembedded-devel@lists.openembedded.org
> Subject: Re: [oe] [meta-oe][master][scarthgap][PATCH] cjson: fix buildpath warnings
>
> > It does not appy on master btw. I have to manually transplant it.
> > Please look into the one in master-next
>
> I have sent a new one for master.
> But the old one should be still valid for scarthgap, correct?

if you prepared it for scarthgap then yes

>
> Peter
>
> >
> > On Tue, Jun 25, 2024 at 1:14 AM Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote:
> ...
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb b/meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb
index 6c8934b342..ea74f1d680 100644
--- a/meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb
+++ b/meta-oe/recipes-devtools/cjson/cjson_1.7.17.bb
@@ -24,6 +24,11 @@  do_install_ptest() {
         sed s#${B}#${PTEST_PATH}# ${B}/CTestTestfile.cmake > ${D}${PTEST_PATH}/CTestTestfile.cmake
         sed s#${B}#${PTEST_PATH}# ${B}/tests/CTestTestfile.cmake > ${D}${PTEST_PATH}/tests/CTestTestfile.cmake
         sed s#${B}#${PTEST_PATH}# ${B}/fuzzing/CTestTestfile.cmake > ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake
+        # The cmake files also contain full paths to original CMakeLists.txt file in _BACKTRACE_TRIPLES property;
+        # these are not needed for successful ptests as we don't install the CMakeLists.txt files anyway.
+        sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/CTestTestfile.cmake
+        sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/tests/CTestTestfile.cmake
+        sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake
         # install test artifacts
         install ${B}/cJSON_test ${D}${PTEST_PATH}
         install ${B}/tests/cjson_add ${B}/tests/*_tests ${B}/tests/parse_*  ${B}/tests/print_*  ${B}/tests/readme_examples ${D}${PTEST_PATH}/tests/