Method: Autoproj::CLI::CI#process_test_results_xunit

Defined in:
lib/autoproj/cli/ci.rb

#process_test_results_xunit(force: false, xunit_viewer: 'xunit-viewer') ⇒ Object

Process the package’s test results with xunit-viewer

Parameters:

  • xunit_viewer (String) (defaults to: 'xunit-viewer')

    path to xunit-viewer

  • force (Boolean) (defaults to: false)

    re-generation of the xunit-viewer output. If false, packages that already have a xunit-viewer output will be skipped



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/autoproj/cli/ci.rb', line 148

def process_test_results_xunit(force: false, xunit_viewer: 'xunit-viewer')
    consolidated_report['packages'].each_value do |info|
        next unless info['test']
        next unless (results_dir = info['test']['target_dir'])

        xunit_output = "#{results_dir}.html"
        next unless need_xunit_processing?(results_dir, xunit_output,
                                           force: force)

        success = system(xunit_viewer,
                         "--results=#{results_dir}",
                         "--output=#{xunit_output}")
        unless success
            Autoproj.warn 'xunit-viewer conversion failed '\
                          "for '#{results_dir}'"
        end
    end
end