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

Unified Diff: tests_lit/lit.cfg

Issue 205613002: Initial skeleton of Subzero. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Use non-anonymous structs so that array_lengthof works Created 6 years, 8 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 | « tests_lit/.gitignore ('k') | tests_lit/llvm2ice_tests/64bit.pnacl.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/lit.cfg
diff --git a/tests_lit/lit.cfg b/tests_lit/lit.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..171517da50363f9759fb08b996cc6eb6d4223753
--- /dev/null
+++ b/tests_lit/lit.cfg
@@ -0,0 +1,54 @@
+# Taken from utils/lit/tests in the LLVM tree and hacked together to support
+# our tests.
+
+# -*- Python -*-
+
+import os
+import sys
+
+import lit.formats
+
+# name: The name of this test suite.
+config.name = 'subzero'
+
+# testFormat: The test format to use to interpret tests.
+config.test_format = lit.formats.ShTest()
+
+# suffixes: A list of file extensions to treat as test files.
+config.suffixes = ['.ll']
+
+# test_source_root: The root path where tests are located.
+config.test_source_root = os.path.dirname(__file__)
+config.test_exec_root = config.test_source_root
+config.target_triple = '(unused)'
+
+src_root = os.path.abspath(os.path.join(config.test_source_root, '..'))
+bin_root = src_root
+config.substitutions.append(('%{src_root}', src_root))
+config.substitutions.append(('%{python}', sys.executable))
+
+# Finding LLVM binary tools. All tools used in the tests must be listed in
+# the llvmbintools list.
+llvmbinpath = os.path.abspath(os.environ.get('LLVM_BIN_PATH'))
+
+# Finding Subzero tools
+config.substitutions.append(('%llvm2ice', os.path.join(bin_root, 'llvm2ice')))
+config.substitutions.append(('%szdiff', os.path.join(bin_root, 'szdiff.py')))
+
+llvmbintools = ['FileCheck']
+
+for tool in llvmbintools:
+ config.substitutions.append((tool, os.path.join(llvmbinpath, tool)))
+
+# Add a feature to detect the Python version.
+config.available_features.add("python%d.%d" % (sys.version_info[0],
+ sys.version_info[1]))
+
+# Debugging output
+def dbg(s):
+ print '[DBG] %s' % s
+
+dbg('bin_root = %s' % bin_root)
+dbg('llvmbinpath = %s' % llvmbinpath)
+
+
« no previous file with comments | « tests_lit/.gitignore ('k') | tests_lit/llvm2ice_tests/64bit.pnacl.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698