import os
import re
import lit.formats

# name: The name of this test suite.
config.name = 'Foundry'

# testFormat: The test format to use to interpret tests.
config.test_format = lit.formats.ShTest(execute_external=True)

# suffixes: A list of file extensions to treat as test files.
config.suffixes = ['.fir', '.fy']

# excludes: A list of individual files to exclude.
config.excludes = ['Inputs']

# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)
config.test_exec_root   = config.test_source_root

config.target_triple = None

config.llvm_version = '3.4'

config.tools_dir = os.path.join(os.path.dirname(__file__), '..')

for tool in ["file_check", "foundry_vm", "foundry_xfrm", "foundry_gen"]:
  config.substitutions.append(
    ("%" + tool, os.path.join(config.tools_dir, tool + '.native')))

for tool in ["llvm-dis", "lli"]:
  config.substitutions.append(
    (re.compile("\\b" + tool + "\\b"),
     tool + "-" + config.llvm_version))

import os
import re
import lit.formats

# name: The name of this test suite.
config.name = 'Foundry'

# testFormat: The test format to use to interpret tests.
config.test_format = lit.formats.ShTest(execute_external=True)

# suffixes: A list of file extensions to treat as test files.
config.suffixes = ['.fir', '.fy']

# excludes: A list of individual files to exclude.
config.excludes = ['Inputs']

# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)
config.test_exec_root   = config.test_source_root

config.target_triple = None

config.environment['OCAMLRUNPARAM'] = 'Rb'

config.llvm_version = '3.4'

config.tools_dir = os.path.join(os.path.dirname(__file__), '..')

for tool in ["file_check", "foundry_vm", "foundry_xfrm", "foundry_gen"]:
  config.substitutions.append(
    ("%" + tool, os.path.join(config.tools_dir, tool + '.native')))

for tool in ["llvm-dis", "lli"]:
  config.substitutions.append(
    (re.compile("\\b" + tool + "\\b"),
     tool + "-" + config.llvm_version))

Set OCAMLRUNPARAM for testing which breaks hash tables and such.
Set OCAMLRUNPARAM for testing which breaks hash tables and such.
