openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [meta-oe][PATCH V1] xz: add ptest support
@ 2023-06-01  8:34 duep.fnst
  2023-06-01 12:27 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 9+ messages in thread
From: duep.fnst @ 2023-06-01  8:34 UTC (permalink / raw)
  To: openembedded-core; +Cc: fnstml-fujitsuten, duep

From: duep <duep.fnst@fujitsu.com>

Add a ptest for xz
 - It is taking around 1s to execute with kvm, so added it to PTESTS_FAST
 - It contains 11 test files:
    test_bcj_exact_size test_block_header test_check test_filter_flags
    test_hardware test_index test_index_hash test_lzip_decoder
    test_memlimit test_stream_flags test_vli
 - Below is part of the run log:
    START: ptest-runner
    2023-06-01T01:57
    BEGIN:
    /usr/lib/xz/ptest
    === test_bcj_exact_size.c ===
    PASS: test_exact_size
    PASS: test_empty_block
    ---
    # TOTAL: 2
    # PASS:  2
    # SKIP:  0
    # FAIL:  0
    # ERROR: 0
    === END ===
    ...
    === test_vli.c ===
    PASS: test_lzma_vli_size
    PASS: test_lzma_vli_encode
    PASS: test_lzma_vli_decode
    ---
    # TOTAL: 3
    # PASS:  3
    # SKIP:  0
    # FAIL:  0
    # ERROR: 0
    === END ===
    DURATION: 0
    END: /usr/lib/xz/ptest
    2023-06-01T01:57
    STOP: ptest-runner
    TOTAL: 1 FAIL: 0
 - The tests under xz requires /bin/bash

Signed-off-by: duep <duep.fnst@fujitsu.com>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../xz/xz/0001-build-PROGRAMS.patch           | 20 ++++++++++++++++
 meta/recipes-extended/xz/xz/run-ptest         |  5 ++++
 meta/recipes-extended/xz/xz_5.4.1.bb          | 24 +++++++++++++++++--
 4 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch
 create mode 100644 meta/recipes-extended/xz/xz/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index d60ebb38fc..9aa68c75ea 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -70,6 +70,7 @@ PTESTS_FAST = "\
     sed \
     slang \
     wayland \
+    xz \
     zlib \
 "
 PTESTS_FAST:append:libc-glibc = " glibc-tests"
diff --git a/meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch b/meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch
new file mode 100644
index 0000000000..f97a75030a
--- /dev/null
+++ b/meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch
@@ -0,0 +1,20 @@
+From: Du Erpei <duep.fnst@fujitsu.com>
+Subject: [PATCH] tests/Makefile.am: add target of 'build-PROGRAMS'
+
+Add target 'build-PROGRAMS' to only compile the test set under
+'/tests' and not run locally.
+
+Upstream-Status: Pending
+
+--- a/tests/Makefile.am	2023-01-12 00:51:42.000000000 +0800
++++ b/tests/Makefile.am	2023-05-30 14:49:34.507313644 +0800
+@@ -74,6 +74,9 @@ if COND_SCRIPTS
+ TESTS += test_scripts.sh
+ endif
+ 
++build-PROGRAMS: all-am
++	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
++
+ clean-local:
+ 	-rm -f compress_generated_* \
+ 		xzgrep_test_output xzgrep_test_1.xz xzgrep_test_2.xz
diff --git a/meta/recipes-extended/xz/xz/run-ptest b/meta/recipes-extended/xz/xz/run-ptest
new file mode 100644
index 0000000000..ebde965d5c
--- /dev/null
+++ b/meta/recipes-extended/xz/xz/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+cd ./tests
+for i in `ls test*`; do
+	./$i
+done
diff --git a/meta/recipes-extended/xz/xz_5.4.1.bb b/meta/recipes-extended/xz/xz_5.4.1.bb
index 71bf4b540a..14808b1714 100644
--- a/meta/recipes-extended/xz/xz_5.4.1.bb
+++ b/meta/recipes-extended/xz/xz_5.4.1.bb
@@ -24,13 +24,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a \
                     file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \
                     "
 
-SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz"
+SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz \
+           file://0001-build-PROGRAMS.patch \
+           file://run-ptest"
 SRC_URI[sha256sum] = "e4b0f81582efa155ccf27bb88275254a429d44968e488fc94b806f2a61cd3e22"
 UPSTREAM_CHECK_REGEX = "xz-(?P<pver>\d+(\.\d+)+)\.tar"
 
 CACHED_CONFIGUREVARS += "gl_cv_posix_shell=/bin/sh"
 
-inherit autotools gettext
+inherit autotools gettext ptest
 
 PACKAGES =+ "liblzma"
 
@@ -42,3 +44,21 @@ ALTERNATIVE:${PN} = "xz xzcat unxz \
                      lzma lzcat unlzma"
 
 BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest(){
+	oe_runmake -C ${B}/tests/ build-PROGRAMS
+}
+
+do_install_ptest(){
+	install -d ${D}${PTEST_PATH}/tests/
+	find ${B}/tests/ -type f -not -name "*.o" -not -name "Makefile" \
+	  -exec install --mode=755 {} ${D}${PTEST_PATH}/tests/ \;
+
+	install -d ${D}${PTEST_PATH}/tests/.libs/
+	install --mode=755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests/.libs/
+
+	install -d ${D}${PTEST_PATH}/tests/files/
+	install --mode=755 ${S}/tests/files/* ${D}${PTEST_PATH}/tests/files/
+}
+
+RDEPENDS:${PN}-ptest += "bash"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [OE-core] [meta-oe][PATCH V1] xz: add ptest support
  2023-06-01  8:34 [meta-oe][PATCH V1] xz: add ptest support duep.fnst
@ 2023-06-01 12:27 ` Alexander Kanavin
  2023-06-02  6:34   ` duep.fnst
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Kanavin @ 2023-06-01 12:27 UTC (permalink / raw)
  To: duep.fnst; +Cc: openembedded-core, fnstml-fujitsuten

This is exactly the same as the first submission and does not resolve
my request to submit the patch to xz upstream.

Alex

On Thu, 1 Jun 2023 at 14:23, duep.fnst@fujitsu.com
<duep.fnst@fujitsu.com> wrote:
>
> From: duep <duep.fnst@fujitsu.com>
>
> Add a ptest for xz
>  - It is taking around 1s to execute with kvm, so added it to PTESTS_FAST
>  - It contains 11 test files:
>     test_bcj_exact_size test_block_header test_check test_filter_flags
>     test_hardware test_index test_index_hash test_lzip_decoder
>     test_memlimit test_stream_flags test_vli
>  - Below is part of the run log:
>     START: ptest-runner
>     2023-06-01T01:57
>     BEGIN:
>     /usr/lib/xz/ptest
>     === test_bcj_exact_size.c ===
>     PASS: test_exact_size
>     PASS: test_empty_block
>     ---
>     # TOTAL: 2
>     # PASS:  2
>     # SKIP:  0
>     # FAIL:  0
>     # ERROR: 0
>     === END ===
>     ...
>     === test_vli.c ===
>     PASS: test_lzma_vli_size
>     PASS: test_lzma_vli_encode
>     PASS: test_lzma_vli_decode
>     ---
>     # TOTAL: 3
>     # PASS:  3
>     # SKIP:  0
>     # FAIL:  0
>     # ERROR: 0
>     === END ===
>     DURATION: 0
>     END: /usr/lib/xz/ptest
>     2023-06-01T01:57
>     STOP: ptest-runner
>     TOTAL: 1 FAIL: 0
>  - The tests under xz requires /bin/bash
>
> Signed-off-by: duep <duep.fnst@fujitsu.com>
> ---
>  .../distro/include/ptest-packagelists.inc     |  1 +
>  .../xz/xz/0001-build-PROGRAMS.patch           | 20 ++++++++++++++++
>  meta/recipes-extended/xz/xz/run-ptest         |  5 ++++
>  meta/recipes-extended/xz/xz_5.4.1.bb          | 24 +++++++++++++++++--
>  4 files changed, 48 insertions(+), 2 deletions(-)
>  create mode 100644 meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch
>  create mode 100644 meta/recipes-extended/xz/xz/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index d60ebb38fc..9aa68c75ea 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -70,6 +70,7 @@ PTESTS_FAST = "\
>      sed \
>      slang \
>      wayland \
> +    xz \
>      zlib \
>  "
>  PTESTS_FAST:append:libc-glibc = " glibc-tests"
> diff --git a/meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch b/meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch
> new file mode 100644
> index 0000000000..f97a75030a
> --- /dev/null
> +++ b/meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch
> @@ -0,0 +1,20 @@
> +From: Du Erpei <duep.fnst@fujitsu.com>
> +Subject: [PATCH] tests/Makefile.am: add target of 'build-PROGRAMS'
> +
> +Add target 'build-PROGRAMS' to only compile the test set under
> +'/tests' and not run locally.
> +
> +Upstream-Status: Pending
> +
> +--- a/tests/Makefile.am        2023-01-12 00:51:42.000000000 +0800
> ++++ b/tests/Makefile.am        2023-05-30 14:49:34.507313644 +0800
> +@@ -74,6 +74,9 @@ if COND_SCRIPTS
> + TESTS += test_scripts.sh
> + endif
> +
> ++build-PROGRAMS: all-am
> ++      $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
> ++
> + clean-local:
> +       -rm -f compress_generated_* \
> +               xzgrep_test_output xzgrep_test_1.xz xzgrep_test_2.xz
> diff --git a/meta/recipes-extended/xz/xz/run-ptest b/meta/recipes-extended/xz/xz/run-ptest
> new file mode 100644
> index 0000000000..ebde965d5c
> --- /dev/null
> +++ b/meta/recipes-extended/xz/xz/run-ptest
> @@ -0,0 +1,5 @@
> +#!/bin/sh
> +cd ./tests
> +for i in `ls test*`; do
> +       ./$i
> +done
> diff --git a/meta/recipes-extended/xz/xz_5.4.1.bb b/meta/recipes-extended/xz/xz_5.4.1.bb
> index 71bf4b540a..14808b1714 100644
> --- a/meta/recipes-extended/xz/xz_5.4.1.bb
> +++ b/meta/recipes-extended/xz/xz_5.4.1.bb
> @@ -24,13 +24,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a \
>                      file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \
>                      "
>
> -SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz"
> +SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz \
> +           file://0001-build-PROGRAMS.patch \
> +           file://run-ptest"
>  SRC_URI[sha256sum] = "e4b0f81582efa155ccf27bb88275254a429d44968e488fc94b806f2a61cd3e22"
>  UPSTREAM_CHECK_REGEX = "xz-(?P<pver>\d+(\.\d+)+)\.tar"
>
>  CACHED_CONFIGUREVARS += "gl_cv_posix_shell=/bin/sh"
>
> -inherit autotools gettext
> +inherit autotools gettext ptest
>
>  PACKAGES =+ "liblzma"
>
> @@ -42,3 +44,21 @@ ALTERNATIVE:${PN} = "xz xzcat unxz \
>                       lzma lzcat unlzma"
>
>  BBCLASSEXTEND = "native nativesdk"
> +
> +do_compile_ptest(){
> +       oe_runmake -C ${B}/tests/ build-PROGRAMS
> +}
> +
> +do_install_ptest(){
> +       install -d ${D}${PTEST_PATH}/tests/
> +       find ${B}/tests/ -type f -not -name "*.o" -not -name "Makefile" \
> +         -exec install --mode=755 {} ${D}${PTEST_PATH}/tests/ \;
> +
> +       install -d ${D}${PTEST_PATH}/tests/.libs/
> +       install --mode=755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests/.libs/
> +
> +       install -d ${D}${PTEST_PATH}/tests/files/
> +       install --mode=755 ${S}/tests/files/* ${D}${PTEST_PATH}/tests/files/
> +}
> +
> +RDEPENDS:${PN}-ptest += "bash"
> --
> 2.25.1
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#182103): https://lists.openembedded.org/g/openembedded-core/message/182103
> Mute This Topic: https://lists.openembedded.org/mt/99259960/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-oe][PATCH V1] xz: add ptest support
  2023-06-01 12:27 ` [OE-core] " Alexander Kanavin
@ 2023-06-02  6:34   ` duep.fnst
  2023-06-02  6:36     ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 9+ messages in thread
From: duep.fnst @ 2023-06-02  6:34 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

Sorry, the second email was accidentally sent by mistake.
Now I have submitted the patch to xz upstream.
But in xz upstream, I submitted the patch via email and it doesn't has the link.
Could I submit the patch email as attachment here?

[-- Attachment #2: Type: text/html, Size: 254 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [meta-oe][PATCH V1] xz: add ptest support
  2023-06-02  6:34   ` duep.fnst
@ 2023-06-02  6:36     ` Alexander Kanavin
  2023-06-02  8:18       ` duep.fnst
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Kanavin @ 2023-06-02  6:36 UTC (permalink / raw)
  To: duep.fnst; +Cc: openembedded-core

On Fri, 2 Jun 2023 at 08:34, duep.fnst@fujitsu.com
<duep.fnst@fujitsu.com> wrote:
> Sorry, the second email was accidentally sent by mistake.
> Now I have submitted the patch to xz upstream.
> But in xz upstream, I submitted the patch via email and it doesn't has the link.
> Could I submit the patch email as attachment here?

But why by email, and to whom?

I think it's better to open a pull request here:
https://github.com/tukaani-project/xz
Then you have a link to include into oe-core submission.

Alex


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-oe][PATCH V1] xz: add ptest support
  2023-06-02  6:36     ` [OE-core] " Alexander Kanavin
@ 2023-06-02  8:18       ` duep.fnst
  2023-06-02  8:40         ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 9+ messages in thread
From: duep.fnst @ 2023-06-02  8:18 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

I read the 'README' in https://github.com/tukaani-project/xz
It is recommended to submit the patch via email to 'xz@tukaani.org'.
Later I will try submitting a Pull request in ' https://github.com/tukaani-project/xz '

duep

[-- Attachment #2: Type: text/html, Size: 593 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [meta-oe][PATCH V1] xz: add ptest support
  2023-06-02  8:18       ` duep.fnst
@ 2023-06-02  8:40         ` Alexander Kanavin
  2023-06-15  7:59           ` duep.fnst
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Kanavin @ 2023-06-02  8:40 UTC (permalink / raw)
  To: duep.fnst; +Cc: openembedded-core

Thanks for clarification, please do the pull request as well. Patches
over email mean that any discussion about them with upstream is
visible only to you, and we can't see who says what and what is the
outcome.

Alex

On Fri, 2 Jun 2023 at 10:18, duep.fnst@fujitsu.com
<duep.fnst@fujitsu.com> wrote:
>
> I read the 'README' in https://github.com/tukaani-project/xz
> It is recommended to submit the patch via email to 'xz@tukaani.org'.
> Later I will try submitting a Pull request in 'https://github.com/tukaani-project/xz'
>
> duep
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#182289): https://lists.openembedded.org/g/openembedded-core/message/182289
> Mute This Topic: https://lists.openembedded.org/mt/99259960/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-oe][PATCH V1] xz: add ptest support
  2023-06-02  8:40         ` [OE-core] " Alexander Kanavin
@ 2023-06-15  7:59           ` duep.fnst
  2023-06-15  8:31             ` duep.fnst
  0 siblings, 1 reply; 9+ messages in thread
From: duep.fnst @ 2023-06-15  7:59 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

I have modified the patch again, and the new patch does not need to modify the upstream xz.
The link of the new patch:
openembedded-core@lists.openembedded.org | [meta-oe][PATCH V2] xz: add ptest support ( https://lists.openembedded.org/g/openembedded-core/topic/meta_oe_patch_v2_xz_add/99334931 )

Du

[-- Attachment #2: Type: text/html, Size: 340 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-oe][PATCH V1] xz: add ptest support
  2023-06-15  7:59           ` duep.fnst
@ 2023-06-15  8:31             ` duep.fnst
  0 siblings, 0 replies; 9+ messages in thread
From: duep.fnst @ 2023-06-15  8:31 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

I have modified the patch again, and the new patch does not need to modify the upstream xz.
The link of the new patch:
[meta-oe][PATCH V3] xz: add ptest support (openembedded.org) ( https://lists.openembedded.org/g/openembedded-core/message/182481 )

Du

[-- Attachment #2: Type: text/html, Size: 286 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH V1] xz: add ptest support
@ 2023-06-01  8:52 duep.fnst
  0 siblings, 0 replies; 9+ messages in thread
From: duep.fnst @ 2023-06-01  8:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: fnstml-fujitsuten, duep

From: duep <duep.fnst@fujitsu.com>

Add a ptest for xz
 - It is taking around 1s to execute with kvm, so added it to PTESTS_FAST
 - It contains 11 test files:
    test_bcj_exact_size test_block_header test_check test_filter_flags
    test_hardware test_index test_index_hash test_lzip_decoder
    test_memlimit test_stream_flags test_vli
 - Below is part of the run log:
    START: ptest-runner
    2023-06-01T01:57
    BEGIN:
    /usr/lib/xz/ptest
    === test_bcj_exact_size.c ===
    PASS: test_exact_size
    PASS: test_empty_block
    ---
    # TOTAL: 2
    # PASS:  2
    # SKIP:  0
    # FAIL:  0
    # ERROR: 0
    === END ===
    ...
    === test_vli.c ===
    PASS: test_lzma_vli_size
    PASS: test_lzma_vli_encode
    PASS: test_lzma_vli_decode
    ---
    # TOTAL: 3
    # PASS:  3
    # SKIP:  0
    # FAIL:  0
    # ERROR: 0
    === END ===
    DURATION: 0
    END: /usr/lib/xz/ptest
    2023-06-01T01:57
    STOP: ptest-runner
    TOTAL: 1 FAIL: 0
 - The tests under xz requires /bin/bash

Signed-off-by: duep <duep.fnst@fujitsu.com>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../xz/xz/0001-build-PROGRAMS.patch           | 20 ++++++++++++++++
 meta/recipes-extended/xz/xz/run-ptest         |  5 ++++
 meta/recipes-extended/xz/xz_5.4.1.bb          | 24 +++++++++++++++++--
 4 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch
 create mode 100644 meta/recipes-extended/xz/xz/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index d60ebb38fc..9aa68c75ea 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -70,6 +70,7 @@ PTESTS_FAST = "\
     sed \
     slang \
     wayland \
+    xz \
     zlib \
 "
 PTESTS_FAST:append:libc-glibc = " glibc-tests"
diff --git a/meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch b/meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch
new file mode 100644
index 0000000000..f97a75030a
--- /dev/null
+++ b/meta/recipes-extended/xz/xz/0001-build-PROGRAMS.patch
@@ -0,0 +1,20 @@
+From: Du Erpei <duep.fnst@fujitsu.com>
+Subject: [PATCH] tests/Makefile.am: add target of 'build-PROGRAMS'
+
+Add target 'build-PROGRAMS' to only compile the test set under
+'/tests' and not run locally.
+
+Upstream-Status: Pending
+
+--- a/tests/Makefile.am	2023-01-12 00:51:42.000000000 +0800
++++ b/tests/Makefile.am	2023-05-30 14:49:34.507313644 +0800
+@@ -74,6 +74,9 @@ if COND_SCRIPTS
+ TESTS += test_scripts.sh
+ endif
+ 
++build-PROGRAMS: all-am
++	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
++
+ clean-local:
+ 	-rm -f compress_generated_* \
+ 		xzgrep_test_output xzgrep_test_1.xz xzgrep_test_2.xz
diff --git a/meta/recipes-extended/xz/xz/run-ptest b/meta/recipes-extended/xz/xz/run-ptest
new file mode 100644
index 0000000000..ebde965d5c
--- /dev/null
+++ b/meta/recipes-extended/xz/xz/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+cd ./tests
+for i in `ls test*`; do
+	./$i
+done
diff --git a/meta/recipes-extended/xz/xz_5.4.1.bb b/meta/recipes-extended/xz/xz_5.4.1.bb
index 71bf4b540a..14808b1714 100644
--- a/meta/recipes-extended/xz/xz_5.4.1.bb
+++ b/meta/recipes-extended/xz/xz_5.4.1.bb
@@ -24,13 +24,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a \
                     file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \
                     "
 
-SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz"
+SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz \
+           file://0001-build-PROGRAMS.patch \
+           file://run-ptest"
 SRC_URI[sha256sum] = "e4b0f81582efa155ccf27bb88275254a429d44968e488fc94b806f2a61cd3e22"
 UPSTREAM_CHECK_REGEX = "xz-(?P<pver>\d+(\.\d+)+)\.tar"
 
 CACHED_CONFIGUREVARS += "gl_cv_posix_shell=/bin/sh"
 
-inherit autotools gettext
+inherit autotools gettext ptest
 
 PACKAGES =+ "liblzma"
 
@@ -42,3 +44,21 @@ ALTERNATIVE:${PN} = "xz xzcat unxz \
                      lzma lzcat unlzma"
 
 BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest(){
+	oe_runmake -C ${B}/tests/ build-PROGRAMS
+}
+
+do_install_ptest(){
+	install -d ${D}${PTEST_PATH}/tests/
+	find ${B}/tests/ -type f -not -name "*.o" -not -name "Makefile" \
+	  -exec install --mode=755 {} ${D}${PTEST_PATH}/tests/ \;
+
+	install -d ${D}${PTEST_PATH}/tests/.libs/
+	install --mode=755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests/.libs/
+
+	install -d ${D}${PTEST_PATH}/tests/files/
+	install --mode=755 ${S}/tests/files/* ${D}${PTEST_PATH}/tests/files/
+}
+
+RDEPENDS:${PN}-ptest += "bash"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-15  8:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01  8:34 [meta-oe][PATCH V1] xz: add ptest support duep.fnst
2023-06-01 12:27 ` [OE-core] " Alexander Kanavin
2023-06-02  6:34   ` duep.fnst
2023-06-02  6:36     ` [OE-core] " Alexander Kanavin
2023-06-02  8:18       ` duep.fnst
2023-06-02  8:40         ` [OE-core] " Alexander Kanavin
2023-06-15  7:59           ` duep.fnst
2023-06-15  8:31             ` duep.fnst
2023-06-01  8:52 duep.fnst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).