Files

26 lines
1.0 KiB
INI

# Local lit config for test/Distributed/Embedded/.
#
# These tests use the same Embedded Swift toolchain setup as test/embedded/:
# bump the deployment target, gate on `embedded_stdlib`, and provide the
# `%target-embedded-link` / `%target-embedded-posix-shim` substitutions.
# Rather than duplicate the logic from test/embedded/lit.local.cfg, just
# re-execute it.
import os
# Make a local copy of the substitutions.
config.substitutions = list(config.substitutions)
# Re-use the same setup as test/embedded/lit.local.cfg lives in the sibling
# tree. Compute the path relative to this file so it works regardless of
# where the swift source tree lives.
_embedded_local_cfg = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
os.pardir, os.pardir, "embedded", "lit.local.cfg",
)
if os.path.exists(_embedded_local_cfg):
# `lit_config`, `config`, and helpers are exposed by lit when this file
# is evaluated. Sourcing the file with `exec` lets us reuse it verbatim.
with open(_embedded_local_cfg) as _f:
exec(_f.read(), globals())