forked from llvm/llvm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlit.cfg
40 lines (36 loc) · 1.22 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
import logging
import os
import site
import sys
site.addsitedir(os.path.dirname(__file__))
from litsupport import test
config.name = 'test-suite'
config.test_format = test.TestSuiteTest()
config.suffixes = ['.test']
config.excludes = ['ABI-Testsuite']
config.remote_flags = ""
config.traditional_output = True
config.single_source = False
if 'SSH_AUTH_SOCK' in os.environ:
config.environment['SSH_AUTH_SOCK'] = os.environ['SSH_AUTH_SOCK']
# 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
# Setup logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
file_log = logging.FileHandler("%s/test.log" % config.test_source_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)
# Find and initialize lit modules.
if lit_config.params.get('profile') == 'perf':
config.test_modules += ['perf']
test.load_modules(config.test_modules)