summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-10 04:56:59 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-10 04:56:59 +0000
commitf3e2d80770c43e2ae1e5ba0d6a944974087f57ae (patch)
tree98850a66b7d67f74ce2f40eccf3757beb3ce713a
parentfabcb9127f278a77b8aae5673be1115390c55050 (diff)
downloadllvm-f3e2d80770c43e2ae1e5ba0d6a944974087f57ae.tar.gz
llvm-f3e2d80770c43e2ae1e5ba0d6a944974087f57ae.tar.bz2
llvm-f3e2d80770c43e2ae1e5ba0d6a944974087f57ae.tar.xz
Remove prcontext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81427 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/TestingGuide.html8
-rw-r--r--test/Makefile1
-rwxr-xr-xtest/Scripts/prcontext.tcl36
-rw-r--r--test/lib/llvm.exp4
-rw-r--r--test/lit.cfg2
5 files changed, 2 insertions, 49 deletions
diff --git a/docs/TestingGuide.html b/docs/TestingGuide.html
index 51ffa450b0..f9743634e7 100644
--- a/docs/TestingGuide.html
+++ b/docs/TestingGuide.html
@@ -650,14 +650,6 @@ substitutions</a></div>
<dd>The target triplet that corresponds to the current host machine (the one
running the test cases). This should probably be called "host".<dd>
- <dt><b>prcontext</b> (%prcontext)</dt>
- <dd>Path to the prcontext tcl script that prints some context around a
- line that matches a pattern. This isn't strictly necessary as the test suite
- is run with its PATH altered to include the test/Scripts directory where
- the prcontext script is located. Note that this script is similar to
- <tt>grep -C</tt> but you should use the <tt>prcontext</tt> script because
- not all platforms support <tt>grep -C</tt>.</dd>
-
<dt><b>llvmgcc</b> (%llvmgcc)</dt>
<dd>The full path to the <tt>llvm-gcc</tt> executable as specified in the
configured LLVM environment</dd>
diff --git a/test/Makefile b/test/Makefile
index 1b1339c427..813ce57235 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -133,7 +133,6 @@ site.exp: FORCE
@echo 'set TARGETS_TO_BUILD "$(TARGETS_TO_BUILD)"' >> site.tmp
@echo 'set llvmgcc_langs "$(LLVMGCC_LANGS)"' >> site.tmp
@echo 'set llvmgcc_version "$(LLVMGCC_VERSION)"' >> site.tmp
- @echo 'set prcontext "$(TCLSH) $(LLVM_SRC_ROOT)/test/Scripts/prcontext.tcl"' >> site.tmp
@echo 'set llvmtoolsdir "$(ToolDir)"' >>site.tmp
@echo 'set llvmlibsdir "$(LibDir)"' >>site.tmp
@echo 'set srcroot "$(LLVM_SRC_ROOT)"' >>site.tmp
diff --git a/test/Scripts/prcontext.tcl b/test/Scripts/prcontext.tcl
deleted file mode 100755
index 5ab0854b0b..0000000000
--- a/test/Scripts/prcontext.tcl
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/tclsh
-#
-# Usage:
-# prcontext <pattern> <# lines of context>
-# (for platforms that don't have grep -C)
-
-
-#
-# Get the arguments
-#
-set pattern [lindex $argv 0]
-set num [lindex $argv 1]
-
-
-#
-# Get all of the lines in the file.
-#
-set lines [split [read stdin] \n]
-
-set index 0
-foreach line $lines {
- if { [regexp $pattern $line match matchline] } {
- if { [ expr [expr $index - $num] < 0 ] } {
- set bottom 0
- } else {
- set bottom [expr $index - $num]
- }
- set endLineNum [ expr [expr $index + $num] + 1]
- while {$bottom < $endLineNum} {
- set output [lindex $lines $bottom]
- puts $output
- set bottom [expr $bottom + 1]
- }
- }
- set index [expr $index + 1]
-} \ No newline at end of file
diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp
index cd36c61b5e..a8eec3a496 100644
--- a/test/lib/llvm.exp
+++ b/test/lib/llvm.exp
@@ -46,7 +46,7 @@ proc execOneLine { test PRS outcome lineno line } {
# This procedure performs variable substitutions on the RUN: lines of a test
# cases.
proc substitute { line test tmpFile } {
- global srcroot objroot srcdir objdir subdir target_triplet prcontext
+ global srcroot objroot srcdir objdir subdir target_triplet
global llvmgcc llvmgxx llvmgcc_version llvmgccmajvers ocamlopt
global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir
global llvmdsymutil valgrind grep gas bugpoint_topts
@@ -57,8 +57,6 @@ proc substitute { line test tmpFile } {
#replace %% with _#MARKER#_ to make the replacement of %% more predictable
regsub -all {%%} $new_line {_#MARKER#_} new_line
- #replace %prcontext with prcontext.tcl (Must replace before %p)
- regsub -all {%prcontext} $new_line $prcontext new_line
#replace %llvmgcc_only with actual path to llvmgcc
regsub -all {%llvmgcc_only} $new_line "$llvmgcc" new_line
#replace %llvmgcc with actual path to llvmgcc
diff --git a/test/lit.cfg b/test/lit.cfg
index e7ef037663..546984d972 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -76,7 +76,7 @@ for line in open(os.path.join(config.llvm_obj_root, 'test', 'site.exp')):
site_exp[m.group(1)] = m.group(2)
# Add substitutions.
-for sub in ['prcontext', 'llvmgcc', 'llvmgxx', 'compile_cxx', 'compile_c',
+for sub in ['llvmgcc', 'llvmgxx', 'compile_cxx', 'compile_c',
'link', 'shlibext', 'ocamlopt', 'llvmdsymutil', 'llvmlibsdir',
'bugpoint_topts']:
if sub in ('llvmgcc', 'llvmgxx'):