Skip to content

Generate junit per rspec thread

Steve Traylen requested to merge rspec into master

Multiple threads of rspec were writing into the same rspec.xml file. Gitlab was then unable to parse this file.

Note:

  • We have to put rspec_parallel erb in the configuration file since its evaluated by rspec itself. Consequently we cannot pass it in via SPEC_OPTS in CI only. The downside is that is when running rake parallel_rspec locally we generate the junit xml files as well but that is not such a problem.
  • <%% is for nested erb statements.

Thanks to @pigueira for pointing this fix out.

A test of this change (and the other things currently in HEAD) is available here - ai/it-puppet-module-bagplus!642 I think there are still problems passing some of the results but this is much better than it was before.

Second commit generates an rspec.xml for the rubocop results - the file is lacking in actual results - only contains a list of tests - worry about that later - it is still progress.

Edited by Steve Traylen

Merge request reports