diff mbox series

[04/29] curl: build and run the full set of ptests

Message ID 20230917093901.428214-4-alex@linutronix.de
State Accepted, archived
Commit ff88f275f5f8d52da2967726d8880cbbfdfc8f19
Headers show
Series [01/29] sstate.bbclass: setscene_depvalid(): do not exclude shadow-native from task dependency resolution | expand

Commit Message

Alexander Kanavin Sept. 17, 2023, 9:38 a.m. UTC
Not running make in the top level tests/ directory
excluded about a third of them (those that consisted
of running small test binaries).

Also, run tests in parallel, which reduces total time
from five minutes to about 75 seconds.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/recipes-support/curl/curl/run-ptest | 2 +-
 meta/recipes-support/curl/curl_8.2.1.bb  | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-support/curl/curl/run-ptest b/meta/recipes-support/curl/curl/run-ptest
index 2c74c58f5da..95af2bd7b34 100644
--- a/meta/recipes-support/curl/curl/run-ptest
+++ b/meta/recipes-support/curl/curl/run-ptest
@@ -1,6 +1,6 @@ 
 #!/bin/sh
 cd tests
-{ ./runtests.pl -a -n -s || echo "FAIL: curl" ; } | sed \
+{ ./runtests.pl -a -n -s -j4 || echo "FAIL: curl" ; } | sed \
      -e 's|\([^ ]* *\) \([^ ]* *\)...OK|PASS: \1 \2|' \
      -e 's|\([^ ]* *\) \([^ ]* *\)...FAILED|FAIL: \1 \2|' \
      -e 's/Warning: test[0-9]\+ not present in tests\/data\/Makefile.inc//'
diff --git a/meta/recipes-support/curl/curl_8.2.1.bb b/meta/recipes-support/curl/curl_8.2.1.bb
index 068486a3521..b86c6f3bbae 100644
--- a/meta/recipes-support/curl/curl_8.2.1.bb
+++ b/meta/recipes-support/curl/curl_8.2.1.bb
@@ -85,14 +85,18 @@  do_install:append:class-target() {
 }
 
 do_compile_ptest() {
-	oe_runmake test
-	oe_runmake -C ${B}/tests/server
+	oe_runmake -C ${B}/tests
 }
 
 do_install_ptest() {
 	cat  ${WORKDIR}/disable-tests >> ${S}/tests/data/DISABLED
 	rm -f ${B}/tests/configurehelp.pm
 	cp -rf ${B}/tests ${D}${PTEST_PATH}
+        rm -f ${D}${PTEST_PATH}/tests/libtest/.libs/libhostname.la
+        rm -f ${D}${PTEST_PATH}/tests/libtest/libhostname.la
+        mv ${D}${PTEST_PATH}/tests/libtest/.libs/* ${D}${PTEST_PATH}/tests/libtest/
+        mv ${D}${PTEST_PATH}/tests/libtest/libhostname.so ${D}${PTEST_PATH}/tests/libtest/.libs/
+        mv ${D}${PTEST_PATH}/tests/http/clients/.libs/* ${D}${PTEST_PATH}/tests/http/clients/
 	cp -rf ${S}/tests ${D}${PTEST_PATH}
 	find ${D}${PTEST_PATH}/ -type f -name Makefile.am -o -name Makefile.in -o -name Makefile -delete
 	install -d ${D}${PTEST_PATH}/src