PATCH: Use runtest_file_p in testsuite/runtest.libs/libs.exp

Jacob Bachmeyer <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
This is a small change to make quickly running a few of the internal 
library tests easier.  This was added to ease development of improved 
tests for lib/target.exp.
With this change, "$srcdir/runtest --tool runtest --srcdir $srcdir 
libs.exp=target.test" runs only the tests in target.test; previously 
there was no easy way to select a subset of the library tests.

----
ChangeLog entry:
    	* testsuite/runtest.libs/libs.exp: Use runtest_file_p to honor
    	requests to run only some library tests.
---
diff --git a/testsuite/runtest.libs/libs.exp b/testsuite/runtest.libs/libs.exp
index 8521ead..f42d3db 100644
--- a/testsuite/runtest.libs/libs.exp
+++ b/testsuite/runtest.libs/libs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016, 2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2018, 2019 Free Software Foundation, Inc.
 #
 # This file is part of DejaGnu.
 #
@@ -98,7 +98,7 @@ proc process_test { test } {
 
 start_expect
 foreach i [glob [testsuite file -source -test *.test]] {
-    process_test $i
+    if { [runtest_file_p $runtests $i] } { process_test $i }
 }
 stop_expect
 
----

-- Jacob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.