lit.cfg.py 858 B

1234567891011121314151617181920212223242526272829303132333435
  1. __copyright__ = """
  2. Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  3. Exceptions. See /LICENSE for license information.
  4. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  5. """
  6. import lit.formats
  7. import os
  8. # This is a provided variable, ignore the undefined name warning.
  9. config = config # noqa: F821
  10. def fullpath(relative_path):
  11. return os.path.join(os.environ["TEST_SRCDIR"], relative_path)
  12. config.name = "lit"
  13. config.suffixes = [".carbon"]
  14. config.test_format = lit.formats.ShTest()
  15. config.substitutions.append(
  16. (
  17. "%{carbon}",
  18. fullpath("carbon/toolchain/driver/carbon"),
  19. )
  20. )
  21. config.substitutions.append(("%{not}", fullpath("llvm-project/llvm/not")))
  22. config.substitutions.append(
  23. (
  24. "%{FileCheck}",
  25. fullpath("llvm-project/llvm/FileCheck --dump-input-filter=all"),
  26. )
  27. )