diff options
3 files changed, 36 insertions, 1 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/0007-Skip-test_rm_r_no_permissions-test-under-root.patch b/meta/recipes-devtools/ruby/ruby/0007-Skip-test_rm_r_no_permissions-test-under-root.patch new file mode 100644 index 0000000000..e3574f1a81 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/0007-Skip-test_rm_r_no_permissions-test-under-root.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 9c4748aae4f69390a36875aa27d70c3c632ae944 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jiaying Song <jiaying.song.cn@windriver.com> | ||
3 | Date: Mon, 7 Jul 2025 15:05:57 +0800 | ||
4 | Subject: [PATCH] Skip test_rm_r_no_permissions test under root | ||
5 | |||
6 | Skip test_rm_r_no_permissions test under root user and Windows environments since deletion always succeeds. | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/ruby/ruby/pull/13828/commits/c510b5ac475e6d3eef935725d21910861816b7a9] | ||
9 | |||
10 | Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com> | ||
11 | --- | ||
12 | test/fileutils/test_fileutils.rb | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb | ||
16 | index d2096a0..80e3368 100644 | ||
17 | --- a/test/fileutils/test_fileutils.rb | ||
18 | +++ b/test/fileutils/test_fileutils.rb | ||
19 | @@ -768,8 +768,8 @@ class TestFileUtils < Test::Unit::TestCase | ||
20 | |||
21 | def test_rm_r_no_permissions | ||
22 | check_singleton :rm_rf | ||
23 | - | ||
24 | - return if /mswin|mingw/ =~ RUBY_PLATFORM | ||
25 | + | ||
26 | + return if Process.uid == 0 || /mswin|mingw/ =~ RUBY_PLATFORM | ||
27 | |||
28 | mkdir 'tmpdatadir' | ||
29 | touch 'tmpdatadir/tmpdata' | ||
30 | -- | ||
31 | 2.34.1 | ||
32 | |||
diff --git a/meta/recipes-devtools/ruby/ruby/run-ptest b/meta/recipes-devtools/ruby/ruby/run-ptest index de7c415aba..17404e3509 100644 --- a/meta/recipes-devtools/ruby/ruby/run-ptest +++ b/meta/recipes-devtools/ruby/ruby/run-ptest | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | test_fullname=`find test -name test_*.rb` | 3 | test_fullname=$(find test -name test_*.rb | grep -v '/-ext-/') |
4 | 4 | ||
5 | for i in ${test_fullname}; do | 5 | for i in ${test_fullname}; do |
6 | ruby ./test/runner.rb ${i} 2>&1 > /dev/null | 6 | ruby ./test/runner.rb ${i} 2>&1 > /dev/null |
diff --git a/meta/recipes-devtools/ruby/ruby_3.4.4.bb b/meta/recipes-devtools/ruby/ruby_3.4.4.bb index 39e86fdd28..c532403339 100644 --- a/meta/recipes-devtools/ruby/ruby_3.4.4.bb +++ b/meta/recipes-devtools/ruby/ruby_3.4.4.bb | |||
@@ -27,6 +27,7 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ | |||
27 | file://0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch \ | 27 | file://0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch \ |
28 | file://0006-Make-gemspecs-reproducible.patch \ | 28 | file://0006-Make-gemspecs-reproducible.patch \ |
29 | file://0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch \ | 29 | file://0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch \ |
30 | file://0007-Skip-test_rm_r_no_permissions-test-under-root.patch \ | ||
30 | " | 31 | " |
31 | UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" | 32 | UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" |
32 | 33 | ||
@@ -104,6 +105,8 @@ do_install_ptest () { | |||
104 | cp -r ${S}/tool/lib ${D}${PTEST_PATH}/tool/ | 105 | cp -r ${S}/tool/lib ${D}${PTEST_PATH}/tool/ |
105 | mkdir -p ${D}${PTEST_PATH}/lib | 106 | mkdir -p ${D}${PTEST_PATH}/lib |
106 | cp -r ${S}/lib/did_you_mean ${S}/lib/rdoc ${D}${PTEST_PATH}/lib | 107 | cp -r ${S}/lib/did_you_mean ${S}/lib/rdoc ${D}${PTEST_PATH}/lib |
108 | cp ${D}${libdir}/ruby/${SHRT_VER}.0/rdoc.rb ${D}${PTEST_PATH}/lib | ||
109 | cp ${D}${libdir}/ruby/${SHRT_VER}.0/did_you_mean.rb ${D}${PTEST_PATH}/lib | ||
107 | 110 | ||
108 | # install test-binaries | 111 | # install test-binaries |
109 | # These .so files have sporadic reproducibility fails as seen here: | 112 | # These .so files have sporadic reproducibility fails as seen here: |