Skip to content

Commit

Permalink
Rakefile: Update the test task to pass on s390x CPU architecture.
Browse files Browse the repository at this point in the history
This commit is a rework for the commit 9f3b9c4
that is a workaround fixing test failures on Ubuntu jammy s390x.

This commit simplifies the workaround. Read the commit message for the commit
9f3b9c4 for details of the issue.
  • Loading branch information
junaruga committed Sep 29, 2023
1 parent 3dfe3f9 commit 76e1eb4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
require "bundler/gem_tasks"
require "rake/testtask"

Rake::TestTask.new(:test) do |t|
desc "Run tests"
task :test do
# Avoid possible test failures with the zlib applying the following patch on
# s390x CPU architecture.
# https://github.com/madler/zlib/pull/410
ENV["DFLTCC"] = "0" if RUBY_PLATFORM =~ /s390x/
Rake::Task["test_internal"].invoke
end

Rake::TestTask.new(:test_internal) do |t|
t.libs << "test/lib"
t.ruby_opts << "-rhelper"
t.test_files = FileList["test/**/test_*.rb"]
Expand Down

0 comments on commit 76e1eb4

Please sign in to comment.