Rename junit-formatter option to junit-output.
This commit is contained in:
parent
acae702c45
commit
7c16e65b4a
|
@ -25,7 +25,7 @@ else
|
|||
worker.max_requeues = config.max_requeues
|
||||
worker.queue_wait_timeout = config.queue_wait_timeout
|
||||
worker.fail_fast = config.fail_fast
|
||||
worker.junit_formatter = config.junit_formatter
|
||||
worker.junit_output = config.junit_output
|
||||
worker.seed = config.seed if config.seed
|
||||
worker.reproduction = config.reproduction
|
||||
worker.work
|
||||
|
|
|
@ -131,9 +131,11 @@ module RSpecQ
|
|||
opts[:reproduction] = v
|
||||
end
|
||||
|
||||
o.on("--junit-formatter filepath", String, "Output junit formatted xml " \
|
||||
"for CI suites to the defined file path.") do |v|
|
||||
opts[:junit_formatter] = v
|
||||
o.on("--junit-output filepath", String, "Output junit formatted xml " \
|
||||
"for CI suites to the defined file path. Substitution parameters " \
|
||||
"{{TEST_ENV_NUMBER}} - parallel gem proc number. " \
|
||||
"{{JOB_INDEX}} - increments with each suite that is run.") do |v|
|
||||
opts[:junit_output] = v
|
||||
end
|
||||
|
||||
o.on_tail("-h", "--help", "Show this message.") do
|
||||
|
@ -162,7 +164,7 @@ module RSpecQ
|
|||
opts[:redis_url] ||= ENV["RSPECQ_REDIS_URL"]
|
||||
opts[:fail_fast] ||= Integer(ENV["RSPECQ_FAIL_FAST"] || DEFAULT_FAIL_FAST)
|
||||
opts[:reproduction] ||= env_set?("RSPECQ_REPRODUCTION")
|
||||
opts[:junit_formatter] ||= ENV["RSPECQ_JUNIT_FORMATTER"]
|
||||
opts[:junit_output] ||= ENV["RSPECQ_JUNIT_OUTPUT"]
|
||||
end
|
||||
|
||||
def env_set?(var)
|
||||
|
|
|
@ -66,7 +66,7 @@ module RSpecQ
|
|||
# where TEST_ENV_NUMBER is substituted with the environment variable
|
||||
# from the gem parallel test, and JOB_INDEX is incremented based
|
||||
# on the number of test suites run in the current process.
|
||||
attr_accessor :junit_formatter
|
||||
attr_accessor :junit_output
|
||||
|
||||
# Optional arguments to pass along to rspec.
|
||||
#
|
||||
|
@ -88,7 +88,7 @@ module RSpecQ
|
|||
@queue_wait_timeout = 30
|
||||
@seed = srand && srand % 0xFFFF
|
||||
@reproduction = false
|
||||
@junit_formatter = nil
|
||||
@junit_output = nil
|
||||
|
||||
RSpec::Core::Formatters.register(Formatters::JobTimingRecorder, :dump_summary)
|
||||
RSpec::Core::Formatters.register(Formatters::ExampleCountRecorder, :dump_summary)
|
||||
|
@ -134,9 +134,9 @@ module RSpecQ
|
|||
RSpec.configuration.backtrace_formatter.filter_gem("rspecq")
|
||||
RSpec.configuration.add_formatter(Formatters::FailureRecorder.new(queue, job, max_requeues, @worker_id))
|
||||
|
||||
if junit_formatter
|
||||
if junit_output
|
||||
RSpec.configuration.add_formatter(Formatters::JUnitFormatter.new(queue, job, max_requeues,
|
||||
idx, junit_formatter))
|
||||
idx, junit_output))
|
||||
end
|
||||
|
||||
RSpec.configuration.add_formatter(Formatters::ExampleCountRecorder.new(queue))
|
||||
|
|
|
@ -144,9 +144,9 @@ class TestEndToEnd < RSpecQTest
|
|||
assert_equal 1, queue.example_count
|
||||
end
|
||||
|
||||
def test_suite_with_junit_formatter
|
||||
def test_suite_with_junit_output
|
||||
queue = exec_build("flakey_suite",
|
||||
"--junit-formatter test/test_results/test.{{JOB_INDEX}}.xml")
|
||||
"--junit-output test/test_results/test.{{JOB_INDEX}}.xml")
|
||||
|
||||
assert queue.build_successful?
|
||||
assert_processed_jobs [
|
||||
|
|
Loading…
Reference in New Issue