Skip to content

Commit 74e2b6b

Browse files
eregonandrykonchin
authored andcommitted
Run MRI tests in a deterministic order
* Keeps the exclusion tags in consistent order. * More reliable and easier to reproduce.
1 parent 3068280 commit 74e2b6b

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
exclude :test_single_pattern_error_alternative_pattern, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
2-
exclude :test_single_pattern_error_array_pattern, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
3-
exclude :test_single_pattern_error_guard_clause, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
4-
exclude :test_var_pattern, "/home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:243:in `test_var_pattern'."
51
exclude :test_alternative_pattern, "/home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:204:in `test_alternative_pattern'."
62
exclude :test_invalid_syntax, "/home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:1269:in `test_invalid_syntax'."
7-
exclude :test_deconstruct_keys, "Failed assertion, no message given."
3+
exclude :test_literal_value_pattern, "/home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:347:in `test_literal_value_pattern'."
4+
exclude :test_single_pattern_error_alternative_pattern, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
5+
exclude :test_single_pattern_error_array_pattern, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
86
exclude :test_single_pattern_error_as_pattern, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
9-
exclude :test_single_pattern_error_value_pattern, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
7+
exclude :test_single_pattern_error_guard_clause, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
108
exclude :test_single_pattern_error_hash_pattern, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
11-
exclude :test_literal_value_pattern, "/home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:347:in `test_literal_value_pattern'."
9+
exclude :test_single_pattern_error_value_pattern, "Expected Exception(NoMatchingPatternError) was raised, but the message doesn't match."
10+
exclude :test_var_pattern, "/home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:243:in `test_var_pattern'."
11+
exclude :test_array_pattern, "NoMatchingPatternError: #<TestPatternMatching::C:0x578 @obj=[0]>"
12+
exclude :test_deconstruct_cache, "SyntaxError: /home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:1451: YARPBlockNodeTranslator does not know how to translate FindPatternNode at /home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:1451"
1213
exclude :test_find_pattern, "SyntaxError: /home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:806: YARPDefNodeTranslator does not know how to translate FindPatternNode at /home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:806"
13-
exclude :test_hash_pattern, "NoMatchingPatternError: #<TestPatternMatching::C:0x708 @obj={:a=>0}>"
14-
exclude :test_array_pattern, "NoMatchingPatternError: #<TestPatternMatching::C:0x758 @obj=[0]>"
14+
exclude :test_hash_pattern, "NoMatchingPatternError: #<TestPatternMatching::C:0x778 @obj={:a=>0}>"
1515
exclude :test_single_pattern_error_find_pattern, "SyntaxError: /home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:1623: YARPBlockNodeTranslator does not know how to translate FindPatternNode at /home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:1623"
16-
exclude :test_deconstruct_cache, "SyntaxError: /home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:1451: YARPBlockNodeTranslator does not know how to translate FindPatternNode at /home/eregon/code/truffleruby-ws/truffleruby/test/mri/tests/ruby/test_pattern_matching.rb:1451"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exclude :test_refinements, "NoMatchingPatternError: #<TestPatternMatching::TestPatternMatchingRefinements::C1:0x9b8>"
1+
exclude :test_refinements, "NoMatchingPatternError: #<TestPatternMatching::TestPatternMatchingRefinements::C1:0xa58>"

tool/jt.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ def test_unit(*rest)
13631363
end
13641364
end
13651365

1366-
command = %w[test/mri/tests/runner.rb -v --color=never --tty=no -q]
1366+
command = %w[test/mri/tests/runner.rb -v --test-order=sorted --color=never --tty=no -q]
13671367
command.unshift("-I#{TRUFFLERUBY_DIR}/.ext") if !cext_tests.empty?
13681368
run_ruby(env_vars, *extra_args, *command, *test_files, *runner_args, run_options)
13691369
end

0 commit comments

Comments
 (0)