Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: experimental/fiddle/parse-fiddle-output

Issue 1349163003: experiment/fiddle (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-10 (Thursday) 10:34:44 EST Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/fiddle/fiddler.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/fiddle/parse-fiddle-output
diff --git a/experimental/fiddle/parse-fiddle-output b/experimental/fiddle/parse-fiddle-output
new file mode 100755
index 0000000000000000000000000000000000000000..f9a2fac6d6633e3c5f17807481307f55d91cec83
--- /dev/null
+++ b/experimental/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
« no previous file with comments | « experimental/fiddle/fiddler.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698