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

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: 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 | site_scons/site_tools/naclsdk.py » ('j') | site_scons/site_tools/naclsdk.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | site_scons/site_tools/naclsdk.py » ('j') | site_scons/site_tools/naclsdk.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698