[lld] r250057 - ELF2: Do not put temporary files to the test toplevel directory.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 08:58:39 PDT 2015


Author: ruiu
Date: Mon Oct 12 10:58:38 2015
New Revision: 250057

URL: http://llvm.org/viewvc/llvm-project?rev=250057&view=rev
Log:
ELF2: Do not put temporary files to the test toplevel directory.

Modified:
    lld/trunk/test/elf2/libsearch.s
    lld/trunk/test/elf2/linkerscript2.s

Modified: lld/trunk/test/elf2/libsearch.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/libsearch.s?rev=250057&r1=250056&r2=250057&view=diff
==============================================================================
--- lld/trunk/test/elf2/libsearch.s (original)
+++ lld/trunk/test/elf2/libsearch.s Mon Oct 12 10:58:38 2015
@@ -3,10 +3,11 @@
 // RUN:   %p/Inputs/libsearch-dyn.s -o %tdyn.o
 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
 // RUN:   %p/Inputs/libsearch-st.s -o %tst.o
-// RUN: ld.lld2 -shared %tdyn.o -o %T/libls.so
-// RUN: cp -f %T/libls.so %T/libls2.so
-// RUN: rm -f %T/libls.a
-// RUN: llvm-ar rcs %T/libls.a %tst.o
+// RUN: mkdir -p %t.dir
+// RUN: ld.lld2 -shared %tdyn.o -o %t.dir/libls.so
+// RUN: cp -f %t.dir/libls.so %t.dir/libls2.so
+// RUN: rm -f %t.dir/libls.a
+// RUN: llvm-ar rcs %t.dir/libls.a %tst.o
 // REQUIRES: x86
 
 // Should not link because of undefined symbol _bar
@@ -20,56 +21,56 @@
 // NOLIB: Unable to find library -lls
 
 // Should use explicitly specified static library
-// RUN: ld.lld2 -o %t3 %t.o -L%T -l:libls.a
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -l:libls.a
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
 // STATIC: Symbols [
 // STATIC: Name: _static
 // STATIC: ]
 
 // Should use explicitly specified dynamic library
-// RUN: ld.lld2 -o %t3 %t.o -L%T -l:libls.so
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -l:libls.so
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
 // DYNAMIC: Symbols [
 // DYNAMIC-NOT: Name: _static
 // DYNAMIC: ]
 
 // Should prefer dynamic to static
-// RUN: ld.lld2 -o %t3 %t.o -L%T -lls
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
 
 // -L can be placed after -l
-// RUN: ld.lld2 -o %t3 %t.o -lls -L%T
+// RUN: ld.lld2 -o %t3 %t.o -lls -L%t.dir
 
 // Check long forms as well
-// RUN: ld.lld2 -o %t3 %t.o --library-path=%T --library=ls
+// RUN: ld.lld2 -o %t3 %t.o --library-path=%t.dir --library=ls
 
 // Should not search for dynamic libraries if -Bstatic is specified
-// RUN: ld.lld2 -o %t3 %t.o -L%T -Bstatic -lls
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -Bstatic -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
-// RUN: not ld.lld2 -o %t3 %t.o -L%T -Bstatic -lls2 2>&1 \
+// RUN: not ld.lld2 -o %t3 %t.o -L%t.dir -Bstatic -lls2 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOLIB2 %s
 // NOLIB2: Unable to find library -lls2
 
 // -Bdynamic should restore default behaviour
-// RUN: ld.lld2 -o %t3 %t.o -L%T -Bstatic -Bdynamic -lls
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -Bstatic -Bdynamic -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
 
 // -Bstatic and -Bdynamic should affect only libraries which follow them
-// RUN: ld.lld2 -o %t3 %t.o -L%T -lls -Bstatic -Bdynamic
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -lls -Bstatic -Bdynamic
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
-// RUN: ld.lld2 -o %t3 %t.o -L%T -Bstatic -lls -Bdynamic
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -Bstatic -lls -Bdynamic
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
 
 // Check aliases as well
-// RUN: ld.lld2 -o %t3 %t.o -L%T -dn -lls
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -dn -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
-// RUN: ld.lld2 -o %t3 %t.o -L%T -non_shared -lls
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -non_shared -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
-// RUN: ld.lld2 -o %t3 %t.o -L%T -static -lls
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -static -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
-// RUN: ld.lld2 -o %t3 %t.o -L%T -Bstatic -dy -lls
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -Bstatic -dy -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
-// RUN: ld.lld2 -o %t3 %t.o -L%T -Bstatic -call_shared -lls
+// RUN: ld.lld2 -o %t3 %t.o -L%t.dir -Bstatic -call_shared -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
 
 .globl _start,_bar;

Modified: lld/trunk/test/elf2/linkerscript2.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/linkerscript2.s?rev=250057&r1=250056&r2=250057&view=diff
==============================================================================
--- lld/trunk/test/elf2/linkerscript2.s (original)
+++ lld/trunk/test/elf2/linkerscript2.s Mon Oct 12 10:58:38 2015
@@ -2,8 +2,9 @@
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-freebsd %s -o %t
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-freebsd \
 # RUN:   %p/Inputs/libsearch-dyn.s -o %tdyn.o
-# RUN: ld.lld2 -shared %tdyn.o -o %T/libls.so
-# RUN: echo "SEARCH_DIR(" %T ")" > %t.script
+# RUN: mkdir -p %t.dir
+# RUN: ld.lld2 -shared %tdyn.o -o %t.dir/libls.so
+# RUN: echo "SEARCH_DIR(" %t.dir ")" > %t.script
 # RUN: ld.lld2 -o %t2 --script %t.script -lls %t
 
 .globl _start,_bar




More information about the llvm-commits mailing list