# -*- Python -*- import os import platform import re import subprocess import locale import lit.formats import lit.util from lit.llvm import llvm_config # Configuration file for the 'lit' test runner. # name: The name of this test suite. config.name = 'lld' # testFormat: The test format to use to interpret tests. # # For now we require '&&' between commands, until they get globally killed and # the test runner updated. config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell) # suffixes: A list of file extensions to treat as test files. config.suffixes = ['.ll', '.s', '.test', '.yaml', '.objtxt'] # excludes: A list of directories to exclude from the testsuite. The 'Inputs' # subdirectories contain auxiliary inputs for various tests in their parent # directories. config.excludes = ['Inputs'] # test_source_root: The root path where tests are located. config.test_source_root = os.path.dirname(__file__) config.test_exec_root = os.path.join(config.lld_obj_root, 'test') # Tweak the PATH to include the tools dir and the scripts dir. llvm_config.with_environment('PATH', [config.llvm_tools_dir, config.lld_tools_dir], append_path=True) llvm_config.with_environment('LD_LIBRARY_PATH', [config.lld_libs_dir, config.llvm_libs_dir], append_path=True) # For each occurrence of a lld tool name as its own word, replace it # with the full path to the build directory holding that tool. This # ensures that we are testing the tools just built and not some random # tools that might happen to be in the user's PATH. # Regex assertions to reject neighbor hyphens/dots (seen in some tests). # For example, we want to prefix 'lld' and 'ld.lld' but not the 'lld' inside # of 'ld.lld'. NoPreJunk = r"(?