Skip to contentSkip to conversation

log4cplus: add ptest support

PATCH Superseded Pratik Farkase 2 participants 5 messages Nov 4 – Nov 11

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 log4cplus: add ptest support

Build the GNU Autotest based test suite and run it under ptest, following the tar ptest pattern: the generated testsuite is shipped together with atconfig/atlocal, whose build-host paths and tool locations are rewritten to the on-target ptest directory. The test programs use libtool -no-install, so the real binaries are installed with libtool.

The headers-compilation group is skipped as it recompiles the public headers, which needs a toolchain that is not present in the image.

Tested on qemuriscv64 with ptest-runner.

---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../log4cplus/log4cplus/run-ptest             |  5 ++
 .../log4cplus/log4cplus_2.2.0.1.bb            | 70 ++++++++++++++++++-
 3 files changed, 75 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/log4cplus/log4cplus/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index d5357d8732..f8d2cb25b0 100644
@@ -63,6 +63,7 @@ PTESTS_FAST = "\
     libxmlb \
     libxslt \
     libyaml \
+    log4cplus \
     logrotate \
     lttng-ust \
     lua \
meta/recipes-devtools/log4cplus/log4cplus/run-ptest new file +5 -0
new file mode 100644
index 0000000000..1f346cc8b1
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd @PTEST_PATH@/tests/
+
+./testsuite --am-fmt -k '!headers-compilation'
meta/recipes-devtools/log4cplus/log4cplus_2.2.0.1.bb +69 -1

75 lines not on this page · raw message

Signature · 1 line
2.43.0
#1 lore raw
Quoted 6 lines · Pratik Farkase

Build the GNU Autotest based test suite and run it under ptest, following the tar ptest pattern: the generated testsuite is shipped together with atconfig/atlocal, whose build-host paths and tool locations are rewritten to the on-target ptest directory. The test programs use libtool -no-install, so the real binaries are installed with libtool.

Quoted 7 lines

The headers-compilation group is skipped as it recompiles the public headers, which needs a toolchain that is not present in the image.

Tested on qemuriscv64 with ptest-runner.

---

Hi Pratik,

It looks like the ptest recipe is failing reproducibility tests:

AssertionError: The following deb packages are different and not in exclusion list:
/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB-extended/tmp/deploy/deb/./x86-64-v3/log4cplus-ptest_2.2.1-r0_amd64.deb The following ipk packages are different and not in exclusion list:
/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB-extended/tmp/deploy/ipk/./x86-64-v3/log4cplus-ptest_2.2.1-r0_x86-64-v3.ipk The following rpm packages are different and not in exclusion list:
/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB-extended/tmp/deploy/rpm/./x86_64_v3/log4cplus-ptest-2.2.1-r0.x86_64_v3.rpm

https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/5295

Diffoscope output can be found here:
https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20261104-ggu_ffd6/packages/diff-html/

Can you have a look at the issue?

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v2 1/1 log4cplus: add ptest support

In reply to Pratik Farkase

Build the GNU Autotest based test suite and run it under ptest, following the tar ptest pattern: the generated testsuite is shipped together with atconfig/atlocal, whose build-host paths and tool locations are rewritten to the on-target ptest directory. The test programs use libtool -no-install, so the real binaries are installed with libtool.

Tested on qemuriscv64 with ptest-runner.

---

Notes:
v2: Trim atlocal to the variables the on-target tests need; the dropped
compiler/flags variables embedded build paths and broke ptest package reproducibility.

 .../distro/include/ptest-packagelists.inc     |  1 +
 .../log4cplus/log4cplus/run-ptest             |  5 ++
 .../log4cplus/log4cplus_2.2.0.1.bb            | 74 ++++++++++++++++++-
 3 files changed, 79 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/log4cplus/log4cplus/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index d5357d8732..f8d2cb25b0 100644
@@ -63,6 +63,7 @@ PTESTS_FAST = "\
     libxmlb \
     libxslt \
     libyaml \
+    log4cplus \
     logrotate \
     lttng-ust \
     lua \
meta/recipes-devtools/log4cplus/log4cplus/run-ptest new file +5 -0
new file mode 100644
index 0000000000..1f346cc8b1
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd @PTEST_PATH@/tests/
+
+./testsuite --am-fmt -k '!headers-compilation'
meta/recipes-devtools/log4cplus/log4cplus_2.2.0.1.bb +73 -1

79 lines not on this page · raw message

Signature · 1 line
2.43.0
#3 lore raw
Quoted 9 lines · Pratik Farkase

Build the GNU Autotest based test suite and run it under ptest, following the tar ptest pattern: the generated testsuite is shipped together with atconfig/atlocal, whose build-host paths and tool locations are rewritten to the on-target ptest directory. The test programs use libtool -no-install, so the real binaries are installed with libtool.

Tested on qemuriscv64 with ptest-runner.

Hi Pratik,

Thanks for the v2, I confirm it builds correctly now.

Quoted 4 lines
meta/recipes-devtools/log4cplus/log4cplus_2.2.0.1.bb +0 -0
@@ -16,6 +16,78 @@ SRC_URI[sha256sum] = "374175c22fabe752eb1c20138e732b69ae191e641f92d32c9432985cd8
 UPSTREAM_CHECK_URI = "https://github.com/log4cplus/log4cplus/releases"

meta/recipes-devtools/log4cplus/log4cplus_2.2.0.1.bb SRC_URI[sha256sum] = "374175c22fabe752eb1c20138e732b69ae191e641f92d32c9432985cd8 · line 25

Quoted 10 lines
meta/recipes-devtools/log4cplus/log4cplus_2.2.0.1.bb +7 -1
 UPSTREAM_CHECK_REGEX = "log4cplus-(?P<pver>\d+(\.\d+)+)\.tar"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
+
+SRC_URI += "file://run-ptest"
+
+RDEPENDS:${PN}-ptest += "bash diffutils gawk grep sed ${PN}"
+
+INSANE_SKIP:${PN}-ptest += "buildpaths"

You should be able to remove this INSANE_SKIP now: embedding build paths is likely the reason the v1 was not passing the reproducibility tests. Now that reproducibility tests succeed, QA should also pass here.

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH v3 1/1 log4cplus: add ptest support

In reply to Pratik Farkase

Build the GNU Autotest based test suite and run it under ptest, following the tar ptest pattern: the generated testsuite is shipped together with atconfig/atlocal, whose build-host paths and tool locations are rewritten to the on-target ptest directory. The test programs use libtool -no-install, so the real binaries are installed with libtool.

Tested on qemuriscv64 with ptest-runner.

---

Notes:
v3: Drop the buildpaths INSANE_SKIP; no longer needed now that atlocal does
not embed build paths. Also derive the test list
dynamically from the autotools TESTSUITE_AT and noinst_PROGRAMS variables (makefile-getvar) instead of hardcoding it, per review on the lttng-ust ptest series.
v2: Trim atlocal to the variables the on-target tests need; the dropped
compiler/flags variables embedded build paths and broke reproducibility.

 .../distro/include/ptest-packagelists.inc     |  1 +
 .../log4cplus/log4cplus/run-ptest             |  5 ++
 .../log4cplus/log4cplus_2.2.0.1.bb            | 63 ++++++++++++++++++-
 3 files changed, 68 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/log4cplus/log4cplus/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index d5357d8732..f8d2cb25b0 100644
@@ -63,6 +63,7 @@ PTESTS_FAST = "\
     libxmlb \
     libxslt \
     libyaml \
+    log4cplus \
     logrotate \
     lttng-ust \
     lua \
meta/recipes-devtools/log4cplus/log4cplus/run-ptest new file +5 -0
new file mode 100644
index 0000000000..1f346cc8b1
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd @PTEST_PATH@/tests/
+
+./testsuite --am-fmt -k '!headers-compilation'
meta/recipes-devtools/log4cplus/log4cplus_2.2.0.1.bb +62 -1

68 lines not on this page · raw message

Signature · 1 line
2.43.0