update ceedling to 0.29.0

This commit is contained in:
hathach
2019-11-01 17:48:59 +07:00
parent 774a9f63ab
commit b25faa97c2
59 changed files with 1962 additions and 736 deletions

View File

@@ -22,7 +22,10 @@ class JunitTestsReport < Plugin
def post_build
@results_list.each_key do |context|
results = @ceedling[:plugin_reportinator].assemble_test_results(@results_list[context])
file_path = File.join( PROJECT_BUILD_ARTIFACTS_ROOT, context.to_s, 'report.xml' )
artifact_filename = @ceedling[:configurator].project_config_hash[:junit_tests_report_artifact_filename] || 'report.xml'
artifact_fullpath = @ceedling[:configurator].project_config_hash[:junit_tests_report_path] || File.join(PROJECT_BUILD_ARTIFACTS_ROOT, context.to_s)
file_path = File.join(artifact_fullpath, artifact_filename)
@ceedling[:file_wrapper].open( file_path, 'w' ) do |f|
@testsuite_counter = 0
@@ -90,7 +93,14 @@ class JunitTestsReport < Plugin
unless suite[:stdout].empty?
stream.puts(' <system-out>')
suite[:stdout].each{|line| stream.puts line }
suite[:stdout].each do |line|
line.gsub!(/&/, '&amp;')
line.gsub!(/</, '&lt;')
line.gsub!(/>/, '&gt;')
line.gsub!(/"/, '&quot;')
line.gsub!(/'/, '&apos;')
stream.puts(line)
end
stream.puts(' </system-out>')
end
@@ -98,6 +108,7 @@ class JunitTestsReport < Plugin
end
def write_test( test, stream )
test[:test].gsub!('"', '&quot;')
case test[:result]
when :success
stream.puts(' <testcase name="%<test>s" />' % test)