| Index: SConstruct
|
| diff --git a/SConstruct b/SConstruct
|
| index 218d489aee0d941e9ce9618228013a6f1a85eae0..271e637c16fe937d154e11b53ce65ecee53e17d4 100755
|
| --- a/SConstruct
|
| +++ b/SConstruct
|
| @@ -1625,7 +1625,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|.
|
| """
|
| @@ -1639,21 +1640,28 @@ 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,
|
| + ['${PYTHON}',
|
| + env.File('${SCONSTRUCT_DIR}/tools/llvm_file_check_wrapper.py'),
|
| + '${FILECHECK}',
|
| + check_file] + cmd,
|
| + direct_emulation=False)
|
| + 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)
|
|
|
|
|