R600/SI: Use REG_SEQUENCE instead of INSERT_SUBREGs
[oota-llvm.git] / test / lit.cfg
index 55f559e68dc7f2b379705238e09a12fa7270219d..335b86dae7d980025687e28ad00ccc9c46111ddd 100644 (file)
@@ -100,6 +100,19 @@ for options in ['ASAN_OPTIONS', 'UBSAN_OPTIONS']:
     if options in os.environ:
         config.environment[options] = os.environ[options]
 
+# Set up OCAMLPATH to include newly built OCaml libraries.
+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'
+
 ###
 
 import os
@@ -167,13 +180,21 @@ if re.search(r'win32', config.target_triple):
 config.substitutions.append( ('%llc_dwarf', llc_dwarf) )
 
 # Add site-specific substitutions.
-config.substitutions.append( ('%ocamlopt', config.ocamlopt_executable) )
 config.substitutions.append( ('%go', config.go_executable) )
 config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
 config.substitutions.append( ('%shlibext', config.llvm_shlib_ext) )
 config.substitutions.append( ('%exeext', config.llvm_exe_ext) )
 config.substitutions.append( ('%python', config.python_executable) )
 
+# OCaml substitutions.
+# Support tests for both native and bytecode builds.
+if config.have_ocamlopt == '1':
+    config.substitutions.append( ('%ocamlcomp',
+        "%s ocamlopt %s" % (config.ocamlfind_executable, config.ocaml_flags)) )
+else:
+    config.substitutions.append( ('%ocamlcomp',
+        "%s ocamlc %s" % (config.ocamlfind_executable, config.ocaml_flags)) )
+
 # For each occurrence of an llvm tool name as its own word, replace it
 # with the full path to the build directory holding that tool.  This
 # ensures that we are testing the tools just built and not some random