diff options
| author | Peter Zotov <whitequark@whitequark.org> | 2014-10-30 19:26:42 +0000 |
|---|---|---|
| committer | Peter Zotov <whitequark@whitequark.org> | 2014-10-30 19:26:42 +0000 |
| commit | cf8f7a10b7d60c8999fc6035ece84692ae5bc21f (patch) | |
| tree | b5ed48d43ee18c0e299befff72e3ce323a5e67e0 /llvm/test | |
| parent | 77a5a5fcdad5f27a8799b80f15e192fdb4f3a13c (diff) | |
| download | bcm5719-llvm-cf8f7a10b7d60c8999fc6035ece84692ae5bc21f.tar.gz bcm5719-llvm-cf8f7a10b7d60c8999fc6035ece84692ae5bc21f.zip | |
lit: PR21417: don't try to update OCAMLPATH if LibDir is empty.
llvm-svn: 220919
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/lit.cfg | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg index af446b26ec3..335b86dae7d 100644 --- a/llvm/test/lit.cfg +++ b/llvm/test/lit.cfg @@ -101,12 +101,14 @@ for options in ['ASAN_OPTIONS', 'UBSAN_OPTIONS']: config.environment[options] = os.environ[options] # Set up OCAMLPATH to include newly built OCaml libraries. -llvm_ocaml_lib = os.path.join(getattr(config, 'llvm_lib_dir', None), 'ocaml') -if 'OCAMLPATH' in os.environ: - ocamlpath = os.path.pathsep.join((llvm_ocaml_lib, os.environ['OCAMLPATH'])) - config.environment['OCAMLPATH'] = ocamlpath -else: - config.environment['OCAMLPATH'] = llvm_ocaml_lib +llvm_lib_dir = getattr(config, 'llvm_lib_dir', None) +if llvm_lib_dir: # empty llvm_lib_dir is falsey, reads as None + llvm_ocaml_lib = os.path.join(llvm_lib_dir, 'ocaml') + if 'OCAMLPATH' in os.environ: + ocamlpath = os.path.pathsep.join((llvm_ocaml_lib, os.environ['OCAMLPATH'])) + config.environment['OCAMLPATH'] = ocamlpath + else: + config.environment['OCAMLPATH'] = llvm_ocaml_lib # Set up OCAMLRUNPARAM to enable backtraces in OCaml tests. config.environment['OCAMLRUNPARAM'] = 'b' |

