diff options
author | Adam Nemet <anemet@apple.com> | 2017-11-27 19:00:29 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2017-11-27 19:00:29 +0000 |
commit | 1e5f63d6920b4d9e2251e608a385634993d73cc1 (patch) | |
tree | 1ce68d6bbd8fbba4849529430dfd681cb09d84d1 /test/lit.cfg.py | |
parent | aa1bb20e604af9e3e0857b51eb51287df63f4309 (diff) |
Add opt-viewer testing
Detects whether we have the Python modules (pygments, yaml) required by
opt-viewer and hooks this up to REQUIRES.
This fixes https://bugs.llvm.org/show_bug.cgi?id=34129 (the lack of opt-viewer
testing).
It's also related to https://github.com/apple/swift/pull/12938 and the idea is
to expose LLVM_HAVE_OPT_VIEWER_MODULES to the Swift cmake.
Differential Revision: https://reviews.llvm.org/D40202
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg.py')
-rw-r--r-- | test/lit.cfg.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lit.cfg.py b/test/lit.cfg.py index e956bb74f5a..06a23536a8c 100644 --- a/test/lit.cfg.py +++ b/test/lit.cfg.py @@ -123,6 +123,7 @@ if config.have_ocamlopt: ocamlopt_command = '%s ocamlopt -cclib -L%s -cclib -Wl,-rpath,%s %s' % ( config.ocamlfind_executable, config.llvm_lib_dir, config.llvm_lib_dir, config.ocaml_flags) +opt_viewer_cmd = '%s %s/tools/opt-viewer/opt-viewer.py' % (sys.executable, config.llvm_src_root) tools = [ ToolSubst('%lli', FindTool('lli'), post='.', extra_args=lli_args), @@ -132,6 +133,7 @@ tools = [ ToolSubst('%ld64', ld64_cmd, unresolved='ignore'), ToolSubst('%ocamlc', ocamlc_command, unresolved='ignore'), ToolSubst('%ocamlopt', ocamlopt_command, unresolved='ignore'), + ToolSubst('%opt-viewer', opt_viewer_cmd), ] # FIXME: Why do we have both `lli` and `%lli` that do slightly different things? @@ -286,3 +288,6 @@ if config.have_libxar: if config.llvm_libxml2_enabled == '1': config.available_features.add('libxml2') + +if config.have_opt_viewer_modules: + config.available_features.add('have_opt_viewer_modules') |