43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# File 'lib/fastlane/plugin/retry_tests/helper/correcting_scan_helper.rb', line 43
def scan_testable(testable)
tests_passed = true
reportnamer = ReportNameHelper.new(
@given_output_types,
@given_output_files,
@given_custom_report_file_name
)
output_directory = @output_directory
testable_tests = @test_collector.testables_tests[testable]
if @batch_count > 1 || @testables_count > 1
current_batch = 1
testable_tests.each_slice((testable_tests.length / @batch_count.to_f).round).to_a.each do |tests_batch|
if @testables_count > 1
output_directory = File.join(@output_directory, "results-#{testable}")
end
FastlaneCore::UI.("Starting test run on testable '#{testable}'")
tests_passed = correcting_scan(
{
only_testing: tests_batch,
output_directory: output_directory
},
current_batch,
reportnamer
) && tests_passed
current_batch += 1
reportnamer.increment
end
else
options = {
output_directory: output_directory,
only_testing: testable_tests
}
tests_passed = correcting_scan(options, 1, reportnamer) && tests_passed
end
collate_reports(output_directory, reportnamer)
tests_passed
end
|