diff options
author | halcanary <halcanary@google.com> | 2016-04-18 11:50:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-18 11:50:07 -0700 |
commit | f0da138c9500bab765a6ef59d97759d1466c1965 (patch) | |
tree | 1431756e9a33d8d04048e760d66e521b7dde21c3 /tools/fiddle/parse-fiddle-output | |
parent | 382949db14cb38ffbc5b1e15a0f56bb7d4e8f7d0 (diff) |
experimental/fiddle -> tools/fiddle
also, test building fiddle_main.cpp & draw.cpp
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1895143002
Review URL: https://codereview.chromium.org/1895143002
Diffstat (limited to 'tools/fiddle/parse-fiddle-output')
-rwxr-xr-x | tools/fiddle/parse-fiddle-output | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/fiddle/parse-fiddle-output b/tools/fiddle/parse-fiddle-output new file mode 100755 index 0000000000..f9a2fac6d6 --- /dev/null +++ b/tools/fiddle/parse-fiddle-output @@ -0,0 +1,21 @@ +#!/bin/sh +# Copyright 2015 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Parse the output of fiddle_main, for use in testing +while IFS= read -r line; do + type=$(echo $line | sed -n 's/[^"]*"\([^"]*\)":.*/\1/p') + if [ "$type" ]; then + case "$type" in + Raster|Gpu) ext='.png';; + Pdf) ext='.pdf';; + Skp) ext='.skp';; + esac + dst="${TMPDIR:-/tmp}/fiddle_${type}${ext}" + echo $line | sed 's/[^"]*"[^"]*": "//; s/"\(,\|\)$//' \ + | base64 -d > "$dst" + echo $dst + fi +done |