Skip to contentSkip to conversation

c-ares: Move to tarballs, add ptest and static support

PATCH New Alex Kiernan 1 participant 2 messages Dec 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 c-ares: Move to tarballs, add ptest and static support

---

Changes in v3:
- Filter out "Live" tests which fail inside runqemu (there's no resolv.conf)

Changes in v2:
- Use relative path to arestest

 .../recipes-support/c-ares/c-ares/run-ptest   |  7 +++++++
 .../recipes-support/c-ares/c-ares_1.24.0.bb   | 19 ++++++++++++++-----
 2 files changed, 21 insertions(+), 5 deletions(-)
 create mode 100644 meta-oe/recipes-support/c-ares/c-ares/run-ptest
meta-oe/recipes-support/c-ares/c-ares/run-ptest new file +7 -0
new file mode 100644
index 000000000000..46572111b5cf
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if ./arestest --gtest_filter=-*.Live*; then
+	echo "PASS: c-ares"
+else
+	echo "FAIL: c-ares"
+fi
meta-oe/recipes-support/c-ares/c-ares_1.24.0.bb +14 -5
index 2171002aa95e..3b3b2b83febc 100644
@@ -5,14 +5,23 @@ SECTION = "libs"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=fdbc58a6da11a9f68aa73c453818decc"
 
-SRC_URI = "git://github.com/c-ares/c-ares.git;branch=main;protocol=https"
-SRCREV = "972f456f2808b4e4b1730c90ab506f6af5f4c725"
+SRC_URI = "https://c-ares.org/download/c-ares-1.24.0.tar.gz \
+           file://run-ptest"
+SRC_URI[sha256sum] = "c517de6d5ac9cd55a9b72c1541c3e25b84588421817b5f092850ac09a8df5103"
 
-UPSTREAM_CHECK_GITTAGREGEX = "cares-(?P<pver>\d+_(\d_?)+)"
+PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
+PACKAGECONFIG[manpages] = ""
+PACKAGECONFIG[tests] = "-DCARES_BUILD_TESTS=ON,-DCARES_BUILD_TESTS=OFF,googletest"
 
-S = "${WORKDIR}/git"
+inherit cmake manpages pkgconfig ptest
 
-inherit cmake pkgconfig
+EXTRA_OECMAKE = "-DCARES_STATIC=${@ 'ON' if d.getVar('DISABLE_STATIC') == '' else 'OFF' }"
+
+do_install_ptest () {
+	install -d ${D}${PTEST_PATH}
+	install -m 0755 ${B}/bin/arestest ${D}${PTEST_PATH}
+	install -m 0755 ${WORKDIR}/run-ptest ${D}${PTEST_PATH}
+}
 
 PACKAGE_BEFORE_PN = "${PN}-utils"
 
Signature · 1 line
2.39.0
#1 lore raw

PATCH v3 2/2 ptest-packagelists-meta-oe.inc Add c-ares to PTESTS_SLOW_META_OE

These take around 60s to run.

---

(no changes since v1)

 meta-oe/conf/include/ptest-packagelists-meta-oe.inc | 1 +
 1 file changed, 1 insertion(+)
meta-oe/conf/include/ptest-packagelists-meta-oe.inc +1 -0
index 9182acf44915..06c7de3f8b33 100644
@@ -46,6 +46,7 @@ PTESTS_FAST_META_OE:remove:riscv64 = "nodejs"
 PTESTS_FAST_META_OE:remove:riscv32 = "nodejs"
 
 PTESTS_SLOW_META_OE = "\
+    c-ares \
     fftw \
     libusb-compat \
     rsyslog \
Signature · 1 line
2.39.0