10 # Configuration file for the 'lit' test runner.
12 # name: The name of this test suite.
13 config.name = 'Polly - isl unit tests'
15 # testFormat: The test format to use to interpret tests.
17 # For now we require '&&' between commands, until they get globally killed and
18 # the test runner updated.
19 execute_external = platform.system() != 'Windows'
20 config.test_format = lit.formats.ShTest(execute_external)
22 # suffixes: A list of file extensions to treat as test files.
23 config.suffixes = ['.sh']
25 # test_source_root: The root path where tests are located.
26 config.test_source_root = os.path.dirname(__file__)
28 # test_exec_root: The root path where tests should be run.
29 polly_obj_root = getattr(config, 'polly_obj_root', None)
30 if polly_obj_root is not None:
31 config.test_exec_root = os.path.join(polly_obj_root, 'test')
33 # Set llvm_{src,obj}_root for use by others.
34 config.llvm_src_root = getattr(config, 'llvm_src_root', None)
35 config.llvm_obj_root = getattr(config, 'llvm_obj_root', None)
37 # Tweak the PATH to ensure that built files are the ones executed.
38 bin_dir = getattr(config, 'bin_dir', None)
40 lit_config.fatal('No executable dir set!')
41 path = os.path.pathsep.join((bin_dir, config.environment['PATH']))
42 config.environment['PATH'] = path
44 config.environment['srcdir'] = os.path.join(config.test_source_root,
45 '../../lib/External/isl')