7 config.name = 'per_test_timeout'
9 shellType = lit_config.params.get('external', '1')
12 lit_config.note('Using internal shell')
15 lit_config.note('Using external shell')
18 configSetTimeout = lit_config.params.get('set_timeout', '0')
20 if configSetTimeout != '0':
21 # Try setting the max individual test time in the configuration
22 lit_config.maxIndividualTestTime = int(configSetTimeout)
24 config.test_format = lit.formats.ShTest(execute_external=externalShell)
25 config.suffixes = ['.py']
27 config.test_source_root = os.path.dirname(__file__)
28 config.test_exec_root = config.test_source_root
29 config.target_triple = '(unused)'
30 src_root = os.path.join(config.test_source_root, '..')
32 pythonpath_list = [src_root]
33 # Ensure the user's PYTHONPATH is included.
34 if 'PYTHONPATH' in os.environ:
35 pythonpath_list.append(os.environ['PYTHONPATH'])
36 if 'PYTHONPATH' in config.environment:
37 pythonpath_list.append(config.environment['PYTHONPATH'])
38 config.environment['PYTHONPATH'] = os.pathsep.join(pythonpath_list)
40 config.substitutions.append(('%{python}', '"%s"' % (sys.executable)))