Changeset View
Changeset View
Standalone View
Standalone View
src/unit/parser/ArcanistXUnitTestResultParser.php
Show All 21 Lines | if (!strlen($test_results)) { | ||||
'parseTestResults()')); | 'parseTestResults()')); | ||||
} | } | ||||
// xunit xsd: https://gist.github.com/959290 | // xunit xsd: https://gist.github.com/959290 | ||||
$xunit_dom = new DOMDocument(); | $xunit_dom = new DOMDocument(); | ||||
$load_success = @$xunit_dom->loadXML($test_results); | $load_success = @$xunit_dom->loadXML($test_results); | ||||
if (!$load_success) { | if (!$load_success) { | ||||
$input_start = id(new PhutilUTF8StringTruncator()) | $input_start = (new PhutilUTF8StringTruncator()) | ||||
->setMaximumGlyphs(150) | ->setMaximumGlyphs(150) | ||||
->truncateString($test_results); | ->truncateString($test_results); | ||||
throw new Exception( | throw new Exception( | ||||
sprintf( | sprintf( | ||||
"%s\n\n%s", | "%s\n\n%s", | ||||
pht('Failed to load XUnit report; Input starts with:'), | pht('Failed to load XUnit report; Input starts with:'), | ||||
$input_start)); | $input_start)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0