* runtest.exp: Fix --directory matching.
authorTom Tromey <tom@tromey.com>
Fri, 18 Aug 2017 22:53:16 +0000 (08:53 +1000)
committerBen Elliston <bje@gnu.org>
Fri, 18 Aug 2017 22:53:16 +0000 (08:53 +1000)
Signed-off-by: Ben Elliston <bje@gnu.org>
ChangeLog
runtest.exp

index 61cbbf5..1d939a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-18  Tom Tromey  <tom@tromey.com>
+
+       * runtest.exp: Fix --directory matching.
+
 2017-08-15  Ben Elliston  <bje@gnu.org>
 
        * lib/framework.exp (xml_tag): New proc.
index 173c9a4..02c10ed 100644 (file)
@@ -1829,7 +1829,10 @@ foreach current_target $target_list {
                        # list of directories.  Look for match on each item.
                        set found 0
                        foreach directory $cmdline_dir_to_run {
-                           if {[string match $directory $dir]} {
+                           # Look for a directory that ends with the
+                           # provided --directory name.
+                           if {[string match "$directory" $dir]
+                               || [string match "*/$directory" $dir]} {
                                set found 1
                                break
                            }