mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Don't print renderdoc log to stdout when running tests
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user