blob: 7d0e68e7beb46d17a6822e14b7b868e31146cfb2 [file] [log] [blame]
# -*- Python -*-
import os
import platform
import subprocess
import lit
import lit.formats
import lit.util
### Helper Functions
def make_path(*args):
return os.path.normpath(os.path.join(*args))
kIsWindows = platform.system() == 'Windows'
###
config.name = 'bloaty'
bloaty_src_root = getattr(config, 'bloaty_src_root', None)
if not bloaty_src_root:
lit_config.fatal("missing 'bloaty_src_root' key in the site specific config")
bloaty_src_root = os.path.normpath(bloaty_src_root)
bloaty_obj_root = getattr(config, 'bloaty_obj_root', None)
if not bloaty_obj_root:
lit_config.fatal("missing 'bloaty_obj_root' key in the site specific config")
bloaty_obj_root = os.path.normpath(bloaty_obj_root)
use_lit_shell = os.environ.get('LIT_USE_INTERNAL_SHELL', kIsWindows)
if not use_lit_shell:
config.available_features.add('shell')
config.test_format = lit.formats.ShTest(execute_external = False)
config.suffixes = ['.test']
config.excludes = ['testdata']
config.test_source_root = os.path.join(bloaty_src_root, 'tests')
config.test_exec_root = os.path.join(bloaty_obj_root, 'tests')
config.substitutions.append(('%FileCheck', config.filecheck_path))
config.substitutions.append(('%yaml2obj', config.yaml2obj_path))
config.substitutions.append(('%bloaty', make_path(config.bloaty_obj_root, 'bloaty')))