summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_generator_json_index.rb
diff options
context:
space:
mode:
authorJun Aruga <[email protected]>2023-10-30 16:32:37 +0100
committergit <[email protected]>2023-11-03 10:30:28 +0000
commit1f1b9b0942ec12dde1af8000f8cb84692904fccc (patch)
tree0a040bf8747ccc0841d769c51f41a0214a74176f /test/rdoc/test_rdoc_generator_json_index.rb
parentdcb9ded6c9148a31361ba2318ed7d57fd0c41431 (diff)
[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
Diffstat (limited to 'test/rdoc/test_rdoc_generator_json_index.rb')
-rw-r--r--test/rdoc/test_rdoc_generator_json_index.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_generator_json_index.rb b/test/rdoc/test_rdoc_generator_json_index.rb
index 30b9a4d174..62d1ccec95 100644
--- a/test/rdoc/test_rdoc_generator_json_index.rb
+++ b/test/rdoc/test_rdoc_generator_json_index.rb
@@ -104,6 +104,18 @@ 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_equal orig_file.mtime.inspect, generated_file.mtime.inspect,
'.js files should be the same timestamp of original'