diff options
-rw-r--r-- | lld/test/ELF/reproduce.s | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/lld/test/ELF/reproduce.s b/lld/test/ELF/reproduce.s index 1d448fd22ff..cd279324e71 100644 --- a/lld/test/ELF/reproduce.s +++ b/lld/test/ELF/reproduce.s @@ -1,26 +1,21 @@ -# REQUIRES: x86, shell +# REQUIRES: x86 -# RUN: rm -rf %t.dir/repro -# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o %t2 -shared --as-needed --reproduce %t.dir/repro -# RUN: llvm-objdump -d %t.dir/repro/%t | FileCheck %s --check-prefix=DUMP -# RUN: cat %t.dir/repro/invocation.txt | FileCheck %s --check-prefix=INVOCATION +# RUN: rm -rf %t.dir1 +# RUN: mkdir -p %t.dir1/build +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.dir1/build/foo.o +# RUN: cd %t.dir1 +# RUN: ld.lld build/foo.o -o bar -shared --as-needed --reproduce repro +# RUN: diff build/foo.o repro/build/foo.o -.globl _start; +.globl _start _start: mov $60, %rax mov $42, %rdi syscall -# DUMP: Disassembly of section .text: -# DUMP: _start: -# DUMP: 0: 48 c7 c0 3c 00 00 00 movq $60, %rax -# DUMP: 7: 48 c7 c7 2a 00 00 00 movq $42, %rdi -# DUMP: e: 0f 05 syscall +# RUN: FileCheck %s --check-prefix=INVOCATION < repro/invocation.txt +# INVOCATION: lld{{[^\s]*}} build/foo.o -o bar -shared --as-needed --reproduce repro -# INVOCATION: lld {{.*}}reproduce.s{{.*}} -o {{.*}} -shared --as-needed --reproduce - -# RUN: rm -rf %t.dir/repro2 -# RUN: mkdir %t.dir/repro2 -# RUN: not ld.lld %t -o %t2 --reproduce %t.dir/repro2 2>&1 | FileCheck --check-prefix=EDIR %s -# EDIR: --reproduce: can't create directory +# RUN: not ld.lld build/foo.o -o bar -shared --as-needed --reproduce repro 2>&1 \ +# RUN: | FileCheck --check-prefix=ERROR %s +# ERROR: --reproduce: can't create directory |