From d9f4f321c60ecd8f569c383a3a63f952fd764f48 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sun, 19 Nov 2023 22:02:55 +0900 Subject: [PATCH] merge revision(s) 674db715f5a141891a66e67004ca138696d3b0ad,1f1b9b0942ec12dde1af8000f8cb84692904fccc: [ruby/rdoc] test/rdoc/test_rdoc_generator_json_index.rb: Use assert_equal instead of assert. It's better because assert_equal prints the values when it fails. https://github.com/ruby/rdoc/commit/91d40ce8f8 --- test/rdoc/test_rdoc_generator_json_index.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/rdoc] test/rdoc/test_rdoc_generator_json_index.rb: pend in test_generate in ppc64le. We observed that this test randomly fails in the ruby/ruby Travis ppc64le case. This commit is to pend the test_generate if the assertion for the generated file's modified time fails in a ppc64le environment. Note that I didn't use the word "Travis CI" or Travis CI specific environment variables such as `TRAVIS` and `TRAVIS_CPU_ARCH`[1] in the code. Because I wanted to prioritize the rdoc's independence from the ruby/ruby. [1] https://docs.travis-ci.com/user/environment-variables/#default-environment-variables https://github.com/ruby/rdoc/commit/42cdad1cf2 --- test/rdoc/test_rdoc_generator_json_index.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- test/rdoc/test_rdoc_generator_json_index.rb | 14 +++++++++++++- version.h | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/test/rdoc/test_rdoc_generator_json_index.rb b/test/rdoc/test_rdoc_generator_json_index.rb index 6b69337b45..62d1ccec95 100644 --- a/test/rdoc/test_rdoc_generator_json_index.rb +++ b/test/rdoc/test_rdoc_generator_json_index.rb @@ -104,8 +104,20 @@ class TestRDocGeneratorJsonIndex < RDoc::TestCase orig_file = Pathname(File.join srcdir, 'generator/template/json_index/js/navigation.js') generated_file = Pathname(File.join @tmpdir, 'js/navigation.js') + # The following assertion for the generated file's modified time randomly + # fails in a ppc64le environment. + # https://github.com/ruby/rdoc/issues/1048 + if orig_file.mtime.inspect != generated_file.mtime.inspect && + RUBY_PLATFORM =~ /powerpc64le/ + pend <<~EOC + Unstable test in ppc64le. + <#{orig_file.mtime.inspect}> expected but was + <#{generated_file.mtime.inspect}>. + EOC + end + # This is dirty hack on JRuby - assert orig_file.mtime.inspect == generated_file.mtime.inspect, + assert_equal orig_file.mtime.inspect, generated_file.mtime.inspect, '.js files should be the same timestamp of original' json = File.read 'js/search_index.js' diff --git a/version.h b/version.h index 454082cfb0..7d10cf0ac6 100644 --- a/version.h +++ b/version.h @@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 2 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 132 +#define RUBY_PATCHLEVEL 133 #include "ruby/version.h" #include "ruby/internal/abi.h"