Commit e5a5bc2f authored by Harald Sitter's avatar Harald Sitter 🌼

fix generation and log raw data of the case

parent 5601b315
......@@ -36,12 +36,19 @@ class JUnit
def initialize(detail)
super() = detail.fetch('needle')
# FIXME: we are fetching the tags here because we have no way to either
# iterate on the tags or the needles right now. Also, the needle format
# is somewhat inconsistent.
# Sometimes it is a flat with needle being a property of the detail
# and other times it is a needles array with multiple needles that have
# a name property.
# Not entirely sure how to best handle this. = detail.fetch('tags').fetch(0)
self.result = RESULT_MAP.fetch(detail.fetch('result'))
return unless BUILD_URL
screenshot = detail.fetch('screenshot')
system_out.message = "#{BUILD_URL}/artifact/wok/testresults/#{screenshot}"
system_err.message = "#{BUILD_URL}/artifact/wok/testresults/#{screenshot}"
system_err.message = JSON.pretty_generate(detail)
......@@ -62,8 +69,11 @@ class JUnit
next if detail.fetch('result') == 'unk'
# Discard bits that aren't needles.
# TYY waiting for example is also logged, but we don't care particlarly.
next unless detail['needle']
# See Case ctor for why there are two properties here.
next unless detail['needle'] || detail['needles']
c = = format('%03d_%s', @cases.size, c)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment