Don't print renderdoc log to stdout when running tests

This commit is contained in:
baldurk
2020-09-04 11:54:52 +01:00
parent 55ac2c95a8
commit 9b37a8b8a7
3 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -185,7 +185,7 @@ def run_and_capture(exe: str, cmdline: str, frame: int, *, capture_name=None, op
captures = control.captures()
if logfile is not None and os.path.exists(logfile):
log.inline_file('Process output', logfile)
log.inline_file('Process output', logfile, with_stdout=True)
if len(captures) == 0:
raise RuntimeError("No capture made")
+2 -2
View File
@@ -90,13 +90,13 @@ class TestLogger:
self.dedent()
self.rawprint("<< Section {}".format(name))
def inline_file(self, name: str, path: str):
def inline_file(self, name: str, path: str, with_stdout: bool = False):
self.rawprint(">> Raw {}".format(name))
self.indent()
with open(path) as f:
lines = f.readlines()
for l in lines:
self.rawprint(l.strip())
self.rawprint(l.strip(), with_stdout=with_stdout)
self.dedent()
self.rawprint("<< Raw {}".format(name))
+7 -3
View File
@@ -11,15 +11,19 @@ document.body.onload = function() {
function linkTests(str) {
var ret = str;
console.log("Linking tests in '" + str + "'");
for(var i=0; i < test_list.length; i++) {
console.log("Checking against " + test_list[i]);
ret = ret.replace(new RegExp('([^#">])\\b' + test_list[i] + '\\b', "g"), '$1<a href="#' + test_list[i] + '">' + test_list[i] + '</a>');
}
console.log("Got ret: " + ret)
return ret;
}
window.onhashchange = function() {
test = window.location.hash.substr(1)
if(test_list.indexOf(test) >= 0) {
document.getElementById(test).classList.add('expanded');
}
}
function formatDiff(diff) {
var difflines = diff.split('\n')