2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-19 00:16:29 +08:00
artiq/lit-test/test/lit.cfg

36 lines
1.1 KiB
INI
Raw Normal View History

# -*- python -*-
import os, subprocess
import lit.util
import lit.formats
root = os.path.join(os.path.dirname(__file__), '..')
config.name = 'ARTIQ'
config.test_format = lit.formats.ShTest()
config.suffixes = ['.py']
2015-11-07 20:17:31 +08:00
python_executable = 'python3.5'
2015-07-27 10:46:43 +08:00
harness = os.path.join(root, 'harness.py')
if os.getenv('COVERAGE'):
harness = 'coverage run --parallel-mode --source=artiq {}'.format(harness)
config.environment['COVERAGE_FILE'] = os.path.join(root, '..', '.coverage')
config.substitutions.append( ('%python', harness) )
else:
harness = '{} {}'.format(python_executable, harness)
config.substitutions.append( ('%python', harness) )
2015-07-27 10:46:43 +08:00
not_ = '{} {}'.format(python_executable, os.path.join(root, 'not.py'))
config.substitutions.append( ('%not', not_) )
if os.name == 'posix':
support_build = os.path.join(root, 'libartiq_support')
if subprocess.call(['make', '-sC', support_build]) != 0:
lit_config.fatal("Unable to build JIT support library")
support_lib = os.path.join(support_build, 'libartiq_support.so')
config.environment['LIBARTIQ_SUPPORT'] = support_lib
config.available_features.add('exceptions')