aboutsummaryrefslogtreecommitdiff
path: root/lit/Unit/lit.cfg
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /lit/Unit/lit.cfg
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
downloadsrc-14f1b3e8826ce43b978db93a62d1166055db5394.tar.gz
src-14f1b3e8826ce43b978db93a62d1166055db5394.zip
Vendor import of lldb trunk r290819:vendor/lldb/lldb-trunk-r290819
Notes
Notes: svn path=/vendor/lldb/dist/; revision=311128 svn path=/vendor/lldb/lldb-trunk-r290819/; revision=311129; tag=vendor/lldb/lldb-trunk-r290819
Diffstat (limited to 'lit/Unit/lit.cfg')
-rw-r--r--lit/Unit/lit.cfg13
1 files changed, 13 insertions, 0 deletions
diff --git a/lit/Unit/lit.cfg b/lit/Unit/lit.cfg
index 3d295475d564..7dfb344e6fae 100644
--- a/lit/Unit/lit.cfg
+++ b/lit/Unit/lit.cfg
@@ -6,6 +6,19 @@ import os
import lit.formats
+# Check that the object root is known.
+if config.test_exec_root is None:
+ # Otherwise, we haven't loaded the site specific configuration (the user is
+ # probably trying to run on a test file directly, and either the site
+ # configuration hasn't been created by the build system, or we are in an
+ # out-of-tree build situation).
+
+ # Check for 'llvm_unit_site_config' user parameter, and use that if available.
+ site_cfg = lit_config.params.get('lldb_unit_site_config', None)
+ if site_cfg and os.path.exists(site_cfg):
+ lit_config.load_config(config, site_cfg)
+ raise SystemExit
+
# name: The name of this test suite.
config.name = 'lldb-Unit'