summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/curl
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2024-06-12 11:06:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-06-13 09:11:17 +0100
commit38feae1adb0a16c4689abe2b579256dbeb99f553 (patch)
tree61c8e8ca2ca7a8e92e4cdfa322a5ee74850c2087 /meta/recipes-support/curl
parent4574919d30f66fa0b13eb0b25dd32650c23b8f1c (diff)
downloadpoky-38feae1adb0a16c4689abe2b579256dbeb99f553.tar.gz
curl: rewrite ptest installation
The latest libtool upgrade appears to have resulted in intermediate files containing build paths. This wouldn't normally be a problem but the curl-ptest package is populated by copying ${B}/tests/ which includes all of the intermediate objects, so this causes buildpath warnings. Rewrite the ptest installation to install just the pieces we need: the test harness, utility scripts, and the test data. We do not need the libcurl unit tests nor the HTTP server tests, as we don't run those. Remove all of the explicitly disabled tests, as many of these were for tests that run curl-config or scan the source code, neither of which are available at ptest time. Instead use keyword exclusions to skip them. Tell the test runner to use the system curl instead of symlinking in the binary. Don't copy curl-config, skipping these minor tests is acceptable. Remove the RDEPENDS on bash, nothing needs this now we're not shipping a build tree. (From OE-Core rev: ace380501d3ef62a9e94e2bd4e880cbfaddac02c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/curl')
-rw-r--r--meta/recipes-support/curl/curl/disable-tests42
-rw-r--r--meta/recipes-support/curl/curl/run-ptest8
-rw-r--r--meta/recipes-support/curl/curl_8.8.0.bb33
3 files changed, 26 insertions, 57 deletions
diff --git a/meta/recipes-support/curl/curl/disable-tests b/meta/recipes-support/curl/curl/disable-tests
index c4aa7783a1..e69de29bb2 100644
--- a/meta/recipes-support/curl/curl/disable-tests
+++ b/meta/recipes-support/curl/curl/disable-tests
@@ -1,42 +0,0 @@
1# Intermittently fails e.g. https://autobuilder.yocto.io/pub/non-release/20231220-28/testresults/qemux86-64-ptest/curl.log
2# https://autobuilder.yocto.io/pub/non-release/20231220-27/testresults/qemux86-64-ptest/curl.log
3337
4# These CRL test (alt-avc) are failing
5356
6412
7413
8# These CRL tests are scanning docs
9971
10# Intermittently hangs e.g http://autobuilder.yocto.io/pub/non-release/20231228-18/testresults/qemux86-64-ptest/curl.log
111091
12# Intermittently hangs e.g https://autobuilder.yocto.io/pub/non-release/20231220-27/testresults/qemux86-64-ptest/curl.log
131096
14# These CRL tests are scanning docs
151119
161132
171135
181478
19# These CRL tests are scanning headers
201167
211477
22# These CRL tests are scanning man pages
231139
241140
251173
261177
27# This CRL test is looking for m4 files
281165
29# This CRL test is looking for src files
301185
31# This test is scanning the source tree
321222
33# These CRL tests need --libcurl option to be enabled
341279
351400
361401
371402
381403
391404
401405
411465
421481
diff --git a/meta/recipes-support/curl/curl/run-ptest b/meta/recipes-support/curl/curl/run-ptest
index 579b3f4587..597cf92dbb 100644
--- a/meta/recipes-support/curl/curl/run-ptest
+++ b/meta/recipes-support/curl/curl/run-ptest
@@ -10,4 +10,10 @@ cd tests
10 10
11# Don't run the flaky or timing dependent tests 11# Don't run the flaky or timing dependent tests
12# Until https://github.com/curl/curl/issues/13350 is resolved, don't run FTP tests 12# Until https://github.com/curl/curl/issues/13350 is resolved, don't run FTP tests
13./runtests.pl -a -n -am -j4 -p !flaky !timing-dependent !FTP 13# We don't enable --libcurl
14# Don't assume curl-config exists
15# We don't have the source tree
16./runtests.pl \
17 -a -c curl -vc curl -n -am -j4 -p \
18 !flaky !timing-dependent !FTP \
19 !--libcurl !curl-config !source\ analysis !checksrc !documentation
diff --git a/meta/recipes-support/curl/curl_8.8.0.bb b/meta/recipes-support/curl/curl_8.8.0.bb
index b932594159..2b058e4e82 100644
--- a/meta/recipes-support/curl/curl_8.8.0.bb
+++ b/meta/recipes-support/curl/curl_8.8.0.bb
@@ -101,23 +101,28 @@ do_compile_ptest() {
101} 101}
102 102
103do_install_ptest() { 103do_install_ptest() {
104 cat ${UNPACKDIR}/disable-tests >> ${S}/tests/data/DISABLED 104 install -d ${D}${PTEST_PATH}/tests
105 rm -f ${B}/tests/configurehelp.pm 105 cp ${S}/tests/*.p[lmy] ${D}${PTEST_PATH}/tests/
106 cp -rf ${B}/tests ${D}${PTEST_PATH} 106
107 rm -f ${D}${PTEST_PATH}/tests/libtest/.libs/libhostname.la 107 install -d ${D}${PTEST_PATH}/tests/libtest
108 rm -f ${D}${PTEST_PATH}/tests/libtest/libhostname.la 108 for name in $(makefile-getvar ${B}/tests/libtest/Makefile noinst_PROGRAMS noinst_LTLIBRARIES); do
109 mv ${D}${PTEST_PATH}/tests/libtest/.libs/* ${D}${PTEST_PATH}/tests/libtest/ 109 ${B}/libtool --mode=install install ${B}/tests/libtest/$name ${D}${PTEST_PATH}/tests/libtest
110 mv ${D}${PTEST_PATH}/tests/libtest/libhostname.so ${D}${PTEST_PATH}/tests/libtest/.libs/ 110 done
111 mv ${D}${PTEST_PATH}/tests/http/clients/.libs/* ${D}${PTEST_PATH}/tests/http/clients/ 111 cp ${S}/tests/libtest/notexists.pl ${D}${PTEST_PATH}/tests/libtest
112 cp -rf ${S}/tests ${D}${PTEST_PATH} 112 rm -f ${D}${PTEST_PATH}/tests/libtest/libhostname.la
113 find ${D}${PTEST_PATH}/ -type f -name Makefile.am -o -name Makefile.in -o -name Makefile -delete 113
114 install -d ${D}${PTEST_PATH}/src 114 install -d ${D}${PTEST_PATH}/tests/server
115 ln -sf ${bindir}/curl ${D}${PTEST_PATH}/src/curl 115 for name in $(makefile-getvar ${B}/tests/server/Makefile noinst_PROGRAMS); do
116 cp -rf ${D}${bindir}/curl-config ${D}${PTEST_PATH} 116 ${B}/libtool --mode=install install ${B}/tests/server/$name ${D}${PTEST_PATH}/tests/server
117 done
118
119 cp -r ${S}/tests/data ${D}${PTEST_PATH}/tests/
120
121 # More tests that we disable for automated QA as they're not reliable
122 cat ${UNPACKDIR}/disable-tests >>${D}${PTEST_PATH}/tests/data/DISABLED
117} 123}
118 124
119RDEPENDS:${PN}-ptest += " \ 125RDEPENDS:${PN}-ptest += " \
120 bash \
121 locale-base-en-us \ 126 locale-base-en-us \
122 perl-module-b \ 127 perl-module-b \
123 perl-module-base \ 128 perl-module-base \