summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/curl
diff options
context:
space:
mode:
authorYogesh Tyagi <yogesh.tyagi@intel.com>2022-07-06 18:18:27 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-08 00:09:42 +0100
commitee222ca0ce72cc629588b81ced50d8e22ea7f452 (patch)
treebd890f0de7a343da04dcca3744bfa391ad9b1878 /meta/recipes-support/curl
parent44e84bfe0c89c9e93232071b11fa24d1b397e200 (diff)
downloadpoky-ee222ca0ce72cc629588b81ced50d8e22ea7f452.tar.gz
curl : Add ptest
- curl-ptest is taking around 200 seconds to execute so added curl-ptest to PTESTS_SLOW - This patch is rework on an existing patch provided by Maxin B. John (maxin.john@intel.com) https://www.openembedded.org/pipermail/openembedded-core/2017-July/139176.html - Below is the run log of curl-ptest START: ptest-runner 2022-07-03T15:52 BEGIN: /usr/lib/curl/ptest ********* System characteristics ******** * curl 7.83.1 (x86_64-poky-linux-gnu) * libcurl/7.83.1 OpenSSL/3.0.3 zlib/1.2.12 libidn2/2.3.2 * Features: alt-svc AsynchDNS Debug HSTS HTTPS-proxy IDN Largefile libz NTLM SSL TLS-SRP UnixSockets * Disabled: headers-api * Host: qemux86-64 * System: Linux qemux86-64 5.15.44-yocto-standard #1 SMP PREEMPT Tue May 31 20:28:59 UTC 2022 x86_64 GNU/Linux * OS: linux * Servers: HTTP-unix * Env: * Seed: 238593 ***************************************** PASS: test 0001 (1 out of 1466, remaining: 25:07, took 1.029s, duration: 00:01) PASS: test 0002 (2 out of 1466, remaining: 13:21, took 0.065s, duration: 00:01) ... ... PASS: test 3019 (1460 out of 1466, remaining: 00:00, took 0.012s, duration: 03:16) PASS: test 3020 (1461 out of 1466, remaining: 00:00, took 0.011s, duration: 03:16) test 3025...The tool set in the test case for this: 'lib3025' does not exist TESTDONE: 1280 tests were considered during 197 seconds. TESTDONE: 783 tests out of PASS: 783 report: 100% DURATION: 202 END: /usr/lib/curl/ptest 2022-07-03T15:56 STOP: ptest-runner TOTAL: 1 FAIL: 0 - disable the curl tests that are expected to fail - remove the generated file configurehelp.pm from curl test beacuse it is causing reproducible build failure. this file is used by some curl tests to scan symbols from curl headers. we are anyway not installing curl headers and already have disabled those tests. [YOCTO #6707] (From OE-Core rev: a0ea00daace826129cdec8f714ca7b7c60e9dadf) Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.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-tests28
-rw-r--r--meta/recipes-support/curl/curl/run-ptest6
-rw-r--r--meta/recipes-support/curl/curl_7.84.0.bb21
3 files changed, 54 insertions, 1 deletions
diff --git a/meta/recipes-support/curl/curl/disable-tests b/meta/recipes-support/curl/curl/disable-tests
new file mode 100644
index 0000000000..92056bd8ca
--- /dev/null
+++ b/meta/recipes-support/curl/curl/disable-tests
@@ -0,0 +1,28 @@
1# These CRL test (alt-avc) are failing
2356
3412
4413
5# These CRL tests are scanning docs
6971
71119
81132
91135
10# These CRL tests are scnning headers
111167
12# These CRL tests are scanning man pages
131139
141140
151173
161177
17# This CRL test is looking for m4 files
181165
19# This CRL test is looking for src files
201185
21# These CRL tests need --libcurl option to be enabled
221400
231401
241402
251403
261404
271405
281465
diff --git a/meta/recipes-support/curl/curl/run-ptest b/meta/recipes-support/curl/curl/run-ptest
new file mode 100644
index 0000000000..614e822922
--- /dev/null
+++ b/meta/recipes-support/curl/curl/run-ptest
@@ -0,0 +1,6 @@
1#!/bin/sh
2cd tests
3./runtests.pl -a -n -s | sed \
4 -e 's|\([^ ]* *\) \([^ ]* *\)...OK|PASS: \1 \2|' \
5 -e 's|\([^ ]* *\) \([^ ]* *\)...FAILED|FAIL: \1 \2|' \
6 -e 's/Warning: test[0-9]\+ not present in tests\/data\/Makefile.inc//'
diff --git a/meta/recipes-support/curl/curl_7.84.0.bb b/meta/recipes-support/curl/curl_7.84.0.bb
index 74a19d20c9..0d829cdf23 100644
--- a/meta/recipes-support/curl/curl_7.84.0.bb
+++ b/meta/recipes-support/curl/curl_7.84.0.bb
@@ -12,13 +12,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=190c514872597083303371684954f238"
12SRC_URI = " \ 12SRC_URI = " \
13 https://curl.se/download/${BP}.tar.xz \ 13 https://curl.se/download/${BP}.tar.xz \
14 file://0001-easy_lock.h-include-sched.h-if-available-to-fix-buil.patch \ 14 file://0001-easy_lock.h-include-sched.h-if-available-to-fix-buil.patch \
15 file://run-ptest \
16 file://disable-tests \
15" 17"
16SRC_URI[sha256sum] = "2d118b43f547bfe5bae806d8d47b4e596ea5b25a6c1f080aef49fbcd817c5db8" 18SRC_URI[sha256sum] = "2d118b43f547bfe5bae806d8d47b4e596ea5b25a6c1f080aef49fbcd817c5db8"
17 19
18# Curl has used many names over the years... 20# Curl has used many names over the years...
19CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl" 21CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl"
20 22
21inherit autotools pkgconfig binconfig multilib_header 23inherit autotools pkgconfig binconfig multilib_header ptest
22 24
23# Entropy source for random PACKAGECONFIG option 25# Entropy source for random PACKAGECONFIG option
24RANDOM ?= "/dev/urandom" 26RANDOM ?= "/dev/urandom"
@@ -83,6 +85,23 @@ do_install:append:class-target() {
83 ${D}${bindir}/curl-config 85 ${D}${bindir}/curl-config
84} 86}
85 87
88do_compile_ptest() {
89 oe_runmake test
90 oe_runmake -C ${B}/tests/server
91}
92
93do_install_ptest() {
94 cat ${WORKDIR}/disable-tests >> ${S}/tests/data/DISABLED
95 rm ${B}/tests/configurehelp.pm
96 cp -rf ${B}/tests ${D}${PTEST_PATH}
97 cp -rf ${S}/tests ${D}${PTEST_PATH}
98 install -d ${D}${PTEST_PATH}/src
99 ln -sf ${bindir}/curl ${D}${PTEST_PATH}/src/curl
100 cp -rf ${D}${bindir}/curl-config ${D}${PTEST_PATH}
101}
102
103RDEPENDS:${PN}-ptest += "bash perl-modules"
104
86PACKAGES =+ "lib${BPN}" 105PACKAGES =+ "lib${BPN}"
87 106
88FILES:lib${BPN} = "${libdir}/lib*.so.*" 107FILES:lib${BPN} = "${libdir}/lib*.so.*"