diff --git a/bolt/test/AArch64/lit.local.cfg b/bolt/test/AArch64/lit.local.cfg --- a/bolt/test/AArch64/lit.local.cfg +++ b/bolt/test/AArch64/lit.local.cfg @@ -1,7 +1,7 @@ -if 'AArch64' not in config.root.targets: +if "AArch64" not in config.root.targets: config.unsupported = True -flags = '--target=aarch64-pc-linux -nostartfiles -nostdlib -ffreestanding' +flags = "--target=aarch64-pc-linux -nostartfiles -nostdlib -ffreestanding" -config.substitutions.insert(0, ('%cflags', f'%cflags {flags}')) -config.substitutions.insert(0, ('%cxxflags', f'%cxxflags {flags}')) +config.substitutions.insert(0, ("%cflags", f"%cflags {flags}")) +config.substitutions.insert(0, ("%cxxflags", f"%cxxflags {flags}")) diff --git a/bolt/test/X86/lit.local.cfg b/bolt/test/X86/lit.local.cfg --- a/bolt/test/X86/lit.local.cfg +++ b/bolt/test/X86/lit.local.cfg @@ -1,7 +1,7 @@ -if not 'X86' in config.root.targets: +if not "X86" in config.root.targets: config.unsupported = True -flags = '--target=x86_64-pc-linux -nostdlib' +flags = "--target=x86_64-pc-linux -nostdlib" -config.substitutions.insert(0, ('%cflags', f'%cflags {flags}')) -config.substitutions.insert(0, ('%cxxflags', f'%cxxflags {flags}')) +config.substitutions.insert(0, ("%cflags", f"%cflags {flags}")) +config.substitutions.insert(0, ("%cxxflags", f"%cxxflags {flags}")) diff --git a/bolt/test/lit.local.cfg b/bolt/test/lit.local.cfg --- a/bolt/test/lit.local.cfg +++ b/bolt/test/lit.local.cfg @@ -1,6 +1,6 @@ -host_linux_triple = config.target_triple.split('-')[0]+'-linux' -common_linker_flags = '-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all' -flags = f'--target={host_linux_triple} {common_linker_flags}' +host_linux_triple = config.target_triple.split("-")[0] + "-linux" +common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all" +flags = f"--target={host_linux_triple} {common_linker_flags}" -config.substitutions.insert(0, ('%cflags', f'%cflags {flags}')) -config.substitutions.insert(0, ('%cxxflags', f'%cxxflags {flags}')) +config.substitutions.insert(0, ("%cflags", f"%cflags {flags}")) +config.substitutions.insert(0, ("%cxxflags", f"%cxxflags {flags}")) diff --git a/bolt/test/runtime/AArch64/lit.local.cfg b/bolt/test/runtime/AArch64/lit.local.cfg --- a/bolt/test/runtime/AArch64/lit.local.cfg +++ b/bolt/test/runtime/AArch64/lit.local.cfg @@ -1,2 +1,2 @@ -if config.host_arch not in ['aarch64']: +if config.host_arch not in ["aarch64"]: config.unsupported = True diff --git a/bolt/test/runtime/X86/lit.local.cfg b/bolt/test/runtime/X86/lit.local.cfg --- a/bolt/test/runtime/X86/lit.local.cfg +++ b/bolt/test/runtime/X86/lit.local.cfg @@ -1,2 +1,2 @@ -if config.host_arch not in ['x86', 'X86', 'x86_64']: +if config.host_arch not in ["x86", "X86", "x86_64"]: config.unsupported = True diff --git a/bolt/test/runtime/lit.local.cfg b/bolt/test/runtime/lit.local.cfg --- a/bolt/test/runtime/lit.local.cfg +++ b/bolt/test/runtime/lit.local.cfg @@ -1,3 +1,3 @@ # Tests are not expected to pass in a cross-compilation setup. -if not {'native', 'system-linux'}.issubset(config.available_features): - config.unsupported = True +if not {"native", "system-linux"}.issubset(config.available_features): + config.unsupported = True diff --git a/cross-project-tests/amdgpu/lit.local.cfg b/cross-project-tests/amdgpu/lit.local.cfg --- a/cross-project-tests/amdgpu/lit.local.cfg +++ b/cross-project-tests/amdgpu/lit.local.cfg @@ -1,2 +1,2 @@ -if 'clang' not in config.available_features or 'AMDGPU' not in config.targets_to_build: +if "clang" not in config.available_features or "AMDGPU" not in config.targets_to_build: config.unsupported = True diff --git a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/lit.local.cfg b/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/lit.local.cfg --- a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/lit.local.cfg +++ b/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/lit.local.cfg @@ -1,3 +1,3 @@ # In MSVC mode DWARF isn't produced & is needed for these tests -if 'native' not in config.available_features or config.is_msvc: +if "native" not in config.available_features or config.is_msvc: config.unsupported = True diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/lit.local.cfg b/cross-project-tests/debuginfo-tests/dexter-tests/lit.local.cfg --- a/cross-project-tests/debuginfo-tests/dexter-tests/lit.local.cfg +++ b/cross-project-tests/debuginfo-tests/dexter-tests/lit.local.cfg @@ -1,2 +1,2 @@ -if 'dexter' not in config.available_features: +if "dexter" not in config.available_features: config.unsupported = True diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/lit.local.cfg b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/lit.local.cfg --- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/lit.local.cfg +++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/lit.local.cfg @@ -1,4 +1,3 @@ # The dbgeng driver doesn't support DexLimitSteps yet. if config.is_msvc: config.unsupported = True - diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/lit.local.cfg b/cross-project-tests/debuginfo-tests/dexter/feature_tests/lit.local.cfg --- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/lit.local.cfg +++ b/cross-project-tests/debuginfo-tests/dexter/feature_tests/lit.local.cfg @@ -1,5 +1,5 @@ -if 'dexter' not in config.available_features: +if "dexter" not in config.available_features: config.unsupported = True config.name = "DExTer feature tests" -config.suffixes = ['.cpp', '.c', '.test'] +config.suffixes = [".cpp", ".c", ".test"] diff --git a/cross-project-tests/debuginfo-tests/lit.local.cfg b/cross-project-tests/debuginfo-tests/lit.local.cfg --- a/cross-project-tests/debuginfo-tests/lit.local.cfg +++ b/cross-project-tests/debuginfo-tests/lit.local.cfg @@ -1,2 +1,2 @@ -if 'clang' not in config.available_features: +if "clang" not in config.available_features: config.unsupported = True diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/lit.local.cfg b/cross-project-tests/debuginfo-tests/llgdb-tests/lit.local.cfg --- a/cross-project-tests/debuginfo-tests/llgdb-tests/lit.local.cfg +++ b/cross-project-tests/debuginfo-tests/llgdb-tests/lit.local.cfg @@ -1,5 +1,3 @@ # debuginfo-tests are not expected to pass in a cross-compilation setup. -if 'native' not in config.available_features or config.is_msvc: +if "native" not in config.available_features or config.is_msvc: config.unsupported = True - - diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg --- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg +++ b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg @@ -1,13 +1,11 @@ import lit.util # debuginfo-tests are not expected to pass in a cross-compilation setup. -if 'native' not in config.available_features or lit.util.which('gdb') is None: +if "native" not in config.available_features or lit.util.which("gdb") is None: config.unsupported = True if config.mlir_src_root: - config.substitutions.append(("%mlir_src_root", config.mlir_src_root)) - config.available_features.add('mlir') - -config.suffixes = ['.gdb'] - + config.substitutions.append(("%mlir_src_root", config.mlir_src_root)) + config.available_features.add("mlir") +config.suffixes = [".gdb"] diff --git a/cross-project-tests/intrinsic-header-tests/lit.local.cfg b/cross-project-tests/intrinsic-header-tests/lit.local.cfg --- a/cross-project-tests/intrinsic-header-tests/lit.local.cfg +++ b/cross-project-tests/intrinsic-header-tests/lit.local.cfg @@ -1,2 +1,2 @@ -if 'clang' not in config.available_features: +if "clang" not in config.available_features: config.unsupported = True diff --git a/flang/test/lib/lit.local.cfg b/flang/test/lib/lit.local.cfg --- a/flang/test/lib/lit.local.cfg +++ b/flang/test/lib/lit.local.cfg @@ -1,7 +1,28 @@ - -# Excluding .cpp file from the extensions since from this level down they are used for the development -config.suffixes = ['.c', '.f', '.F', '.ff', '.FOR', '.for', '.f77', '.f90', '.F90', - '.ff90', '.f95', '.F95', '.ff95', '.fpp', '.FPP', '.cuf' - '.CUF', '.f18', '.F18', '.f03', '.F03', '.f08', '.F08', - '.ll', '.fir', '.mlir'] - +# Excluding .cpp file from the extensions since from this level down they are used for the development +config.suffixes = [ + ".c", + ".f", + ".F", + ".ff", + ".FOR", + ".for", + ".f77", + ".f90", + ".F90", + ".ff90", + ".f95", + ".F95", + ".ff95", + ".fpp", + ".FPP", + ".cuf" ".CUF", + ".f18", + ".F18", + ".f03", + ".F03", + ".f08", + ".F08", + ".ll", + ".fir", + ".mlir", +] diff --git a/lld/test/COFF/lit.local.cfg b/lld/test/COFF/lit.local.cfg --- a/lld/test/COFF/lit.local.cfg +++ b/lld/test/COFF/lit.local.cfg @@ -1 +1 @@ -config.environment['LLD_IN_TEST'] = '2' +config.environment["LLD_IN_TEST"] = "2" diff --git a/lld/test/ELF/lit.local.cfg b/lld/test/ELF/lit.local.cfg --- a/lld/test/ELF/lit.local.cfg +++ b/lld/test/ELF/lit.local.cfg @@ -1,8 +1,8 @@ -config.suffixes = ['.test', '.s', '.ll', '.bat'] +config.suffixes = [".test", ".s", ".ll", ".bat"] # The environment variable DFLTCC=0 disables use of the hardware compression # facility on SystemZ. When this facility is enabled, slightly different # compression results can be seen, which can cause spurious failures in the # compressed-debug-level.test test case. -if 's390x' in config.host_triple: - config.environment['DFLTCC'] = '0' +if "s390x" in config.host_triple: + config.environment["DFLTCC"] = "0" diff --git a/lld/test/MachO/lit.local.cfg b/lld/test/MachO/lit.local.cfg --- a/lld/test/MachO/lit.local.cfg +++ b/lld/test/MachO/lit.local.cfg @@ -5,7 +5,7 @@ # FIXME: The MachO back-end currently does not respect endianness when # accessing binary data structures, and therefore only works correctly # on little-endian host systems. Skip all tests on big-endian hosts. -if sys.byteorder == 'big': +if sys.byteorder == "big": config.unsupported = True # We specify the most commonly-used archs and platform versions in our tests @@ -16,17 +16,21 @@ # flag will append to the set of library roots. As such, we define a separate # alias for each platform. -lld_watchos = ('ld64.lld -lSystem -arch arm64_32 -platform_version watchos 7.0 8.0 -syslibroot ' + - os.path.join(config.test_source_root, "MachO", "Inputs", "WatchOS.sdk")) -config.substitutions.append(('%lld-watchos', lld_watchos + ' -fatal_warnings')) -config.substitutions.append(('%no-fatal-warnings-lld-watchos', lld_watchos)) +lld_watchos = ( + "ld64.lld -lSystem -arch arm64_32 -platform_version watchos 7.0 8.0 -syslibroot " + + os.path.join(config.test_source_root, "MachO", "Inputs", "WatchOS.sdk") +) +config.substitutions.append(("%lld-watchos", lld_watchos + " -fatal_warnings")) +config.substitutions.append(("%no-fatal-warnings-lld-watchos", lld_watchos)) -config.substitutions.append(('%no-arg-lld', 'ld64.lld')) +config.substitutions.append(("%no-arg-lld", "ld64.lld")) # Since most of our tests are written around x86_64, we give this platform the # shortest substitution of "%lld". -lld = ('ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot ' + - os.path.join(config.test_source_root, "MachO", "Inputs", "MacOSX.sdk")) -config.substitutions.append(('%lld', lld + ' -lSystem -fatal_warnings')) -config.substitutions.append(('%no-lsystem-lld', lld + ' -fatal_warnings')) -config.substitutions.append(('%no-fatal-warnings-lld', lld + ' -lSystem')) +lld = ( + "ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot " + + os.path.join(config.test_source_root, "MachO", "Inputs", "MacOSX.sdk") +) +config.substitutions.append(("%lld", lld + " -lSystem -fatal_warnings")) +config.substitutions.append(("%no-lsystem-lld", lld + " -fatal_warnings")) +config.substitutions.append(("%no-fatal-warnings-lld", lld + " -lSystem")) diff --git a/lld/test/wasm/lit.local.cfg b/lld/test/wasm/lit.local.cfg --- a/lld/test/wasm/lit.local.cfg +++ b/lld/test/wasm/lit.local.cfg @@ -1,4 +1,4 @@ -if 'wasm' not in config.available_features: - config.unsupported = True +if "wasm" not in config.available_features: + config.unsupported = True -config.suffixes = ['.test', '.yaml', '.ll', '.s'] +config.suffixes = [".test", ".yaml", ".ll", ".s"] diff --git a/pstl/test/std/lit.local.cfg b/pstl/test/std/lit.local.cfg --- a/pstl/test/std/lit.local.cfg +++ b/pstl/test/std/lit.local.cfg @@ -1,2 +1,2 @@ -if 'parallel-algorithms' not in config.available_features: +if "parallel-algorithms" not in config.available_features: config.unsupported = True