[lld-macho] Avoid requiring shell in tests

There are 3 remaining tests that still have `REQUIRE: shell`:
* color-diagnostics.test -- seems necessary for ANSI escape sequence support
* stabs.s -- the shell part could be removed, but I don't think we can support
  the test on Windows anyway due to its reliance on `touch` to set the modtime
* framework.s -- uses symlinks, I'm not sure this works on Windows

Addresses PR49512.

Reviewed By: #lld-macho, alexshap

Differential Revision: https://reviews.llvm.org/D98395
This commit is contained in:
Jez Ng 2021-03-11 13:28:14 -05:00
parent a723db92d8
commit d1e57ee99a
4 changed files with 20 additions and 11 deletions

View File

@ -1,7 +1,9 @@
# REQUIRES: aarch64, shell
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o
# RUN: %lld -dylib -arch arm64 -lSystem -o %t %t.o
# RUN: (llvm-objdump --syms %t; llvm-objdump --macho -d --section=__const %t) | FileCheck %s
# RUN: llvm-objdump --syms %t > %t.objdump
# RUN: llvm-objdump --macho -d --section=__const %t >> %t.objdump
# RUN: FileCheck %s < %t.objdump
# CHECK-LABEL: SYMBOL TABLE:
# CHECK-DAG: [[#%x,PTR_1:]] l O __DATA_CONST,__const _ptr_1

View File

@ -1,4 +1,4 @@
# REQUIRES: x86, shell
# REQUIRES: x86
# RUN: mkdir -p %t
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %p/Inputs/libhello.s \
# RUN: -o %t/libhello.o
@ -19,8 +19,9 @@
## symbol each entry points to. So we call objdump twice in order to get the
## disassembly of __text and the bind tables first, which allow us to check for
## matching entries in __stubs.
# RUN: (llvm-objdump -d --no-show-raw-insn --syms --rebase --bind --lazy-bind %t/dylink-lazy; \
# RUN: llvm-objdump -D --no-show-raw-insn %t/dylink-lazy) | FileCheck %s
# RUN: llvm-objdump -d --no-show-raw-insn --syms --rebase --bind --lazy-bind %t/dylink-lazy > %t/objdump
# RUN: llvm-objdump -D --no-show-raw-insn %t/dylink-lazy >> %t/objdump
# RUN: FileCheck %s < %t/objdump
# RUN: %lld -pie -o %t/dylink-lazy-pie \
# RUN: -L%t -lhello -lgoodbye %t/dylink-lazy.o -lSystem

View File

@ -1,11 +1,12 @@
# REQUIRES: x86, shell
# UNSUPPORTED: system-windows
# REQUIRES: x86
# RUN: split-file %s %t
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/basic.s -o %t.basic.o
# RUN: %lld %t.basic.o -o %t.basic
# RUN: (llvm-objdump --syms %t.basic; llvm-objdump --macho --function-starts %t.basic) | FileCheck %s --check-prefix=BASIC
# RUN: llvm-objdump --syms %t.basic > %t.objdump
# RUN: llvm-objdump --macho --function-starts %t.basic >> %t.objdump
# RUN: FileCheck %s --check-prefix=BASIC < %t.objdump
# BASIC: SYMBOL TABLE:
# BASIC-NEXT: [[#%x,MAIN:]] g F __TEXT,__text _main
@ -17,7 +18,9 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/alias.s -o %t.alias.o
# RUN: %lld %t.alias.o -o %t.alias
# RUN: (llvm-objdump --syms %t.alias; llvm-objdump --macho --function-starts %t.alias) | FileCheck %s --check-prefix=ALIAS
# RUN: llvm-objdump --syms %t.alias > %t.objdump
# RUN: llvm-objdump --macho --function-starts %t.alias >> %t.objdump
# RUN: FileCheck %s --check-prefix=ALIAS < %t.objdump
# ALIAS: SYMBOL TABLE:
# ALIAS-NEXT: [[#%x,F2:]] l F __TEXT,__text _f2

View File

@ -1,7 +1,10 @@
# REQUIRES: x86, shell
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
# RUN: %lld -o %t %t.o
# RUN: (llvm-readobj --macho-segment %t; echo "Total file size"; wc -c %t) | FileCheck %s
# RUN: llvm-readobj --macho-segment %t > %t.out
# RUN: echo "Total file size" >> %t.out
# RUN: wc -c %t >> %t.out
# RUN: FileCheck %s < %t.out
## These two segments must always be present at the start of an executable.
# CHECK-NOT: Segment {