diff --git a/bin/test_debug b/bin/test_debug index 5e3147acb..f1dda8166 100755 --- a/bin/test_debug +++ b/bin/test_debug @@ -4,6 +4,6 @@ set -e # Exit on error make all ./run_herb_tests -NO_TIMEOUT=true bundle exec rake test +FORK_TESTS=true bundle exec rake test echo "Tests successful!" diff --git a/test/test_helper.rb b/test/test_helper.rb index 709515114..5d6dbfbb4 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -9,7 +9,11 @@ require "active_support/core_ext/string/output_safety" -require_relative "fork_helper" if ENV["NO_TIMEOUT"].nil? +if ENV["FORK_TESTS"] + require_relative "fork_helper" +else + puts "TIP: If a segfault in the native C extension crashes the test runner, run with FORK_TESTS=true to isolate each test in a forked process and identify which test causes the crash." +end require_relative "snapshot_utils" Minitest::Spec::DSL.send(:alias_method, :test, :it)