summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2024-12-23 19:39:47 +0800
committerArmin Kuster <akuster808@gmail.com>2024-12-31 09:02:31 -0500
commit50544ce18c26099edb54c9ccf23f5095bfe652e9 (patch)
treeac57a92bf1beb478d2252392af40528bd36800a8
parent8fb0186a91a27d26e8812275103ff934ece1d3b7 (diff)
downloadmeta-openembedded-50544ce18c26099edb54c9ccf23f5095bfe652e9.tar.gz
asio: Add ptest support
# ./run-ptest PASS: address PASS: address_v4 PASS: address_v4_iterator PASS: address_v4_range PASS: address_v6 PASS: address_v6_iterator PASS: address_v6_range PASS: any_completion_executor PASS: any_completion_handler PASS: any_executor PASS: any_io_executor PASS: append PASS: as_tuple PASS: associated_allocator PASS: associated_cancellation_slot PASS: associated_executor PASS: associated_immediate_executor PASS: associator PASS: async_result [snip] Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (master rev: 1274b0df3c126e72dcbfd4678d1c25aadb8607dc) * remove duplicated SRC_URI * refresh 0001-tests-Remove-blocking_adaptation.cpp.patch Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/asio/asio/0001-tests-Remove-blocking_adaptation.cpp.patch45
-rw-r--r--meta-oe/recipes-support/asio/asio/run-ptest19
-rw-r--r--meta-oe/recipes-support/asio/asio_1.20.0.bb21
3 files changed, 81 insertions, 4 deletions
diff --git a/meta-oe/recipes-support/asio/asio/0001-tests-Remove-blocking_adaptation.cpp.patch b/meta-oe/recipes-support/asio/asio/0001-tests-Remove-blocking_adaptation.cpp.patch
new file mode 100644
index 0000000000..1de0edc05c
--- /dev/null
+++ b/meta-oe/recipes-support/asio/asio/0001-tests-Remove-blocking_adaptation.cpp.patch
@@ -0,0 +1,45 @@
1From 3200dd761894f04f559c3a60b67178a9d40bf34c Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Thu, 10 Oct 2024 13:58:38 +0800
4Subject: [PATCH] tests: Remove blocking_adaptation.cpp
5
6The test failed to build with clang as below.
7../../../asio-1.30.2/src/tests/../../include/asio/execution/blocking_adaptation.hpp:216:13: error: call to 'query' is ambiguous
8 216 | conditional_t<true, T, P>::query(static_cast<P&&>(p))
9 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10../../../asio-1.30.2/src/tests/../../include/asio/execution/blocking_adaptation.hpp:213:29: note: in instantiation of exception specification for 'query<asio::execution::detail::blocking_adaptation::allowed_t<>>' requested here
11 213 | static constexpr auto query(P&& p)
12 |
13
14We can add the case back once the above build failure resolved then.
15
16Upstream-Status: Pending
17
18Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
19---
20 src/tests/Makefile.am | 2 --
21 1 file changed, 2 deletions(-)
22
23diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
24index 7161698..25f3b08 100644
25--- a/src/tests/Makefile.am
26+++ b/src/tests/Makefile.am
27@@ -51,7 +51,6 @@ check_PROGRAMS = \
28 unit/error \
29 unit/execution/any_executor \
30 unit/execution/blocking \
31- unit/execution/blocking_adaptation \
32 unit/execution/bulk_execute \
33 unit/execution/bulk_guarantee \
34 unit/execution/connect \
35@@ -244,7 +243,6 @@ TESTS = \
36 unit/error \
37 unit/execution/any_executor \
38 unit/execution/blocking \
39- unit/execution/blocking_adaptation \
40 unit/execution/bulk_execute \
41 unit/execution/bulk_guarantee \
42 unit/execution/connect \
43--
442.25.1
45
diff --git a/meta-oe/recipes-support/asio/asio/run-ptest b/meta-oe/recipes-support/asio/asio/run-ptest
new file mode 100644
index 0000000000..d37db0b315
--- /dev/null
+++ b/meta-oe/recipes-support/asio/asio/run-ptest
@@ -0,0 +1,19 @@
1#!/bin/sh
2
3ptestdir=$(dirname "$(readlink -f "$0")")
4cd "$ptestdir"/tests || exit
5
6tests=$(find * -type f -executable)
7
8rm -rf test.log
9
10for f in $tests
11do
12 if test -x ./"$f"; then
13 if ./"$f" > test.log 2>&1; then
14 echo "PASS: $f"
15 else
16 echo "FAIL: $f"
17 fi
18 fi
19done
diff --git a/meta-oe/recipes-support/asio/asio_1.20.0.bb b/meta-oe/recipes-support/asio/asio_1.20.0.bb
index cedcf9fee0..5e7a6e2495 100644
--- a/meta-oe/recipes-support/asio/asio_1.20.0.bb
+++ b/meta-oe/recipes-support/asio/asio_1.20.0.bb
@@ -9,9 +9,12 @@ LICENSE = "BSL-1.0"
9 9
10DEPENDS = "openssl" 10DEPENDS = "openssl"
11 11
12SRC_URI = "${SOURCEFORGE_MIRROR}/asio/${BP}.tar.bz2" 12SRC_URI = "${SOURCEFORGE_MIRROR}/asio/${BP}.tar.bz2 \
13 file://0001-tests-Remove-blocking_adaptation.cpp.patch \
14 file://run-ptest \
15"
13 16
14inherit autotools 17inherit autotools ptest
15 18
16ALLOW_EMPTY:${PN} = "1" 19ALLOW_EMPTY:${PN} = "1"
17 20
@@ -19,10 +22,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=416f4cc4f79551b690babb14ef1a5799"
19 22
20SRC_URI[sha256sum] = "204374d3cadff1b57a63f4c343cbadcee28374c072dc04b549d772dbba9f650c" 23SRC_URI[sha256sum] = "204374d3cadff1b57a63f4c343cbadcee28374c072dc04b549d772dbba9f650c"
21 24
22SRC_URI = "${SOURCEFORGE_MIRROR}/asio/${BP}.tar.bz2"
23
24PACKAGECONFIG ??= "boost" 25PACKAGECONFIG ??= "boost"
25 26
26PACKAGECONFIG[boost] = "--with-boost=${STAGING_LIBDIR},--without-boost,boost" 27PACKAGECONFIG[boost] = "--with-boost=${STAGING_LIBDIR},--without-boost,boost"
27 28
29TESTDIR = "src/tests"
30do_compile_ptest() {
31 echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile
32 oe_runmake -C ${TESTDIR} buildtest-TESTS
33}
34
35do_install_ptest() {
36 install -d ${D}${PTEST_PATH}/tests
37 # copy executables
38 find ${B}/${TESTDIR}/unit -type f -executable -exec cp {} ${D}${PTEST_PATH}/tests/ \;
39}
40
28BBCLASSEXTEND = "native nativesdk" 41BBCLASSEXTEND = "native nativesdk"