[前][次][番号順一覧][スレッド一覧]

ruby-changes:70804

From: Benoit <ko1@a...>
Date: Tue, 11 Jan 2022 00:30:51 +0900 (JST)
Subject: [ruby-changes:70804] 8abfc10605 (master): Update to ruby/mspec@3ea3d32

https://git.ruby-lang.org/ruby.git/commit/?id=8abfc10605

From 8abfc106058d09840d13f64e7e87cb7e40c3d6fa Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Mon, 10 Jan 2022 16:29:53 +0100
Subject: Update to ruby/mspec@3ea3d32

---
 spec/mspec/lib/mspec/runner/actions/timeout.rb | 15 ++++++++++++++-
 spec/mspec/tool/sync/sync-rubyspec.rb          |  2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/spec/mspec/lib/mspec/runner/actions/timeout.rb b/spec/mspec/lib/mspec/runner/actions/timeout.rb
index c85bf49ad3c..fd5578be877 100644
--- a/spec/mspec/lib/mspec/runner/actions/timeout.rb
+++ b/spec/mspec/lib/mspec/runner/actions/timeout.rb
@@ -36,8 +36,21 @@ class TimeoutAction https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/runner/actions/timeout.rb#L36
             elapsed = now - @started
             if elapsed > @timeout
               STDERR.puts "\n#{@current_state.description}"
+              STDERR.puts "Example took longer than the configured timeout of #{@timeout}s"
               STDERR.flush
-              abort "Example took longer than the configured timeout of #{@timeout}s"
+
+              if RUBY_ENGINE == 'truffleruby'
+                STDERR.puts 'Java stacktraces:'
+                Process.kill :SIGQUIT, Process.pid
+                sleep 1
+
+                if defined?(Truffle::Debug.show_backtraces)
+                  STDERR.puts "\nRuby backtraces:"
+                  Truffle::Debug.show_backtraces
+                end
+              end
+
+              exit 2
             end
           end
         end
diff --git a/spec/mspec/tool/sync/sync-rubyspec.rb b/spec/mspec/tool/sync/sync-rubyspec.rb
index b4c79d2afc9..13f1d8004dc 100644
--- a/spec/mspec/tool/sync/sync-rubyspec.rb
+++ b/spec/mspec/tool/sync/sync-rubyspec.rb
@@ -20,7 +20,7 @@ IMPLS = { https://github.com/ruby/ruby/blob/trunk/spec/mspec/tool/sync/sync-rubyspec.rb#L20
 
 MSPEC = ARGV.delete('--mspec')
 
-CHECK_LAST_MERGE = ENV['CHECK_LAST_MERGE'] != 'false'
+CHECK_LAST_MERGE = !MSPEC && ENV['CHECK_LAST_MERGE'] != 'false'
 TEST_MASTER = ENV['TEST_MASTER'] != 'false'
 
 MSPEC_REPO = File.expand_path("../../..", __FILE__)
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]