summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-04-26 19:04:35 +0000
committerRui Ueyama <ruiu@google.com>2016-04-26 19:04:35 +0000
commit3578d334fb67256176100bbf73af4d86e4006e10 (patch)
tree987f88f8bd0c27c7ff7737139d1adfe47798052c
parent1af58fc1e545847e67cbc6a6e8c530b19845d908 (diff)
downloadbcm5719-llvm-3578d334fb67256176100bbf73af4d86e4006e10.tar.gz
bcm5719-llvm-3578d334fb67256176100bbf73af4d86e4006e10.zip
Make test/ELF/reproduces.s test to work on Windows.
Previously, the test didn't work on Windows because it tried to concatenate two (possibly) absolute paths. If two paths are absolute paths that have drive letters, then the result would become something like C:\foo\D:\bar. That's not a valid path. I changed the test to use relative paths. llvm-svn: 267588
-rw-r--r--lld/test/ELF/reproduce.s31
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
OpenPOWER on IntegriCloud