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

Unified Diff: tools/memory/suppression_string_gen.sh

Issue 296173006: Link the contents of tools/valgrind/tsan_v2/suppressions.txt into TSan binaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 months 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
« base/base.gyp ('K') | « base/debug/sanitizer_options.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/memory/suppression_string_gen.sh
diff --git a/tools/memory/suppression_string_gen.sh b/tools/memory/suppression_string_gen.sh
new file mode 100755
index 0000000000000000000000000000000000000000..f259b4c560f8f17909528682dcfade30b35f9cf4
--- /dev/null
+++ b/tools/memory/suppression_string_gen.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Copyright (c) 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This script generates a C source declaring a string with the contents of a
+# given file.
+# Usage:
+# ./suppression_string_gen.sh <variable_name> <input> <output>
+
Nico 2014/05/27 15:42:30 set -eu?
Alexander Potapenko 2014/05/28 10:34:38 Done.
+varname=$1
+infile=$2
+outfile=$3
+
+echo "char ${varname}[] =" > ${outfile}
+cat ${infile} | awk '{printf("\"%s\\n\"\n", $0)}' >> ${outfile}
+echo ";" >> ${outfile}
« base/base.gyp ('K') | « base/debug/sanitizer_options.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698