import lit.util
# python 2.7 backwards compatibility
try:
from shlex import quote as shell_quote
except ImportError:
from pipes import quote as shell_quote
if config.standalone_build:
# These tests require the update-verify-tests.py script from the clang
# source tree, so skip these tests if we are doing standalone builds.
config.unsupported = True
else:
config.suffixes = [".test"]
script_path = os.path.join(
config.clang_src_dir, "utils", "update-verify-tests.py"
)
python = shell_quote(config.python_executable)
config.substitutions.append(
(
"%update-verify-tests",
"%s %s" % (python, shell_quote(script_path)),
)
)
# AIX 'diff' command doesn't support --strip-trailing-cr, but the internal
# python implementation does, so use that for cross platform compatibility
config.test_format = lit.formats.ShTest()