2015-07-27 08:52:45 +08:00
|
|
|
import os, subprocess
|
2015-06-06 21:58:23 +08:00
|
|
|
import lit.util
|
|
|
|
import lit.formats
|
|
|
|
|
2015-07-27 08:52:45 +08:00
|
|
|
root = os.path.join(os.path.dirname(__file__), '..')
|
|
|
|
|
2015-06-06 21:58:23 +08:00
|
|
|
config.name = 'ARTIQ'
|
|
|
|
config.test_format = lit.formats.ShTest()
|
|
|
|
config.suffixes = ['.py']
|
|
|
|
|
|
|
|
python_executable = 'python3'
|
2015-07-27 10:46:43 +08:00
|
|
|
|
2015-07-27 08:52:45 +08:00
|
|
|
harness = '{} {}'.format(python_executable, os.path.join(root, 'harness.py'))
|
2015-06-06 21:58:23 +08:00
|
|
|
config.substitutions.append( ('%python', harness) )
|
2015-07-27 09:16:04 +08:00
|
|
|
|
2015-07-27 10:46:43 +08:00
|
|
|
not_ = '{} {}'.format(python_executable, os.path.join(root, 'not.py'))
|
|
|
|
config.substitutions.append( ('%not', not_) )
|
|
|
|
|
2015-07-27 09:16:04 +08:00
|
|
|
if os.name == 'posix':
|
2015-08-31 23:59:33 +08:00
|
|
|
support_build = os.path.join(root, 'libartiq_support')
|
|
|
|
if subprocess.call(['make', '-sC', support_build]) != 0:
|
2015-07-27 09:16:04 +08:00
|
|
|
lit_config.fatal("Unable to build JIT support library")
|
|
|
|
|
2015-08-31 23:59:33 +08:00
|
|
|
support_lib = os.path.join(support_build, 'libartiq_support.so')
|
|
|
|
config.environment['LIBARTIQ_SUPPORT'] = support_lib
|
2015-07-27 09:16:04 +08:00
|
|
|
|
|
|
|
config.available_features.add('exceptions')
|