Explicitly disallow using lldb instead of %lldb in the shell tests. This is a clever trick that is used by Swift to achieve the same results.
For example, this would've caught the use of lldb in PT_LOAD-overlap-PT_TLS.yaml:
FAIL: lldb-shell :: ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml (50 of 305) ******************** TEST 'lldb-shell :: ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml' FAILED ******************** Script: -- : 'RUN: at line 3'; /Volumes/Jonas/llvm/build-ra/bin/yaml2obj /Volumes/Jonas/llvm/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml > /Volumes/Jonas/llvm/build-ra/tools/lldb/test/ObjectFile/ELF/Output/PT_LOAD-overlap-PT_TLS.yaml.tmp : 'RUN: at line 4'; /Volumes/Jonas/llvm/build-ra/bin/lldb-test object-file /Volumes/Jonas/llvm/build-ra/tools/lldb/test/ObjectFile/ELF/Output/PT_LOAD-overlap-PT_TLS.yaml.tmp | /Volumes/Jonas/llvm/build-ra/bin/FileCheck /Volumes/Jonas/llvm/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml : 'RUN: at line 5'; echo '*** Do not use 'lldb' in tests; use '%''lldb'. ***' && exit 1 && echo /Volumes/Jonas/llvm/build-ra/tools/lldb/test/ObjectFile/ELF/Output/PT_LOAD-overlap-PT_TLS.yaml.tmp -o "image lookup -a 0x1000" -b | /Volumes/Jonas/llvm/build-ra/bin/FileCheck --check-prefix=LOOKUP /Volumes/Jonas/llvm/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml -- Exit Code: 1 Command Output (stdout): -- *** Do not use lldb in tests; use %lldb. ***
Wow, that took a couple of reads to figure out what was being formatted where. I wish that there was a nicer way to write that.