aboutsummaryrefslogtreecommitdiffstats
path: root/test/Unit
diff options
context:
space:
mode:
authorChris Wailes <chriswailes@google.com>2014-06-02 11:53:16 -0700
committerChris Wailes <chriswailes@google.com>2014-06-06 18:19:16 -0700
commit075c621d834af7ffc32d2067fadb147cc1758b99 (patch)
treef4f29ff2e71102ee86111bc695830ae5850ec50c /test/Unit
parenta637ea99e253d9d3bd16ebb9e33f5828d38d94de (diff)
downloadexternal_llvm-075c621d834af7ffc32d2067fadb147cc1758b99.zip
external_llvm-075c621d834af7ffc32d2067fadb147cc1758b99.tar.gz
external_llvm-075c621d834af7ffc32d2067fadb147cc1758b99.tar.bz2
Adds the ability to run the llvm test suite in-tree.
This was accomplished by building additional tools and hand-generating several files that are auto-generated by the configuration system when LLVM is built out-of-tree. The LTO, Interpreter, and DebugInfo libraries are now being compiled, and several source files were added to existing compilation targets. To run these tests you must first run build/envsetup.sh and have used lunch to select a target. You can then launch the test script by running: cd $ANDROID_BUILD_TOP/external/llvm && ./android_test.sh Bug: 15433215 Change-Id: I43d87de0a4620cdd46c8d0f825dd4428e8409702
Diffstat (limited to 'test/Unit')
-rw-r--r--test/Unit/lit.site.cfg26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/Unit/lit.site.cfg b/test/Unit/lit.site.cfg
new file mode 100644
index 0000000..be9dd33
--- /dev/null
+++ b/test/Unit/lit.site.cfg
@@ -0,0 +1,26 @@
+import sys
+import os
+
+aosp_dir = os.getenv("ANDROID_BUILD_TOP")
+
+## Autogenerated by LLVM/Clang configuration.
+# Do not edit!
+config.llvm_src_root = aosp_dir + "/external/llvm"
+config.llvm_obj_root = aosp_dir + "/out/host/linux-x86/obj/test_llvm"
+config.llvm_tools_dir = aosp_dir + "/out/host/linux-x86/bin"
+config.llvm_build_mode = "Release"
+config.enable_shared = 0
+config.shlibdir = aosp_dir + "/out/host/linux-x86/lib"
+
+# Support substitution of the tools_dir and build_mode with user parameters.
+# This is used when we can't determine the tool dir at configuration time.
+try:
+ config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+ config.llvm_build_mode = config.llvm_build_mode % lit_config.params
+except KeyError:
+ e = sys.exc_info()[1]
+ key, = e.args
+ lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
+
+# Let the main config do the real work.
+lit_config.load_config(config, aosp_dir + "/external/llvm/test/Unit/lit.cfg")