• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# -*- Python -*-
2import os
3import sys
4
5import lit.formats
6
7config.name = 'per_test_timeout'
8
9shellType = lit_config.params.get('external', '1')
10
11if shellType == '0':
12    lit_config.note('Using internal shell')
13    externalShell = False
14else:
15    lit_config.note('Using external shell')
16    externalShell = True
17
18configSetTimeout = lit_config.params.get('set_timeout', '0')
19
20if configSetTimeout == '1':
21    # Try setting the max individual test time in the configuration
22    lit_config.maxIndividualTestTime = 1
23
24config.test_format = lit.formats.ShTest(execute_external=externalShell)
25config.suffixes = ['.py']
26
27config.test_source_root = os.path.dirname(__file__)
28config.test_exec_root = config.test_source_root
29config.target_triple = '(unused)'
30src_root = os.path.join(config.test_source_root, '..')
31config.environment['PYTHONPATH'] = src_root
32config.substitutions.append(('%{python}', sys.executable))
33