From 0f5aed564871ecd3f55a54db82ed90e15b0a1233 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 11 Apr 2007 19:56:59 +0000 Subject: Make the llvm-runtest function much more amenable by eliminating all the global variables that needed to be passed in. This makes it possible to add new global variables with only a couple changes (Makefile and llvm-dg.exp) instead of touching every single dg.exp file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35918 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/lib/llvm-dg.exp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test/lib') diff --git a/test/lib/llvm-dg.exp b/test/lib/llvm-dg.exp index 07dffae29c..593108af4a 100644 --- a/test/lib/llvm-dg.exp +++ b/test/lib/llvm-dg.exp @@ -1,5 +1,6 @@ -proc llvm-runtest { programs objdir srcdir subdir target_triplet llvmgcc llvmgxx prcontext llvmgcc_version} { - +proc llvm-runtest { programs } { + global objdir srcdir subdir target_triplet llvmgcc llvmgxx prcontext + global llvmgcc_version srcroot objroot llvmlibsdir set timeout 60 @@ -63,6 +64,12 @@ proc llvm-runtest { programs objdir srcdir subdir target_triplet llvmgcc llvmgxx #replace %llvmgxx with actual path to llvmg++ regsub -all {%llvmgxx} $new_runline "$llvmgxx -emit-llvm" new_runline + #replace %L with path to libraries + regsub -all {%L} $new_runline "$llvmlibsdir" new_runline + + #replace %I with path to includes + regsub -all {%I} $new_runline "$srcroot/include" new_runline + puts $scriptFileId $new_runline } elseif {[regexp {XFAIL:[ *](.+)} $line match targets]} { set targets @@ -127,5 +134,3 @@ proc llvm-runtest { programs objdir srcdir subdir target_triplet llvmgcc llvmgxx } } } - - -- cgit v1.2.3-18-g5258