Updated TestRunner tests so that they work correctly in a separate object root
directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8383
91177308-0d34-0410-b5e6-
96231b3b80d8
19 files changed:
; of the bug that was causing the Olden Health benchmark to output incorrect
; results!
;
; of the bug that was causing the Olden Health benchmark to output incorrect
; results!
;
-; RUN: as < %s | opt -constprop | dis > Output/%s && \
-; RUN: as < %s | dis | as | opt -constprop | dis > Output/%s2 && \
-; RUN: diff Output/%s Output/%s2
+; RUN: as < %s | opt -constprop | dis > s1 && \
+; RUN: as < %s | dis | as | opt -constprop | dis > s2 && \
+; RUN: diff s1 s2
-; RUN: as < %s | dis -c > Output/%s.cbe.c
-; RUN: gcc -B/usr/bin/ Output/%s.cbe.c -o Output/%s.cbe
-; RUN: Output/%s.cbe
+; RUN: as < %s | dis -c > f1.cbe.c
+; RUN: gcc -B/usr/bin/ f1.cbe.c -o f1.cbe
+; RUN: ./f1.cbe
bool %doTest(ubyte %x) {
%dec.0 = add ubyte %x, 255
bool %doTest(ubyte %x) {
%dec.0 = add ubyte %x, 255
-; RUN: as < %s | dis -c > Output/%s.cbe.c
-; RUN: gcc -B/usr/bin/ Output/%s.cbe.c -o Output/%s.cbe
-; RUN: Output/%s.cbe
+; RUN: as < %s | dis -c > f1.cbe.c
+; RUN: gcc -B/usr/bin/ f1.cbe.c -o f1.cbe
+; RUN: ./f1.cbe
bool %doTest(ubyte %x) {
%dec.0 = add ubyte %x, 255
bool %doTest(ubyte %x) {
%dec.0 = add ubyte %x, 255
-; RUN: as < %s > Output/%s.bc
-; RUN: echo | as > Output/%s.tmp.bc
-; RUN: link Output/%s.tmp.bc Output/%s.bc
+; RUN: as < %s > %t.bc
+; RUN: echo | as > %t.tmp.bc
+; RUN: link %t.tmp.bc %t.bc
%X = constant int 5
%Y = internal global [2 x int*] [ int* %X, int * %X]
%X = constant int 5
%Y = internal global [2 x int*] [ int* %X, int * %X]
; This fails linking when it is linked with an empty file as the first object file
; This fails linking when it is linked with an empty file as the first object file
-; RUN: as > Output/LinkTest1.bc < /dev/null
-; RUN: as < %s > Output/LinkTest2.bc
-; RUN: link Output/LinkTest[12].bc
+; RUN: as > %t1.bc < /dev/null
+; RUN: as < %s > %t2.bc
+; RUN: link %t[12].bc
%work = global int (int, int)* %zip
%work = global int (int, int)* %zip
; This fails linking when it is linked with an empty file as the first object file
; This fails linking when it is linked with an empty file as the first object file
-; RUN: as > Output/%s.LinkTest.bc < /dev/null
-; RUN: as < %s > Output/%s.bc
-; RUN: link Output/%s.LinkTest.bc Output/%s.bc
+; RUN: as > %t.LinkTest.bc < /dev/null
+; RUN: as < %s > %t.bc
+; RUN: link %t.LinkTest.bc %t.bc
%work = global int 4
%test = global int* getelementptr( int* %work, long 1)
%work = global int 4
%test = global int* getelementptr( int* %work, long 1)
; This fails because the linker renames the external symbol not the internal
; one...
; This fails because the linker renames the external symbol not the internal
; one...
-; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > Output/%s.1.bc
-; RUN: as < %s > Output/%s.2.bc
-; RUN: link Output/%s.[12].bc | dis | grep '%foo()' | grep -v internal
+; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > %t.1.bc
+; RUN: as < %s > %t.2.bc
+; RUN: link %t.[12].bc | dis | grep '%foo()' | grep -v internal
implementation
int %foo() { ret int 0 }
implementation
int %foo() { ret int 0 }
; This fails because the linker renames the non-opaque type not the opaque
; one...
; This fails because the linker renames the non-opaque type not the opaque
; one...
-; RUN: echo "%Ty = type opaque" | as > Output/%s.1.bc
-; RUN: as < %s > Output/%s.2.bc
-; RUN: link Output/%s.[12].bc | dis | grep '%Ty ' | grep -v opaque
+; RUN: echo "%Ty = type opaque" | as > %t.1.bc
+; RUN: as < %s > %t.2.bc
+; RUN: link %t.[12].bc | dis | grep '%Ty ' | grep -v opaque
-; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | as > Output/%s.1.bc
-; RUN: as < %s > Output/%s.2.bc
-; RUN: link Output/%s.[12].bc
+; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | as > %t.1.bc
+; RUN: as < %s > %t.2.bc
+; RUN: link %t.[12].bc
%X = external global int
implementation
%X = external global int
implementation
; This fails because the linker renames the non-opaque type not the opaque
; one...
; This fails because the linker renames the non-opaque type not the opaque
; one...
-; RUN: echo "implementation linkonce void %foo() { ret void } " | as > Output/%s.2.bc
-; RUN: as < %s > Output/%s.1.bc
-; RUN: link Output/%s.[12].bc | dis | grep foo | grep linkonce
+; RUN: echo "implementation linkonce void %foo() { ret void } " | as > %t.2.bc
+; RUN: as < %s > %t.1.bc
+; RUN: link %t.[12].bc | dis | grep foo | grep linkonce
; This one fails because the LLVM runtime is allowing two null pointers of
; the same type to be created!
; This one fails because the LLVM runtime is allowing two null pointers of
; the same type to be created!
-; RUN: echo "%T = type int" | as > Output/%s.2.bc
-; RUN: as < %s > Output/%s.1.bc
-; RUN: link Output/%s.[12].bc
+; RUN: echo "%T = type int" | as > %t.2.bc
+; RUN: as < %s > %t.1.bc
+; RUN: link %t.[12].bc
; This one fails because the LLVM runtime is allowing two null pointers of
; the same type to be created!
; This one fails because the LLVM runtime is allowing two null pointers of
; the same type to be created!
-; RUN: echo "%S = type { %T*} %T = type opaque" | as > Output/%s.2.bc
-; RUN: as < %s > Output/%s.1.bc
-; RUN: link Output/%s.[12].bc
+; RUN: echo "%S = type { %T*} %T = type opaque" | as > %t.2.bc
+; RUN: as < %s > %t.1.bc
+; RUN: link %t.[12].bc
%S = type { %T* }
%T = type int
%S = type { %T* }
%T = type int
; a program that already has an external declaration for the function name, we must
; rename the internal function to something that does not conflict.
; a program that already has an external declaration for the function name, we must
; rename the internal function to something that does not conflict.
-; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > Output/%s.1.bc
-; RUN: as < %s > Output/%s.2.bc
-; RUN: link Output/%s.[12].bc | dis | grep 'internal' | not grep '%foo('
+; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > %t.1.bc
+; RUN: as < %s > %t.2.bc
+; RUN: link %t.[12].bc | dis | grep 'internal' | not grep '%foo('
implementation
declare int %foo()
implementation
declare int %foo()
-; RUN: echo "%T = type opaque" | as > Output/%s.2.bc
-; RUN: as < %s > Output/%s.1.bc
-; RUN: link Output/%s.[12].bc
+; RUN: echo "%T = type opaque" | as > %t.2.bc
+; RUN: as < %s > %t.1.bc
+; RUN: link %t.[12].bc
%T = type opaque
%a = constant { %T* } { %T* null }
%T = type opaque
%a = constant { %T* } { %T* null }
-; RUN: echo "%T = type int" | as > Output/%s.1.bc
-; RUN: as < %s > Output/%s.2.bc
-; RUN: link Output/%s.[12].bc
+; RUN: echo "%T = type int" | as > %t.1.bc
+; RUN: as < %s > %t.2.bc
+; RUN: link %t.[12].bc
; Test that appending linkage works correctly.
; Test that appending linkage works correctly.
-; RUN: echo "%X = appending global [1x int] [int 8]" | as > Output/%s.2.bc
-; RUN: as < %s > Output/%s.1.bc
-; RUN: link Output/%s.[12].bc | dis | grep 7 | grep 4 | grep 8
+; RUN: echo "%X = appending global [1x int] [int 8]" | as > %t.2.bc
+; RUN: as < %s > %t.1.bc
+; RUN: link %t.[12].bc | dis | grep 7 | grep 4 | grep 8
%X = appending global [2 x int] [int 7, int 4]
%X = appending global [2 x int] [int 7, int 4]
; Test that appending linkage works correctly when arrays are the same size.
; Test that appending linkage works correctly when arrays are the same size.
-; RUN: echo "%X = appending global [1x int] [int 8]" | as > Output/%s.2.bc
-; RUN: as < %s > Output/%s.1.bc
-; RUN: link Output/%s.[12].bc | dis | grep 7 | grep 8
+; RUN: echo "%X = appending global [1x int] [int 8]" | as > %t.2.bc
+; RUN: as < %s > %t.1.bc
+; RUN: link %t.[12].bc | dis | grep 7 | grep 8
%X = appending global [1 x int] [int 7]
%X = appending global [1 x int] [int 7]
; This fails because the linker renames the non-opaque type not the opaque
; one...
; This fails because the linker renames the non-opaque type not the opaque
; one...
-; RUN: echo "%X = linkonce global int 8" | as > Output/%s.2.bc
-; RUN: as < %s > Output/%s.1.bc
-; RUN: link Output/%s.[12].bc | dis
+; RUN: echo "%X = linkonce global int 8" | as > %t.2.bc
+; RUN: as < %s > %t.1.bc
+; RUN: link %t.[12].bc | dis
%X = linkonce global int 7
%X = linkonce global int 7
-; RUN: as < %s > Output/%s.bc
-; RUN: as < testlink2.ll > Output/testlink2.bc
-; RUN: link Output/%s.bc Output/testlink2.bc
+; RUN: as < %s > %t.bc
+; RUN: as < `dirname %s`/testlink2.ll > %t2.bc
+; RUN: link %t.bc %t2.bc
%MyVar = external global int
%MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }
%MyVar = external global int
%MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }