2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-02-08 08:35:22 +08:00
artiq/artiq/test/lit/lit.cfg
whitequark 2648b1b7a1 firmware: migrate to Rust 1.28.0.
This also updates / is a prerequisite for updating smoltcp.

Rationale for changes made:
  * compiler_builtins is now shipped in the rust prefix.
  * rustc's libpanic_unwind no longer works for us because it
    has a hard dependency on Box (and it's a horrible hack);
    fortunately, we only ever needed a personality function
    from it.
  * panic and oom handlers are now set in a completely different
    way.
  * allocators are quite different (and finally stable).
  * NLL caused internal compiler errors in runtime, so code using
    NLL was rewritten to not rely on it and it was turned off.
2018-08-12 19:17:45 +00:00

42 lines
1.3 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"]
config.excludes = ["not.py", "device_db.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) )
if os.getenv("PYTHONPATH"):
config.environment["PYTHONPATH"] = os.getenv("PYTHONPATH")
not_ = "{} {}".format(sys.executable, os.path.join(root, "lit", "not.py"))
config.substitutions.append( ("%not", not_) )
if os.name == "posix":
support_build = os.path.join(root, "libartiq_support")
if subprocess.call(["rustc", os.path.join(support_build, "lib.rs"),
"--out-dir", support_build,
"-Cpanic=unwind", "-g"]) != 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.environment["RUST_BACKTRACE"] = "1"
config.available_features.add("exceptions")
config.available_features.add("time")