Skip to content

Commit b21dafd

Browse files
committed
fix
1 parent d6855cc commit b21dafd

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

tool/lib/test/unit.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,19 @@ def record(suite, method, assertions, time, error, source_location = nil)
14521452
def setup_options(opts, options)
14531453
super
14541454
opts.on_tail '--launchable-test-reports=PATH', String, 'Report test results in Launchable JSON format' do |path|
1455-
require_relative '../launchable'
1455+
begin
1456+
require_relative '../launchable'
1457+
rescue LoadError
1458+
# The following error sometimes happens, so we're going to skip writing Launchable report files in this case.
1459+
#
1460+
# ```
1461+
# /tmp/tmp.bISss9CtXZ/.ext/common/json/ext.rb:15:in 'Kernel#require':
1462+
# /tmp/tmp.bISss9CtXZ/.ext/x86_64-linux/json/ext/parser.so:
1463+
# undefined symbol: ruby_abi_version - ruby_abi_version (LoadError)
1464+
# ```
1465+
#
1466+
return true
1467+
end
14561468
options[:launchable_test_reports] = writer = Launchable::JsonStreamWriter.new(path)
14571469
writer.write_array('testCases')
14581470
main_pid = Process.pid

0 commit comments

Comments
 (0)