Do ApplyGpuDriverBugWorkarounds after InitializeOneOffForTests
[chromium-blink-merge.git] / testing / iossim / redirect-stdout.sh
blobd6c3cf8cfaa2e3a726b204a1d16542512cb9b6db
1 #!/bin/sh
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 # This script executes the command given as the first argument, strips
7 # cxx_destruct from stdout, and redirects the remaining stdout to the file given
8 # as the second argument.
10 # Example: Write the text 'foo' to a file called out.txt:
11 # RedirectStdout.sh "echo foo" out.txt
13 # This script is invoked from iossim.gyp in order to redirect the output of
14 # class-dump to a file (because gyp actions don't support redirecting output).
15 # This script also removes all lines with cxx_destruct. Perhaps newer versions
16 # of class-dump will fix this issue. As of 3.5, 'cxx_destruct' still exists.
18 if [ ${#} -ne 2 ] ; then
19 echo "usage: ${0} <command> <output file>"
20 exit 2
23 $1 | sed /cxx_destruct/d > $2