<commit_before># -*- Python -*-
import os
import sys

import lit.formats

config.name = 'per_test_timeout'

shellType = lit_config.params.get('external', '1')

if shellType == '0':
    lit_config.note('Using internal shell')
    externalShell = False
else:
    lit_config.note('Using external shell')
    externalShell = True

configSetTimeout = lit_config.params.get('set_timeout', '0')

if configSetTimeout != '0':
    # Try setting the max individual test time in the configuration
    lit_config.maxIndividualTestTime = int(configSetTimeout)

config.test_format = lit.formats.ShTest(execute_external=externalShell)
config.suffixes = ['.py']

config.test_source_root = os.path.dirname(__file__)
config.test_exec_root = config.test_source_root
config.target_triple = '(unused)'
src_root = os.path.join(config.test_source_root, '..')
config.environment['PYTHONPATH'] = src_root
config.substitutions.append(('%{python}', '"%s"' % (sys.executable)))<commit_msg>[lit, shtest-timeout] Always use an internal shell for the shtest-timeout to diagnose buildbot failures<commit_after># -*- Python -*-
import os
import sys

import lit.formats

config.name = 'per_test_timeout'

shellType = lit_config.params.get('external', '1')

if shellType == '0':
    lit_config.note('Using internal shell')
    externalShell = False
else:
    lit_config.note('Using external shell')
    externalShell = (not sys.platform in ['win32'])
    if not externalShell:
        lit_config.note('External shell requested, but using internal shell')

configSetTimeout = lit_config.params.get('set_timeout', '0')

if configSetTimeout != '0':
    # Try setting the max individual test time in the configuration
    lit_config.maxIndividualTestTime = int(configSetTimeout)

config.test_format = lit.formats.ShTest(execute_external=externalShell)
config.suffixes = ['.py']

config.test_source_root = os.path.dirname(__file__)
config.test_exec_root = config.test_source_root
config.target_triple = '(unused)'
src_root = os.path.join(config.test_source_root, '..')
config.environment['PYTHONPATH'] = src_root
config.substitutions.append(('%{python}', '"%s"' % (sys.executable)))
{'fraction_non_alphanumeric': 0.13031293787949555, 'fraction_numerical': 0.004670714619336758, 'mean_word_length': 5.394029850746269, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5316546', 'n_tokens_mistral': 681, 'n_tokens_neox': 671, 'n_words': 149}