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

Unified Diff: SConstruct

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pnacl/COMPONENT_REVISIONS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | pnacl/COMPONENT_REVISIONS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698