-
Notifications
You must be signed in to change notification settings - Fork 0
/
lit.cfg
50 lines (44 loc) · 1.64 KB
/
lit.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import logging
import os
import site
import sys
# Setup logging.
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
file_log = logging.FileHandler("%s/test.log" % config.test_exec_root,
mode="w")
file_log.setLevel(logging.DEBUG)
logger.addHandler(file_log)
console_log = logging.StreamHandler()
console_log.setLevel(logging.WARNING)
logger.addHandler(console_log)
# Load test-suite litsupport code
site.addsitedir(os.path.dirname(__file__))
import litsupport.test
config.name = 'test-suite'
config.test_format = litsupport.test.TestSuiteTest()
config.suffixes = ['.test']
config.excludes = ['ABI-Testsuite']
config.traditional_output = False
config.single_source = False
if 'SSH_AUTH_SOCK' in os.environ:
config.environment['SSH_AUTH_SOCK'] = os.environ['SSH_AUTH_SOCK']
if not hasattr(config, 'remote_host'):
config.remote_host = ""
config.remote_host = lit_config.params.get('remote_host', config.remote_host)
if config.remote_host:
config.test_modules.append('remote')
# Load previous test results so we can skip tests that did not change.
previous_results_file = lit_config.params.get('previous', None)
if previous_results_file:
import json
config.previous_results = json.load(open(previous_results_file))
else:
config.previous_results = None
# Pass on some options to context object:
config.perf_profile_events = "cycles,cache-misses,branch-misses,instructions"
if lit_config.params.get('perf_profile_events'):
config.perf_profile_events = lit_config.params.get('perf_profile_events')
# Find and initialize lit modules.
if lit_config.params.get('profile') == 'perf':
config.test_modules += ['perf']