reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
@LIT_SITE_CFG_IN_HEADER@

import os
import platform

# Load common config for all compiler-rt unit tests.
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")

# Setup config name.
config.name = 'XRay-Unit'

config.test_exec_root = "@COMPILER_RT_BINARY_DIR@/lib/xray/tests"
config.test_source_root = config.test_exec_root

# Do not patch the XRay unit tests pre-main, and also make the error logging
# verbose to get a more accurate error logging mechanism.
config.environment['XRAY_OPTIONS'] = 'patch_premain=false'

# Add the LLVM Library directory to the LD_LIBRARY_PATH to allow tests to look
# up the shared libraries.
if 'LD_LIBRARY_PATH' in os.environ:
  libdirs = os.path.pathsep.join((config.llvm_lib_dir, os.environ['LD_LIBRARY_PATH']))
  config.environment['LD_LIBRARY_PATH'] = libdirs
else:
  config.environment['LD_LIBRARY_PATH'] = config.llvm_lib_dir

if platform.system() == 'FreeBSD':
  if 'LD_32_LIBRARY_PATH' in os.environ:
    libdirs = os.path.pathsep.join((config.llvm_lib_dir, os.environ['LD_32_LIBRARY_PATH']))
    config.environment['LD_32_LIBRARY_PATH'] = libdirs
  else:
    config.environment['LD_32_LIBRARY_PATH'] = config.llvm_lib_dir