Browse code

Workaround bb #1898.

Solaris has 2 greps, one archaic that doesn't know -E and -F,
and one that does. Configure finds the correct one, but
'make check' was using the wrong one.
This patch makes 'lit' substitute 'grep ' with the path to the
correct grep.

Török Edvin authored on 2010/03/31 18:30:57
Showing 8 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 ;
3 3
 ; RUN: llc < %s -mtriple=arm-linux-gnueabi > %t
4 4
 ; RUN: grep .Lfoo: %t
5
-; RUN: egrep bl.*\.Lfoo %t
5
+; RUN: grep -E bl.*\.Lfoo %t
6 6
 ; RUN: grep .Lbaz: %t
7 7
 ; RUN: grep long.*\.Lbaz %t
8 8
 
... ...
@@ -1,5 +1,5 @@
1 1
 ; RUN: llc < %s -march=ppc32 | \
2
-; RUN:   egrep {fn?madd|fn?msub} | count 8
2
+; RUN:   grep -E {fn?madd|fn?msub} | count 8
3 3
 
4 4
 define double @test_FMADD1(double %A, double %B, double %C) {
5 5
 	%D = fmul double %A, %B		; <double> [#uses=1]
... ...
@@ -1,4 +1,4 @@
1
-; RUN: llc < %s -march=x86 -mcpu=yonah | egrep {add|lea} | grep 16
1
+; RUN: llc < %s -march=x86 -mcpu=yonah | grep -E {add|lea} | grep 16
2 2
 
3 3
 	%struct.S = type { <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>,
4 4
                            <2 x i64> }
... ...
@@ -1,5 +1,5 @@
1
-; RUN: llc < %s -march=x86 | not egrep {\\\$4294967289|-7}
2
-; RUN: llc < %s -march=x86 | egrep {\\\$4294967280|-16}
1
+; RUN: llc < %s -march=x86 | not grep -E {\\\$4294967289|-7}
2
+; RUN: llc < %s -march=x86 | grep -E {\\\$4294967280|-16}
3 3
 ; RUN: llc < %s -march=x86-64 | grep {\\-16}
4 4
 
5 5
 define void @t() nounwind {
... ...
@@ -1,4 +1,4 @@
1
-; RUN: llc < %s -march=x86 -mcpu=yonah | not egrep {\(\(xor\|and\)ps\|movd\)}
1
+; RUN: llc < %s -march=x86 -mcpu=yonah | not grep -E {\(\(xor\|and\)ps\|movd\)}
2 2
 
3 3
 ; These operations should be done in integer registers, eliminating constant
4 4
 ; pool loads, movd's etc.
... ...
@@ -1,5 +1,5 @@
1 1
 ; RUN: llc < %s -enable-unsafe-fp-math -march=x86-64 | \
2
-; RUN:   not egrep {addsd|subsd|xor}
2
+; RUN:   not grep -E {addsd|subsd|xor}
3 3
 
4 4
 declare double @sin(double %f)
5 5
 
... ...
@@ -1,7 +1,6 @@
1 1
 ; RUN: llvm-as %s -o %t.bc
2
-; RUN: lli %t.bc > /dev/null
3
-; ??
4
-; XFAIL: *
2
+; RXUN: lli %t.bc > /dev/null
3
+; FP needs libcalls, which ClamAV has disabled, disable this test
5 4
 
6 5
 define double @test(double* %DP, double %Arg) {
7 6
 	%D = load double* %DP		; <double> [#uses=1]
... ...
@@ -109,6 +109,7 @@ for line in open(os.path.join(config.llvm_obj_root, 'test', 'site.exp')):
109 109
 
110 110
 # Add substitutions.
111 111
 config.substitutions.append(('%llvmgcc_only', site_exp['llvmgcc']))
112
+config.substitutions.append(('grep ', site_exp['grep']+" "))
112 113
 for sub in ['llvmgcc', 'llvmgxx', 'compile_cxx', 'compile_c',
113 114
             'link', 'shlibext', 'ocamlopt', 'llvmdsymutil', 'llvmlibsdir',
114 115
             'bugpoint_topts']: