public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH] apt-util: Fix ptest on musl
Date: Tue, 18 Apr 2023 23:08:22 -0700	[thread overview]
Message-ID: <20230419060822.303817-1-raj.khem@gmail.com> (raw)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ion-Check-if-transform-is-supported-.patch | 37 +++++++++++++++++++
 meta/recipes-support/apr/apr-util_1.6.3.bb    |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch

diff --git a/meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch b/meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch
new file mode 100644
index 0000000000..261b78736f
--- /dev/null
+++ b/meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch
@@ -0,0 +1,37 @@
+From 3a97f58cfb40fc1911bbfd067e8457a472613d75 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 18 Apr 2023 22:58:00 -0700
+Subject: [PATCH] test_transformation: Check if transform is supported before
+ using it
+
+This helps in excluding these tests on systems where these are not
+available e.g. musl
+
+Upstream-Status: Submitted [https://bz.apache.org/bugzilla/show_bug.cgi?id=66570]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ test/testxlate.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/test/testxlate.c b/test/testxlate.c
+index 6981eff..de00fa4 100644
+--- a/test/testxlate.c
++++ b/test/testxlate.c
+@@ -116,8 +116,12 @@ static void test_transformation(abts_case *tc, void *data)
+     }
+ 
+     /* 4. Transformation using charset aliases */
+-    one_test(tc, "UTF-8", "UTF-7", test_utf8, test_utf7, p);
+-    one_test(tc, "UTF-7", "UTF-8", test_utf7, test_utf8, p);
++    if (is_transform_supported(tc, "UTF-8", "UTF-7", p)) {
++        one_test(tc, "UTF-8", "UTF-7", test_utf8, test_utf7, p);
++    }
++    if (is_transform_supported(tc, "UTF-7", "UTF-8", p)) {
++        one_test(tc, "UTF-7", "UTF-8", test_utf7, test_utf8, p);
++    }
+ }
+ 
+ #endif /* APR_HAS_XLATE */
+-- 
+2.40.0
+
diff --git a/meta/recipes-support/apr/apr-util_1.6.3.bb b/meta/recipes-support/apr/apr-util_1.6.3.bb
index 7c6fcc699b..1371e262dd 100644
--- a/meta/recipes-support/apr/apr-util_1.6.3.bb
+++ b/meta/recipes-support/apr/apr-util_1.6.3.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \
 SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
            file://configfix.patch \
            file://configure_fixes.patch \
+	   file://0001-test_transformation-Check-if-transform-is-supported-.patch \
            file://run-ptest \
            "
 
-- 
2.40.0



                 reply	other threads:[~2023-04-19  6:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230419060822.303817-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox