All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] ruby: some ptest fixes
Date: Tue,  1 Oct 2019 15:29:56 +0100	[thread overview]
Message-ID: <20191001142956.39512-1-git@andred.net> (raw)
In-Reply-To: <20191001095452.37335-5-git@andred.net>

From: André Draszik <andre.draszik@jci.com>

* the (new?) ruby expects some additional compiled libraries
  to run, so we need to copy them as part of ptest.
  Fixes errors like:
  # ruby ./runner.rb ./-ext-/vm/test_at_exit.rb
  Run options:

  # Running tests:

  [1/1] TestVM#test_at_exit = 0.06 s
    1) Failure:
  TestVM#test_at_exit [/usr/lib/ruby/ptest/test/-ext-/vm/test_at_exit.rb:7]:

  1. [1/2] Assertion for "stdout"
     | <["begin", "end"]> expected but was
     | <[]>.

  2. [2/2] Assertion for "stderr"
     | <[]> expected but was
     | <["-:1:in `require': cannot load such file -- -test-/vm/at_exit (LoadError)",
     |  "\tfrom -:1:in `<main>'"]>.

* the 'erb' test can't find the erb binary, as we're not
  running this from within the build directory

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 meta/recipes-devtools/ruby/ruby_2.6.4.bb | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/ruby/ruby_2.6.4.bb b/meta/recipes-devtools/ruby/ruby_2.6.4.bb
index 4554487c0a..fb202b8f1f 100644
--- a/meta/recipes-devtools/ruby/ruby_2.6.4.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.6.4.bb
@@ -44,6 +44,14 @@ do_install_append_class-target () {
 
 do_install_ptest () {
     cp -rf ${S}/test ${D}${PTEST_PATH}/
+    # install test-binaries
+    find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \
+        | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \
+        | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf -
+    # adjust path to not assume build directory layout
+    sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \
+        -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb
+
     cp -r ${S}/include ${D}/${libdir}/ruby/
     test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list`
     sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb
@@ -61,6 +69,9 @@ FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
 
 FILES_${PN} += "${datadir}/rubygems"
 
-FILES_${PN}-ptest_append_class-target += "${libdir}/ruby/include"
+FILES_${PN}-ptest_append_class-target = "\
+    ${libdir}/ruby/include \
+    ${libdir}/ruby/${SHRT_VER}.0/*/-test- \
+"
 
 BBCLASSEXTEND = "native"
-- 
2.23.0.rc1



  reply	other threads:[~2019-10-01 14:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01  9:54 [PATCH v3 0/4] ruby recipe updates André Draszik
2019-10-01  9:54 ` [PATCH v3 1/4] ruby: drop long-merged CVE patches André Draszik
2019-10-01  9:54 ` [PATCH v3 2/4] ruby: configure mis-detects isnan/isinf on musl André Draszik
2019-10-01  9:54 ` [PATCH v3 3/4] ruby: fix non-IPv6 support André Draszik
2019-10-01  9:54 ` [PATCH v3 4/4] ruby: update to v2.6.4 André Draszik
2019-10-01 14:29   ` André Draszik [this message]
2019-10-01 11:55 ` [PATCH v3 0/4] ruby recipe updates Ross Burton
2019-10-01 15:02 ` ✗ patchtest: failure for ruby recipe updates (rev2) Patchwork
2019-10-01 15:24   ` André Draszik
  -- strict thread matches above, loose matches on Subject: below --
2025-07-10  9:36 [PATCH] ruby: some ptest fixes jiaying.song.cn

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=20191001142956.39512-1-git@andred.net \
    --to=git@andred.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.