module MesonJunit::CLI

Command-line interface.

Public Class Methods

run(app, args) click to toggle source

Allow command-line invocation.

# File lib/meson-junit/cli.rb, line 8
def self.run(app, args)
  # TODO: parse command-line arguments

  # parse meson test log json from standard input
  log = MesonJunit::Meson::TestLog.new(STDIN)

  # build junit xml from meson testlog
  xml = MesonJunit::Junit::XMLBuilder.build(log)

  # write xml to standard output
  puts xml
end