Browse Source

* lib/utils.exp (prune): Restore this proc.

* doc/ref.xml: Update documentation.
	* doc/dejagnu.texi: Regenerate.
	* NEWS: Update.

This reverts commit 992fbc3a8f.
dejagnu-1.6
Ben Elliston 10 years ago
parent
commit
bd8216f07a
  1. 7
      ChangeLog
  2. 4
      NEWS
  3. 13
      doc/dejagnu.texi
  4. 8
      doc/ref.xml
  5. 19
      lib/utils.exp

7
ChangeLog

@ -1,3 +1,10 @@
2016-02-24 Ben Elliston <bje@gnu.org>
* lib/utils.exp (prune): Restore this proc.
* doc/ref.xml: Update documentation.
* doc/dejagnu.texi: Regenerate.
* NEWS: Update.
2016-02-23 Iain Buclaw <ibuclaw@gdcproject.org>
* lib/libgloss.exp (find_gdc): New proc.

4
NEWS

@ -10,8 +10,8 @@ Changes since 1.5.3:
2 if an exception is raised by the Tcl interpreter.
3. runtest now exits with the standard exit codes of programs that are
terminated by the SIGINT, SIGTERM and SIGQUIT signals.
4. The user-visible utility procedures `absolute', `prune', `psource'
and `slay' have been removed. If a testsuite uses any of these
4. The user-visible utility procedures `absolute', `psource' and
`slay' have been removed. If a testsuite uses any of these
procedures, a copy of the procedure should be made and placed in
the lib directory of the testsuite.
5. Support was added for testing the D compiler.

13
doc/dejagnu.texi

@ -5412,6 +5412,7 @@ tool, and its version number.
* Find Procedure: find procedure.
* Which Procedure: which procedure.
* Grep Procedure: grep procedure.
* Prune Procedure: prune procedure.
* Runtest_file_p Procedure: runtest_file_p procedure.
* Diff Procedure: diff procedure.
* Setenv Procedure: setenv procedure.
@ -5498,7 +5499,7 @@ The executable program or shell script to look
for.
@end table
@node grep procedure, runtest_file_p procedure, which procedure, Utility Procedures
@node grep procedure, prune procedure, which procedure, Utility Procedures
@subsubsection Grep Procedure
Search the file called @file{filename} (a fully
@ -5535,7 +5536,15 @@ Prefix the line number to each line where the
regexp matches.
@end table
@node runtest_file_p procedure, diff procedure, grep procedure, Utility Procedures
@node prune procedure, runtest_file_p procedure, grep procedure, Utility Procedures
@subsubsection Prune Procedure
This procedure is deprecated and will be removed in
the next release of DejaGnu. If a testsuite uses this
procedure, a copy of the procedure should be made and placed
in the lib directory of the testsuite.
@node runtest_file_p procedure, diff procedure, prune procedure, Utility Procedures
@subsubsection Runtest_file_p Procedure
Search @emph{runtest}s for

8
doc/ref.xml

@ -3578,6 +3578,14 @@
</variablelist>
</sect4>
<sect4 id="prune" xreflabel="prune procedure">
<title>Prune Procedure</title>
<para>This procedure is deprecated and will be removed in
the next release of &dj;. If a testsuite uses this
procedure, a copy of the procedure should be made and placed
in the lib directory of the testsuite.</para>
</sect4>
<sect4 id="runtestfilep" xreflabel="runtest_file_p procedure">
<title>Runtest_file_p Procedure</title>

19
lib/utils.exp

@ -203,6 +203,25 @@ proc grep { args } {
return $grep_out
}
#
# Remove elements based on patterns. elements are delimited by spaces.
# pattern is the pattern to look for using glob style matching
# list is the list to check against
# returns the new list
#
proc prune { list pattern } {
set tmp {}
foreach i $list {
verbose "Checking pattern \"$pattern\" against $i" 3
if {![string match $pattern $i]} {
lappend tmp $i
} else {
verbose "Removing element $i from list" 3
}
}
return $tmp
}
# Check if a testcase should be run or not
#

Loading…
Cancel
Save