aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra
diff options
context:
space:
mode:
authorGravatar Ravi Mistry <rmistry@google.com>2018-02-08 14:54:52 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-08 21:35:30 +0000
commit042b5e901ba684b1c931211d2947fc73bae835ff (patch)
tree3fd0ace5c1c0135202b68d56f977268ebc37e35c /infra
parent0c269d0c8e05bcda746e87c1a853d75d8a0da54c (diff)
[Bookmaker Nightly Bot] Output the stacktrace of failing fiddles
Bug: skia:7586 Change-Id: If52cefadc657fa93d90fe11b08e3efc5aeacb634 Reviewed-on: https://skia-review.googlesource.com/105767 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Ravi Mistry <rmistry@google.com>
Diffstat (limited to 'infra')
-rw-r--r--infra/bots/recipes/bookmaker.expected/nightly_failed_fiddles.json2
-rw-r--r--infra/bots/recipes/bookmaker.py132
2 files changed, 125 insertions, 9 deletions
diff --git a/infra/bots/recipes/bookmaker.expected/nightly_failed_fiddles.json b/infra/bots/recipes/bookmaker.expected/nightly_failed_fiddles.json
index 30f6b19892..46e7119826 100644
--- a/infra/bots/recipes/bookmaker.expected/nightly_failed_fiddles.json
+++ b/infra/bots/recipes/bookmaker.expected/nightly_failed_fiddles.json
@@ -203,7 +203,7 @@
},
{
"name": "$result",
- "reason": "The following fiddles failed:\n\nhttps://fiddle.skia.org/c/abc\n",
+ "reason": "Failed fiddles with their errors:\n\n\n1. https://fiddle.skia.org/c/abc\n\nninja: Entering directory `out/Release'\n[1/7] ACTION //:skia.h(//gn/toolchain:gcc_like)\n[2/7] stamp obj/skia.h.stamp\n[3/7] compile ../../tools/fiddle/draw.cpp\nFAILED: obj/tools/fiddle/fiddle.draw.o \nc++ -MMD -MF obj/tools/fiddle/fiddle.draw.o.d -DNDEBUG -DSK_HAS_HEIF_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_PDF -DSK_PDF_USE_SFNTLY -DSK_HAS_PNG_LIBRARY -DSK_CODEC_DECODES_RAW -DSK_HAS_WEBP_LIBRARY -DSK_XML -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSK_SAMPLES_FOR_X -DSK_SUPPORT_ATLAS_TEXT=1 -I../../tools/flags -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../src/gpu -I../../tools/gpu -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/gpu/gl -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/atlastext -Igen -fstrict-aliasing -fPIC -Werror -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-parameter -O3 -fdata-sections -ffunction-sections -g -std=c++11 -fno-exceptions -fno-rtti -Wnon-virtual-dtor -Wno-error -c ../../tools/fiddle/draw.cpp -o obj/tools/fiddle/fiddle.draw.o\n../../tools/fiddle/draw.cpp: In function 'void draw(SkCanvas*)':\ndraw.cpp:5:12: error: aggregate 'SkMask mask' has incomplete type and cannot be defined\n }\n ^ \ndraw.cpp:6:28: error: incomplete type 'SkMask' used in nested name specifier\n \n ^ \ndraw.cpp:14:28: error: incomplete type 'SkMask' used in nested name specifier\n uint8_t bytes[] = { 0, 1, 2, 3, 4, 5, 6, 7 };\n ^~~~~~~~~~\n[4/7] compile ../../tools/fiddle/egl_context.cpp\n[5/7] compile ../../tools/fiddle/fiddle_main.cpp\n[6/7] link libskia.a\nninja: build stopped: subcommand failed.\n\n\n\n",
"recipe_result": null,
"status_code": 1
}
diff --git a/infra/bots/recipes/bookmaker.py b/infra/bots/recipes/bookmaker.py
index 6b9d56424d..8957df55b9 100644
--- a/infra/bots/recipes/bookmaker.py
+++ b/infra/bots/recipes/bookmaker.py
@@ -103,16 +103,26 @@ def RunSteps(api):
print 'Dump of %s:' % fiddlecli_output
print json.dumps(out, indent=4)
- failing_fiddles = []
+ failing_fiddles_to_errors = {}
for fiddle_name in out:
props = out[fiddle_name]
if props['compile_errors'] or props['runtime_error']:
- failing_fiddles.append(props['fiddleHash'])
- if failing_fiddles:
+ # Construct the error.
+ error = props['runtime_error']
+ if props['compile_errors']:
+ for e in props['compile_errors']:
+ error += '%s\n' % e['text']
+ failing_fiddles_to_errors[props['fiddleHash']] = error
+
+ if failing_fiddles_to_errors:
# create an eror message and fail the bot!
- failure_msg = 'The following fiddles failed:\n\n'
- for fiddle_hash in failing_fiddles:
- failure_msg += 'https://fiddle.skia.org/c/%s\n' % fiddle_hash
+ failure_msg = 'Failed fiddles with their errors:\n\n\n'
+ counter = 0
+ for fiddle_hash, error in failing_fiddles_to_errors.iteritems():
+ counter += 1
+ failure_msg += '%d. https://fiddle.skia.org/c/%s\n\n' % (
+ counter, fiddle_hash)
+ failure_msg += '%s\n\n' % error
raise api.step.StepFailure(failure_msg)
# Step 4: Update docs in site/user/api/ with the output of fiddlecli.
@@ -138,8 +148,114 @@ def GenTests(api):
"""
fiddleout_with_errors_test_data = """
{"fiddle1": {"fiddleHash": "abc",
- "compile_errors": [],
- "runtime_error": "runtime error"}}
+ "compile_errors": [
+ {
+ "text": "ninja: Entering directory `out/Release'",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "[1/7] ACTION //:skia.h(//gn/toolchain:gcc_like)",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "[2/7] stamp obj/skia.h.stamp",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "[3/7] compile ../../tools/fiddle/draw.cpp",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "FAILED: obj/tools/fiddle/fiddle.draw.o ",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "c++ -MMD -MF obj/tools/fiddle/fiddle.draw.o.d -DNDEBUG -DSK_HAS_HEIF_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_PDF -DSK_PDF_USE_SFNTLY -DSK_HAS_PNG_LIBRARY -DSK_CODEC_DECODES_RAW -DSK_HAS_WEBP_LIBRARY -DSK_XML -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSK_SAMPLES_FOR_X -DSK_SUPPORT_ATLAS_TEXT=1 -I../../tools/flags -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../src/gpu -I../../tools/gpu -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/gpu/gl -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/atlastext -Igen -fstrict-aliasing -fPIC -Werror -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-parameter -O3 -fdata-sections -ffunction-sections -g -std=c++11 -fno-exceptions -fno-rtti -Wnon-virtual-dtor -Wno-error -c ../../tools/fiddle/draw.cpp -o obj/tools/fiddle/fiddle.draw.o",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "../../tools/fiddle/draw.cpp: In function 'void draw(SkCanvas*)':",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "draw.cpp:5:12: error: aggregate 'SkMask mask' has incomplete type and cannot be defined",
+ "line": 5,
+ "col": 12
+ },
+ {
+ "text": " }",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": " ^ ",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "draw.cpp:6:28: error: incomplete type 'SkMask' used in nested name specifier",
+ "line": 6,
+ "col": 28
+ },
+ {
+ "text": " ",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": " ^ ",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "draw.cpp:14:28: error: incomplete type 'SkMask' used in nested name specifier",
+ "line": 14,
+ "col": 28
+ },
+ {
+ "text": " uint8_t bytes[] = { 0, 1, 2, 3, 4, 5, 6, 7 };",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": " ^~~~~~~~~~",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "[4/7] compile ../../tools/fiddle/egl_context.cpp",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "[5/7] compile ../../tools/fiddle/fiddle_main.cpp",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "[6/7] link libskia.a",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "ninja: build stopped: subcommand failed.",
+ "line": 0,
+ "col": 0
+ },
+ {
+ "text": "",
+ "line": 0,
+ "col": 0
+ }
+ ],
+ "runtime_error": ""}}
"""
yield (
api.test('percommit_bookmaker') +