mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Fix duplicate failure reporting in auto sections
This commit is contained in:
@@ -129,6 +129,9 @@ class TestLogger:
|
||||
self.rawprint("!! " + message)
|
||||
|
||||
def failure(self, ex):
|
||||
if self.section_failed:
|
||||
return
|
||||
|
||||
self.failed = self.section_failed = True
|
||||
|
||||
if ex is TestFailureException:
|
||||
|
||||
@@ -79,6 +79,7 @@ document.body.onload = function() {
|
||||
var commit = "v1.x";
|
||||
var basepath = "util/test/";
|
||||
var last_test = '';
|
||||
var unwind_failure_indent = 0;
|
||||
|
||||
for(var i=0; i < lines.length; i++) {
|
||||
var line = lines[i].replace(/\t/g, ' ');
|
||||
@@ -113,11 +114,7 @@ document.body.onload = function() {
|
||||
html += '<div class="failure"><span class="message">' + htmlEntityEncode(m[2]) + '</span>';
|
||||
} else if(m[1] == '!-') {
|
||||
html += '</div>';
|
||||
while(indent > 4)
|
||||
{
|
||||
indent -= 4;
|
||||
html += '</div></div>';
|
||||
}
|
||||
unwind_failure_indent = indent;
|
||||
} else if(m[1] == '!!') {
|
||||
html += '<div class="failure message">' + htmlEntityEncode(m[2]) + '</div>';
|
||||
} else if(m[1] == '**') {
|
||||
@@ -191,6 +188,17 @@ document.body.onload = function() {
|
||||
html += start ? '<div class="expandable"><span class="expandtoggle"></span><div class="title">' + words.slice(1).join(' ') + '</div><div class="contents"><pre>' : '</pre></div></div>';
|
||||
instack = start;
|
||||
} else if(words[0] == 'Test') {
|
||||
while(!start && unwind_failure_indent > 4)
|
||||
{
|
||||
unwind_failure_indent -= 4;
|
||||
html += '</div></div>';
|
||||
|
||||
if(!start && unwind_failure_indent <= 4) {
|
||||
html += '<div class="failed"></div>';
|
||||
unwind_failure_indent = 0;
|
||||
}
|
||||
}
|
||||
|
||||
test_name = words[1];
|
||||
test_list.push(test_name)
|
||||
html += start ? '<div class="expandable test" id="' + test_name + '"><span class="expandtoggle"></span><div class="title">Test: ' + test_name + '</div><div class="contents">' : '</div></div>';
|
||||
|
||||
Reference in New Issue
Block a user