artiq/artiq/test/lit/lit.cfg

36 lines
1.0 KiB
Python

# -*- python -*-
import os
import sys
import 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"]
if os.getenv("COVERAGE"):
config.environment["COVERAGE_FILE"] = os.path.join(root, "..", ".coverage")
python = "coverage run --parallel-mode --source=artiq"
else:
python = sys.executable
config.substitutions.append( ("%python", python) )
config.environment["PYTHONPATH"] = os.getenv("PYTHONPATH")
not_ = "{} {}".format(sys.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")