Chromium Code Reviews| Index: SConstruct |
| diff --git a/SConstruct b/SConstruct |
| index 36a7d93f8a0ec0753091c23d31c448e65bced1f7..feda317fc7ad78f2e7918bbeb0afd526f33db22f 100755 |
| --- a/SConstruct |
| +++ b/SConstruct |
| @@ -1624,7 +1624,8 @@ def CommandTestFileDumpCheck(env, |
| name, |
| target, |
| check_file, |
| - objdump_flags): |
| + objdump_flags, |
| + use_llvm_filecheck=False): |
| """Create a test that disassembles a binary (|target|) and checks for |
| patterns in the |check_file|. Disassembly is done using |objdump_flags|. |
| """ |
| @@ -1638,21 +1639,26 @@ def CommandTestFileDumpCheck(env, |
| target = env.GetTranslatedNexe(target) |
| return env.CommandTestFileCheck(name, |
| ['${OBJDUMP}', objdump_flags, target], |
| - check_file) |
| + check_file, use_llvm_filecheck) |
| pre_base_env.AddMethod(CommandTestFileDumpCheck) |
| - |
| -def CommandTestFileCheck(env, name, cmd, check_file): |
| +def CommandTestFileCheck(env, name, cmd, check_file, use_llvm_filecheck=False): |
| """Create a test that runs a |cmd| (array of strings), |
| which is expected to print to stdout. The results |
| of stdout will then be piped to the file_check.py tool which |
| will search for the regexes specified in |check_file|. """ |
| - return env.CommandTest(name, |
| + if use_llvm_filecheck: |
| + return env.CommandTest(name, |
| + [env.File('${SCONSTRUCT_DIR}/tools/llvm_file_check_wrapper.sh'), |
|
Derek Schuff
2015/03/23 16:25:07
Why use a wrapper here instead of just invoking ${
Mircea Trofin
2015/03/23 17:27:20
Because we want to run FileCheck | <dump command>,
JF
2015/03/23 17:42:10
you should add this as a comment in the wrapper.
|
| + '${FILECHECK}', |
| + check_file] + cmd) |
| + else: |
| + return env.CommandTest(name, |
| ['${PYTHON}', |
| - env.File('${SCONSTRUCT_DIR}/tools/file_check.py'), |
| - check_file] + cmd, |
| + env.File('${SCONSTRUCT_DIR}/tools/file_check.py'), |
| + check_file] + cmd, |
| # don't run ${PYTHON} under the emulator. |
| direct_emulation=False) |