summaryrefslogtreecommitdiff
path: root/test/libcxxabi
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-01-22 20:00:06 +0000
committerEric Fiselier <eric@efcs.ca>2015-01-22 20:00:06 +0000
commit9a9e93916519f8a27ea79e079ecbe22f24c6b880 (patch)
tree2045e1317cd1356deba2889d5302e2dc9a558ffd /test/libcxxabi
parent390b5cb253acec71492707b327d283022efc9729 (diff)
[libcxxabi] Teach CMake better ways to find the libc++ source directory (and misc cleanup).
Summary: The main section of this patch teaches CMake a new option `LIBCXXABI_LIBCXX_PATH` that specifies the path to the libcxx source root. This information is passed to lit so that it can better find libc++'s python module. `LIBCXXABI_LIBCXX_PATH` is also used to help find the libc++ headers. The rest of this patch is misc cleanup, mostly to make pep8 and pylint happy. I've also copied libc++'s .gitignore into libc++abi. Reviewers: jroelofs, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7130 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226855 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/libcxxabi')
-rw-r--r--test/libcxxabi/test/config.py28
1 files changed, 13 insertions, 15 deletions
diff --git a/test/libcxxabi/test/config.py b/test/libcxxabi/test/config.py
index a5042d0..52cdcbd 100644
--- a/test/libcxxabi/test/config.py
+++ b/test/libcxxabi/test/config.py
@@ -1,26 +1,23 @@
-import locale
import os
-import platform
-import re
-import shlex
import sys
-import lit.Test # pylint: disable=import-error,no-name-in-module
-import lit.util # pylint: disable=import-error,no-name-in-module
-
-from libcxx.test.format import LibcxxTestFormat
from libcxx.test.config import Configuration as LibcxxConfiguration
-from libcxx.compiler import CXXCompiler
+
class Configuration(LibcxxConfiguration):
# pylint: disable=redefined-outer-name
def __init__(self, lit_config, config):
super(Configuration, self).__init__(lit_config, config)
+ self.libcxxabi_src_root = None
+ self.libcxx_src_root = None
+ self.obj_root = None
def configure_src_root(self):
- self.libcxxabi_src_root = self.get_lit_conf('libcxxabi_src_root',
+ self.libcxxabi_src_root = self.get_lit_conf(
+ 'libcxxabi_src_root',
os.path.dirname(self.config.test_source_root))
- self.libcxx_src_root = self.get_lit_conf('libcxx_src_root',
+ self.libcxx_src_root = self.get_lit_conf(
+ 'libcxx_src_root',
os.path.join(self.libcxxabi_src_root, '/../libcxx'))
def configure_obj_root(self):
@@ -32,16 +29,17 @@ class Configuration(LibcxxConfiguration):
super(Configuration, self).configure_compile_flags()
def configure_compile_flags_header_includes(self):
- cxx_headers = self.get_lit_conf('cxx_headers',
+ cxx_headers = self.get_lit_conf(
+ 'cxx_headers',
os.path.join(self.libcxx_src_root, '/include'))
if not os.path.isdir(cxx_headers):
self.lit_config.fatal("cxx_headers='%s' is not a directory."
% cxx_headers)
self.cxx.compile_flags += ['-I' + cxx_headers]
- libcxxabi_headers = self.get_lit_conf('libcxxabi_headers',
- os.path.join(self.libcxxabi_src_root,
- 'include'))
+ libcxxabi_headers = self.get_lit_conf(
+ 'libcxxabi_headers',
+ os.path.join(self.libcxxabi_src_root, 'include'))
if not os.path.isdir(libcxxabi_headers):
self.lit_config.fatal("libcxxabi_headers='%s' is not a directory."
% libcxxabi_headers)