Skip to content

Commit

Permalink
test: Restore llvm-lit (at least for my machine)
Browse files Browse the repository at this point in the history
r221137 feeds None into os.path.join which is not valid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221242 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
majnemer committed Nov 4, 2014
1 parent 229e959 commit 281fc17
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,25 @@ for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:

# Set up OCAMLPATH to include newly built OCaml libraries.
llvm_lib_dir = getattr(config, 'llvm_lib_dir', None)
if not llvm_lib_dir:
llvm_lib_dir = os.path.join(getattr(config, 'llvm_obj_root', None), 'lib')

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

if 'CAML_LD_LIBRARY_PATH' in os.environ:
caml_ld_library_path = os.path.pathsep.join((llvm_ocaml_lib,
os.environ['CAML_LD_LIBRARY_PATH']))
config.environment['CAML_LD_LIBRARY_PATH'] = caml_ld_library_path
else:
config.environment['CAML_LD_LIBRARY_PATH'] = llvm_ocaml_lib
if llvm_lib_dir is None:
if llvm_obj_root is not None:
llvm_lib_dir = os.path.join(llvm_obj_root, 'lib')

if llvm_lib_dir is not None:
llvm_ocaml_lib = os.path.join(llvm_lib_dir, 'ocaml')
if llvm_ocaml_lib is not None:
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

if 'CAML_LD_LIBRARY_PATH' in os.environ:
caml_ld_library_path = os.path.pathsep.join((llvm_ocaml_lib,
os.environ['CAML_LD_LIBRARY_PATH']))
config.environment['CAML_LD_LIBRARY_PATH'] = caml_ld_library_path
else:
config.environment['CAML_LD_LIBRARY_PATH'] = llvm_ocaml_lib

# Set up OCAMLRUNPARAM to enable backtraces in OCaml tests.
config.environment['OCAMLRUNPARAM'] = 'b'
Expand Down

0 comments on commit 281fc17

Please sign in to comment.