Remove prcontext.
authorDaniel Dunbar <daniel@zuster.org>
Thu, 10 Sep 2009 04:56:59 +0000 (04:56 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 10 Sep 2009 04:56:59 +0000 (04:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81427 91177308-0d34-0410-b5e6-96231b3b80d8

docs/TestingGuide.html
test/Makefile
test/Scripts/prcontext.tcl [deleted file]
test/lib/llvm.exp
test/lit.cfg

index 51ffa450b0b50fb7f54db7a7d16a2a3239f022c8..f9743634e779665c3fa273cdf5e7c014df36bd6c 100644 (file)
@@ -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>
index 1b1339c42714184445fd1bbe3947b58d60a6a1fc..813ce57235f750cc0e2e25c09de9f623d5ae20cf 100644 (file)
@@ -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 (executable)
index 5ab0854..0000000
+++ /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
index cd36c61b5e754b75a9e372d3431afa79e6f35d18..a8eec3a4965b6fbb48fb8017d1317e5d3d73d979 100644 (file)
@@ -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
index e7ef037663a3dcac303d904e6a1ddcb80335700f..546984d972a7699ef2676589119bcd8bede9d1d5 100644 (file)
@@ -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'):