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 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
|
|
|
|
|
|
|
if os.name == 'posix':
|
|
|
|
personality_build = os.path.join(root, 'libartiq_personality')
|
|
|
|
if subprocess.call(['make', '-sC', personality_build]) != 0:
|
|
|
|
lit_config.fatal("Unable to build JIT support library")
|
|
|
|
|
|
|
|
personality_lib = os.path.join(personality_build, 'libartiq_personality.so')
|
2015-07-27 09:44:40 +08:00
|
|
|
config.environment['LIBARTIQ_PERSONALITY'] = personality_lib
|
2015-07-27 09:16:04 +08:00
|
|
|
|
|
|
|
config.available_features.add('exceptions')
|