Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit e2c19ca

Browse files
Less certainty in bisect dependency check output
Since we can't consider the dependency check to have proved the existence of an order-dependent failure, make the output less categorical.
1 parent dc7fb70 commit e2c19ca

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

features/command_line/bisect.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Feature: Bisect
5454
Bisect started using options: "--seed 1234"
5555
Running suite to find failures... (0.16755 seconds)
5656
Starting bisect with 1 failing example and 9 non-failing examples.
57-
Checking that failures are order-dependent... failure is order-dependent
57+
Checking that failure(s) are order-dependent... failure appears to be order-dependent
5858
5959
Bisecting over non-failing examples 1-9 .. ignoring examples 6-9 (0.30166 seconds)
6060
Bisecting over non-failing examples 1-5 .. ignoring examples 4-5 (0.30306 seconds)
@@ -75,7 +75,7 @@ Feature: Bisect
7575
Bisect started using options: "--seed 1234"
7676
Running suite to find failures... (0.17102 seconds)
7777
Starting bisect with 1 failing example and 9 non-failing examples.
78-
Checking that failures are order-dependent... failure is order-dependent
78+
Checking that failure(s) are order-dependent... failure appears to be order-dependent
7979
8080
Bisecting over non-failing examples 1-9 .. ignoring examples 6-9 (0.32943 seconds)
8181
Bisecting over non-failing examples 1-5 .. ignoring examples 4-5 (0.3154 seconds)
@@ -107,8 +107,8 @@ Feature: Bisect
107107
- ./spec/calculator_7_spec.rb[1:1]
108108
- ./spec/calculator_8_spec.rb[1:1]
109109
- ./spec/calculator_9_spec.rb[1:1]
110-
Checking that failures are order-dependent..
111-
- Running: rspec ./spec/calculator_1_spec.rb[1:1] --seed 1234 (n.nnnn seconds) failure is order-dependent
110+
Checking that failure(s) are order-dependent..
111+
- Running: rspec ./spec/calculator_1_spec.rb[1:1] --seed 1234 (n.nnnn seconds) failure appears to be order-dependent
112112
113113
Bisecting over non-failing examples 1-9
114114
- Running: rspec ./spec/calculator_1_spec.rb[1:1] ./spec/calculator_6_spec.rb[1:1] ./spec/calculator_7_spec.rb[1:1] ./spec/calculator_8_spec.rb[1:1] ./spec/calculator_9_spec.rb[1:1] --seed 1234 (0.15302 seconds)

lib/rspec/core/bisect/example_minimizer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ def find_minimal_repro
3030
def bisect(candidate_ids)
3131
notify(:bisect_dependency_check_started)
3232
if get_expected_failures_for?([])
33-
notify(:bisect_dependency_check_finished, :dependent_failures => false)
33+
notify(:bisect_dependency_check_failed)
3434
self.remaining_ids = []
3535
return
3636
end
37-
notify(:bisect_dependency_check_finished, :dependent_failures => true)
37+
notify(:bisect_dependency_check_passed)
3838

3939
bisect_over(candidate_ids)
4040
end

lib/rspec/core/formatters/bisect_progress_formatter.rb

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class BisectProgressFormatter < BaseTextFormatter
1111
:bisect_round_started, :bisect_individual_run_complete,
1212
:bisect_complete, :bisect_repro_command,
1313
:bisect_failed, :bisect_aborted, :bisect_ignoring_ids,
14-
:bisect_dependency_check_started, :bisect_dependency_check_finished,
15-
:bisect_multiple_culprits_detected
14+
:bisect_dependency_check_started, :bisect_dependency_check_passed,
15+
:bisect_dependency_check_failed, :bisect_multiple_culprits_detected
1616

1717
def bisect_starting(notification)
1818
options = notification.original_cli_args.join(' ')
@@ -29,12 +29,15 @@ def bisect_original_run_complete(notification)
2929
end
3030

3131
def bisect_dependency_check_started(_notification)
32-
output.print "Checking that failures are order-dependent.."
32+
output.print "Checking that failure(s) are order-dependent.."
3333
end
3434

35-
def bisect_dependency_check_finished(notification)
36-
is_part = notification.dependent_failures ? "is" : "is not"
37-
output.puts " failure #{is_part} order-dependent"
35+
def bisect_dependency_check_passed(notification)
36+
output.puts " failure appears to be order-dependent"
37+
end
38+
39+
def bisect_dependency_check_failed(notification)
40+
output.puts " failure is not order-dependent"
3841
end
3942

4043
def bisect_round_started(notification, include_trailing_space=true)

spec/rspec/core/bisect/coordinator_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def find_minimal_repro(output, formatter=Formatters::BisectProgressFormatter)
3434
|Bisect started using options: ""
3535
|Running suite to find failures... (n.nnnn seconds)
3636
|Starting bisect with 2 failing examples and 6 non-failing examples.
37-
|Checking that failures are order-dependent... failure is order-dependent
37+
|Checking that failure(s) are order-dependent... failure appears to be order-dependent
3838
|
3939
|Bisecting over non-failing examples 1-6 .. ignoring examples 4-6 (n.nnnn seconds)
4040
|Bisecting over non-failing examples 1-3 .. multiple culprits detected - splitting candidates (n.nnnn seconds)
@@ -56,7 +56,7 @@ def find_minimal_repro(output, formatter=Formatters::BisectProgressFormatter)
5656
|Bisect started using options: ""
5757
|Running suite to find failures... (n.nnnn seconds)
5858
|Starting bisect with 1 failing example and 7 non-failing examples.
59-
|Checking that failures are order-dependent... failure is not order-dependent
59+
|Checking that failure(s) are order-dependent... failure is not order-dependent
6060
|
6161
|Bisect complete! Reduced necessary non-failing examples from 7 to 0 in n.nnnn seconds.
6262
|
@@ -83,8 +83,8 @@ def find_minimal_repro(output, formatter=Formatters::BisectProgressFormatter)
8383
| - 6.rb[1:1]
8484
| - 7.rb[1:1]
8585
| - 8.rb[1:1]
86-
|Checking that failures are order-dependent..
87-
| - Running: rspec 2.rb[1:1] 5.rb[1:1] (n.nnnn seconds) failure is order-dependent
86+
|Checking that failure(s) are order-dependent..
87+
| - Running: rspec 2.rb[1:1] 5.rb[1:1] (n.nnnn seconds) failure appears to be order-dependent
8888
|
8989
|Bisecting over non-failing examples 1-6
9090
| - Running: rspec 2.rb[1:1] 5.rb[1:1] 6.rb[1:1] 7.rb[1:1] 8.rb[1:1] (n.nnnn seconds)
@@ -150,7 +150,7 @@ def bisect_round_started(notification)
150150
|Bisect started using options: ""
151151
|Running suite to find failures... (n.nnnn seconds)
152152
|Starting bisect with 2 failing examples and 6 non-failing examples.
153-
|Checking that failures are order-dependent... failure is order-dependent
153+
|Checking that failure(s) are order-dependent... failure appears to be order-dependent
154154
|
155155
|Bisecting over non-failing examples 1-6 .. ignoring examples 4-6 (n.nnnn seconds)
156156
|

0 commit comments

Comments
 (0)