[PATCH] D98395: [lld-macho] Avoid requiring shell in tests

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 10:29:02 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd1e57ee99aa8: [lld-macho] Avoid requiring shell in tests (authored by int3).

Changed prior to commit:
  https://reviews.llvm.org/D98395?vs=329853&id=330022#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98395/new/

https://reviews.llvm.org/D98395

Files:
  lld/test/MachO/arm64-relocs.s
  lld/test/MachO/dylink-lazy.s
  lld/test/MachO/function-starts.s
  lld/test/MachO/segments.s


Index: lld/test/MachO/segments.s
===================================================================
--- lld/test/MachO/segments.s
+++ lld/test/MachO/segments.s
@@ -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 {
Index: lld/test/MachO/function-starts.s
===================================================================
--- lld/test/MachO/function-starts.s
+++ lld/test/MachO/function-starts.s
@@ -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
Index: lld/test/MachO/dylink-lazy.s
===================================================================
--- lld/test/MachO/dylink-lazy.s
+++ lld/test/MachO/dylink-lazy.s
@@ -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
Index: lld/test/MachO/arm64-relocs.s
===================================================================
--- lld/test/MachO/arm64-relocs.s
+++ lld/test/MachO/arm64-relocs.s
@@ -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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98395.330022.patch
Type: text/x-patch
Size: 3725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210311/cbac0517/attachment.bin>


More information about the llvm-commits mailing list