Commit 4ae9a4fd authored by Tamer Tas's avatar Tamer Tas Committed by Commit Bot

[test] reduce the noise in task logs

See errors like:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Fuzzer/28117

The logs only shows the tail of the stderr, in order to get information, huge logs
need to be downloaded.

Instead of using the tail end of the stderr logs, we get the head of the stderr logs,
which is the important part for us.

R=machenbach@chromium.org
CC=​​​​​yangguo@chromium.org,sergiyb@chromium.org

gclient sync
cd v8
tools/jsfunfuzz/fuzz-harness.sh out/x64.debug/d8 fuzz-results.tar.bz2
```

Test: ```
Bug: v8:8493
Change-Id: Ia87c52f5b08ff9748cf2a81c9ca983d22fda650d
Reviewed-on: https://chromium-review.googlesource.com/c/1378177
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58302}
parent 8c311273
......@@ -51,8 +51,17 @@ if [ "$3" == "--download" ]; then
cat << EOF | patch -s -p0 -d "$v8_root"
--- tools/jsfunfuzz/jsfunfuzz/multi_timed_run.py~
+++ tools/jsfunfuzz/jsfunfuzz/multi_timed_run.py
@@ -125,7 +125,7 @@
@@ -118,19 +118,19 @@
-def showtail(logfilename):
+def showtail(logfilename, method="tail"):
- cmd = "tail -n 20 %s" % logfilename
+ cmd = "%s -n 20 %s" % (method, logfilename)
print cmd
print ""
os.system(cmd)
print ""
print ""
def many_timed_runs():
iteration = 0
- while True:
......@@ -60,6 +69,12 @@ if [ "$3" == "--download" ]; then
iteration += 1
logfilename = "w%d" % iteration
one_timed_run(logfilename)
if not succeeded(logfilename):
showtail(logfilename)
- showtail("err-" + logfilename)
+ showtail("err-" + logfilename, method="head")
many_timed_runs()
EOF
fi
......
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