Skip to content

Commit

Permalink
Ensure the patterns to retain MRI test exclusions are not matched aga…
Browse files Browse the repository at this point in the history
…inst the test name.
  • Loading branch information
nirvdrum committed Sep 24, 2024
1 parent 48e835c commit 6d05853
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tool/jt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1390,8 +1390,14 @@ def retag(*args)
FileUtils::Verbose.rm_r file

# We know some tests hang and odds are very good they're going to continue to hang, so let's keep those
# tests as excluded and manually inspect them later.
retain = lines.select { |line| MRI_TEST_RETAG_RETAIN_PATTERNS.any? { |pattern| line =~ pattern } }
# tests as excluded and manually inspect them later. We need to be careful that we're not checking for our
# retains pattern on the test name. Thus, we limit our checks to either the exclusion reason string or a
# conditional guard that applies to the exclusion.
retain = lines.select do |line|
reason_or_guard = line.split(',', 2).last

MRI_TEST_RETAG_RETAIN_PATTERNS.any? { |pattern| reason_or_guard =~ pattern }
end

puts 'Retaining:'
puts retain
Expand Down

0 comments on commit 6d05853

Please sign in to comment.