[NFC][Py Reformat] Reformat lit.local.cfg python files in llvm

This is a follow-up to b71edfaa4ec3c998aadb35255ce2f60bba2940b0
since I forgot the lit.local.cfg files in that one.

Reformatting is done with `black`.

If you end up having problems merging this commit because you
have made changes to a python file, the best way to handle that
is to run git checkout --ours <yourfile> and then reformat it
with black.

If you run into any problems, post to discourse about it and
we will try to help.

RFC Thread below:

https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Reviewed By: barannikov88, kwk

Differential Revision: https://reviews.llvm.org/D150762
This commit is contained in:
Tobias Hieta 2023-05-17 11:01:54 +02:00
parent cf8c358dc9
commit f84bac329b
No known key found for this signature in database
GPG Key ID: 44F2485E45D59042
428 changed files with 681 additions and 627 deletions

View File

@ -1,2 +1,2 @@
if not 'AArch64' in config.root.targets:
if not "AArch64" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AMDGPU' in config.root.targets:
if not "AMDGPU" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'ARM' in config.root.targets:
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'PowerPC' in config.root.targets:
if not "PowerPC" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'RISCV' in config.root.targets:
if not "RISCV" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'SystemZ' in config.root.targets:
if not "SystemZ" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1 +1 @@
config.suffixes = ['.ll']
config.suffixes = [".ll"]

View File

@ -1,2 +1,2 @@
if not 'AMDGPU' in config.root.targets:
if not "AMDGPU" in config.root.targets:
config.unsupported = True

View File

@ -1 +1 @@
config.suffixes = ['.ll']
config.suffixes = [".ll"]

View File

@ -1,2 +1,2 @@
if not 'PowerPC' in config.root.targets:
if not "PowerPC" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AMDGPU' in config.root.targets:
if not "AMDGPU" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'NVPTX' in config.root.targets:
if not "NVPTX" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
# This is a directory for utility functions. No test here.
config.suffixes = ['.dummy']
config.suffixes = [".dummy"]

View File

@ -1,4 +1,4 @@
config.suffixes = ['.ml']
config.suffixes = [".ml"]
if not 'ocaml' in config.root.llvm_bindings:
if not "ocaml" in config.root.llvm_bindings:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AArch64' in config.root.targets:
if not "AArch64" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AMDGPU' in config.root.targets:
if not "AMDGPU" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'ARC' in config.root.targets:
if not "ARC" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'ARM' in config.root.targets:
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AVR' in config.root.targets:
if not "AVR" in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,4 @@
if not 'BPF' in config.root.targets:
if not "BPF" in config.root.targets:
config.unsupported = True
if 'system-aix' in config.available_features:
if "system-aix" in config.available_features:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'CSKY' in config.root.targets:
if not "CSKY" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'CSKY' in config.root.targets:
if not "CSKY" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'DirectX' in config.root.targets:
config.unsupported = True
if not "DirectX" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Hexagon' in config.root.targets:
if not "Hexagon" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Lanai' in config.root.targets:
if not "Lanai" in config.root.targets:
config.unsupported = True

View File

@ -1,13 +1,16 @@
import os
config.suffixes = ['.ll', '.mir', '.test', '.txt']
config.suffixes = [".ll", ".mir", ".test", ".txt"]
extract_section_path = os.path.join(config.llvm_src_root,
'utils', 'extract-section.py')
extract_section_path = os.path.join(config.llvm_src_root, "utils", "extract-section.py")
config.substitutions.append(('extract-section',
"'%s' %s %s" % (config.python_executable,
extract_section_path, '--bits-endian little')))
config.substitutions.append(
(
"extract-section",
"'%s' %s %s"
% (config.python_executable, extract_section_path, "--bits-endian little"),
)
)
if not 'LoongArch' in config.root.targets:
if not "LoongArch" in config.root.targets:
config.unsupported = True

View File

@ -1,14 +1,20 @@
import os
config.suffixes = ['.ll', '.mir', '.test', '.txt']
config.suffixes = [".ll", ".mir", ".test", ".txt"]
extract_section_path = os.path.join(config.llvm_src_root,
'utils', 'extract-section.py')
extract_section_path = os.path.join(config.llvm_src_root, "utils", "extract-section.py")
config.substitutions.append(('extract-section',
"'%s' %s %s" % (config.python_executable,
extract_section_path, '--byte-indicator --hex-width=2')))
config.substitutions.append(
(
"extract-section",
"'%s' %s %s"
% (
config.python_executable,
extract_section_path,
"--byte-indicator --hex-width=2",
),
)
)
if not 'M68k' in config.root.targets:
if not "M68k" in config.root.targets:
config.unsupported = True

View File

@ -1,8 +1,8 @@
import re
if not 'AArch64' in config.root.targets:
if not "AArch64" in config.root.targets:
config.unsupported = True
# For now we don't test arm64-win32.
if re.search(r'cygwin|mingw32|win32|windows-gnu|windows-msvc', config.target_triple):
if re.search(r"cygwin|mingw32|win32|windows-gnu|windows-msvc", config.target_triple):
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AMDGPU' in config.root.targets:
if not "AMDGPU" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'ARM' in config.root.targets:
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if 'native' not in config.available_features:
if "native" not in config.available_features:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Hexagon' in config.root.targets:
if not "Hexagon" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Mips' in config.root.targets:
if not "Mips" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'NVPTX' in config.root.targets:
if not "NVPTX" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'PowerPC' in config.root.targets:
if not "PowerPC" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'RISCV' in config.root.targets:
if not "RISCV" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'WebAssembly' in config.root.targets:
if not "WebAssembly" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'MSP430' in config.root.targets:
if not "MSP430" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Mips' in config.root.targets:
if not "Mips" in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,3 @@
if not 'NVPTX' in config.root.targets:
if not "NVPTX" in config.root.targets:
config.unsupported = True
config.suffixes.add('.py')
config.suffixes.add(".py")

View File

@ -1,4 +1,4 @@
if not 'PowerPC' in config.root.targets:
if not "PowerPC" in config.root.targets:
config.unsupported = True
config.suffixes.add('.py')
config.suffixes.add(".py")

View File

@ -1,2 +1,2 @@
if not 'RISCV' in config.root.targets:
if not "RISCV" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Sparc' in config.root.targets:
if not "Sparc" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'SPIRV' in config.root.targets:
if not "SPIRV" in config.root.targets:
config.unsupported = True

View File

@ -1,9 +1,9 @@
config.suffixes = [ '.ll', '.py' ]
config.suffixes = [".ll", ".py"]
# These tests take on the order of seconds to run, so skip them unless
# we're running long tests.
if 'long_tests' not in config.available_features:
if "long_tests" not in config.available_features:
config.unsupported = True
if not 'SystemZ' in config.root.targets:
if not "SystemZ" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'SystemZ' in config.root.targets:
if not "SystemZ" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'ARM' in config.root.targets:
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'ARM' in config.root.targets:
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'VE' in config.root.targets:
if not "VE" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'VE' in config.root.targets:
if not "VE" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'WebAssembly' in config.root.targets:
if not "WebAssembly" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -4,8 +4,8 @@
#
# It should be possible to remove this override once all the bots have cycled
# cleanly.
config.suffixes = ['.ll', '.test', '.txt']
config.suffixes = [".ll", ".test", ".txt"]
# FIXME: Add Windows on ARM support to these tests.
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'XCore' in config.root.targets:
if not "XCore" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AArch64' in config.root.targets:
if not "AArch64" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AMDGPU' in config.root.targets:
if not "AMDGPU" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'ARM' in config.root.targets:
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'BPF' in config.root.targets:
if not "BPF" in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
if not 'AArch64' in config.root.targets:
if not "AArch64" in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
if not 'ARM' in config.root.targets:
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'CSKY' in config.root.targets:
if not "CSKY" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Lanai' in config.root.targets:
if not "Lanai" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AArch64' in config.root.targets:
if not "AArch64" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'ARM' in config.root.targets:
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Hexagon' in config.root.targets:
if not "Hexagon" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Mips' in config.root.targets:
if not "Mips" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'SystemZ' in config.root.targets:
if not "SystemZ" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1 +1 @@
config.suffixes = ['.mir']
config.suffixes = [".mir"]

View File

@ -1,2 +1,2 @@
if not 'MSP430' in config.root.targets:
if not "MSP430" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Mips' in config.root.targets:
if not "Mips" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'NVPTX' in config.root.targets:
if not "NVPTX" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'PowerPC' in config.root.targets:
if not "PowerPC" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'RISCV' in config.root.targets:
if not "RISCV" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'Sparc' in config.root.targets:
if not "Sparc" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'SystemZ' in config.root.targets:
if not "SystemZ" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'WebAssembly' in config.root.targets:
if not "WebAssembly" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'PowerPC' in config.root.targets:
if not "PowerPC" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'XCore' in config.root.targets:
if not "XCore" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AArch64' in config.root.targets:
if not "AArch64" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,5 +1,5 @@
if not config.build_examples or sys.platform in ['win32']:
config.unsupported = True
if not config.build_examples or sys.platform in ["win32"]:
config.unsupported = True
# Test discovery should ignore subdirectories that contain test inputs.
config.excludes = ['Inputs']
config.excludes = ["Inputs"]

View File

@ -1,2 +1,2 @@
if not 'ARM' in config.root.targets:
config.unsupported = True
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AArch64' in config.root.targets:
config.unsupported = True
if not "AArch64" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'LoongArch' in config.root.targets:
config.unsupported = True
if not "LoongArch" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'RISCV' in config.root.targets:
if not "RISCV" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
config.unsupported = True
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'X86' in config.root.targets:
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,27 +1,43 @@
root = config.root
targets = root.targets
if ('X86' in targets) | ('AArch64' in targets) | ('ARM' in targets) | \
('Mips' in targets) | ('PowerPC' in targets) | ('SystemZ' in targets):
if (
("X86" in targets)
| ("AArch64" in targets)
| ("ARM" in targets)
| ("Mips" in targets)
| ("PowerPC" in targets)
| ("SystemZ" in targets)
):
config.unsupported = False
else:
config.unsupported = True
# FIXME: autoconf and cmake produce different arch names. We should normalize
# them before getting here.
if root.host_arch not in ['i386', 'x86', 'x86_64', 'AMD64',
'AArch64', 'ARM', 'Mips',
'PowerPC', 'ppc64', 'ppc64le', 'SystemZ']:
if root.host_arch not in [
"i386",
"x86",
"x86_64",
"AMD64",
"AArch64",
"ARM",
"Mips",
"PowerPC",
"ppc64",
"ppc64le",
"SystemZ",
]:
config.unsupported = True
if 'armv7' in root.host_arch:
if "armv7" in root.host_arch:
config.unsupported = False
if 'i386-apple-darwin' in root.target_triple:
if "i386-apple-darwin" in root.target_triple:
config.unsupported = True
if 'powerpc' in root.target_triple and not 'powerpc64' in root.target_triple:
if "powerpc" in root.target_triple and not "powerpc64" in root.target_triple:
config.unsupported = True
# ExecutionEngine tests are not expected to pass in a cross-compilation setup.
if 'native' not in config.available_features:
if "native" not in config.available_features:
config.unsupported = True

View File

@ -1,8 +1,7 @@
if 'armv4' in config.root.target_triple or \
'armv5' in config.root.target_triple:
if "armv4" in config.root.target_triple or "armv5" in config.root.target_triple:
config.unsupported = True
# This is temporary, until Remote MCJIT works on ARM
# See http://llvm.org/bugs/show_bug.cgi?id=18057
#if 'armv7' in config.root.target_triple:
# if 'armv7' in config.root.target_triple:
# config.unsupported = True

View File

@ -1,10 +1,18 @@
import sys
if config.root.host_arch not in ['i386', 'x86', 'x86_64', 'AMD64',
'mips', 'mipsel', 'mips64', 'mips64el',
'loongarch64']:
if config.root.host_arch not in [
"i386",
"x86",
"x86_64",
"AMD64",
"mips",
"mipsel",
"mips64",
"mips64el",
"loongarch64",
]:
config.unsupported = True
# FIXME: These tests don't pass with the COFF rtld.
if sys.platform == 'win32':
if sys.platform == "win32":
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'AArch64' in config.root.targets:
if not "AArch64" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +1,2 @@
if not 'ARM' in config.root.targets:
if not "ARM" in config.root.targets:
config.unsupported = True

Some files were not shown because too many files have changed in this diff Show More