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

Side by Side Diff: tools/llvm_file_check_wrapper.py

Issue 1021303003: Enable using the toolchain (llvm) provided FileCheck. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: nacl_clang Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « tests/toolchain/nacl.scons ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 #
5 # We want to run FileCheck | <cmd_line>, but all that as a parameter
6 # to the python test wrapper (see CommandTest in ../SConstruct).
7 # Without this wrapper for FileCheck, the command interpreter takes
8 # everything on the left of '|' and pipes it to everything on the right,
9 # which is not what we want.
10
11 import subprocess
12 import sys
13
14 def Main(args):
15 if len(args) < 3:
16 print "llvm_file_check_wrapper <filecheck> <check_file> <cmd_line>"
17 print "Where:"
18 print "<filecheck> is the path to FileCheck"
19 print "<check_file> is a text file containing 'CHECK' statements"
20 print "<cmd_line> is the command line to use as input to FileCheck"
21 return 1
22
23 file_check=args[0]
24 check_file=args[1]
25 what_to_run=args[2:]
26
27 what_to_run_proc = subprocess.Popen(what_to_run, stdout=subprocess.PIPE)
28 file_check_proc = subprocess.check_output((file_check, check_file),
29 stdin=what_to_run_proc.stdout)
30 what_to_run_proc.wait()
31
32 if __name__ == '__main__':
33 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « tests/toolchain/nacl.scons ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698