Sha256: 4e6a97217f4332f4ff42fb8b7948325fe20bbce5c98ae2d85565884686ccbebc
Contents?: true
Size: 1.02 KB
Versions: 43
Compression:
Stored size: 1.02 KB
Contents
module Fastlane class JUnitGenerator def self.generate(results) # JUnit file documentation: http://llg.cubic.org/docs/junit/ # And http://nelsonwells.net/2012/09/how-jenkins-ci-parses-and-displays-junit-output/ # And http://windyroad.com.au/dl/Open%20Source/JUnit.xsd containing_folder = ENV['FL_REPORT_PATH'] || Fastlane::FastlaneFolder.path || Dir.pwd path = File.join(containing_folder, 'report.xml') @steps = results xml_path = File.join(lib_path, "assets/report_template.xml.erb") xml = ERB.new(File.read(xml_path)).result(binding) # http://www.rrn.dk/rubys-erb-templating-system xml = xml.gsub('system_', 'system-').delete("\e") # Jenkins can not parse 'ESC' symbol File.write(path, xml) return path end def self.lib_path if !Helper.is_test? and Gem::Specification.find_all_by_name('fastlane').any? return [Gem::Specification.find_by_name('fastlane').gem_dir, 'lib'].join('/') else return './lib' end end end end
Version data entries
43 entries across 43 versions & 1 rubygems
Version | Path |
---|---|
fastlane-1.59.0 | lib/fastlane/junit_generator.rb |
fastlane-1.58.0 | lib/fastlane/junit_generator.rb |
fastlane-1.57.0 | lib/fastlane/junit_generator.rb |