https://bugs.llvm.org/show_bug.cgi?id=49512

            Bug ID: 49512
           Summary: lld/test/MachO tests should require shell less
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

LLVM is a cross-platform project, and tests should run on all platforms as much
as possible. People should be able to hack on lld/MachO on Windows if they so
choose.

Despite lld/MachO being the youngest lld port, it already has the most tests
that require shell:

thakis@MBP llvm-project % rg -l shell lld/test/COFF | wc -l
       3
thakis@MBP llvm-project % rg -l shell lld/test/ELF | wc -l
       5
thakis@MBP llvm-project % rg -l shell lld/test/MachO | wc -l
       7


This is a bad pattern and we should stop it. It looks almost all of these are
due to this pattern:

# RUN: (llvm-objdump --syms %t.basic; llvm-objdump --macho --function-starts
%t.basic) | FileCheck %s --check-prefix=BASIC


Instead, we probably just:

# RUN: llvm-objdump --syms %t.basic > %t-objdump.txt
# RUN: llvm-objdump --macho --function-starts %t.basic >> %t-objdump.txt
# RUN: FileCheck %s --check-prefix=BASIC < %t-objdump.txt

That's marginally longer, but it's easy to understand. Alternatively, maybe we
could change llvm-objdump to be able to dump both symbols and something else
but dump symbols first."Slightly longer but easy to understand" seems like a
good option to me though :)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to