gdb/testsuite: Skip directory tests in gdb.base/info_sources.exp on remote host

Message ID 0e4e07f8-c673-ffa0-cac5-407ef4f129a3@codesourcery.com
State New
Headers show
Series
  • gdb/testsuite: Skip directory tests in gdb.base/info_sources.exp on remote host
Related show

Commit Message

Sandra Loosemore June 25, 2020, 8:41 p.m.
Here's another patch for a remote-host testing issue I've run across. 
OK to commit?

-Sandra

Comments

Tom Tromey July 13, 2020, 3:33 p.m. | #1
>>>>> "Sandra" == Sandra Loosemore <sandra@codesourcery.com> writes:


Sandra> Here's another patch for a remote-host testing issue I've run
Sandra> across. OK to commit?

I didn't see a response to this patch.

Sandra> commit e08464126c11c710a11d94e4cc6a8b06593465be
Sandra> Author: Sandra Loosemore <sandra@codesourcery.com>
Sandra> Date:   Thu Jun 25 13:22:11 2020 -0700

Sandra>     Skip directory tests in gdb.base/info_sources.exp on remote host
    
Sandra>     When testing on a remote host, source files from build are copied to
Sandra>     an arbitrary location on host.  Tests that try to pattern-match host
Sandra>     pathnames against directory prefixes on build don't generally work.
    
Sandra>     2020-06-25  Sandra Loosemore  <sandra@codesourcery.com>
    
Sandra>     	gdb/testsuite/
Sandra>     	* gdb.base/info_sources.exp: Skip directory match tests on
Sandra>     	remote hosts.

Seems fine to me.  Thank you.

Tom

Patch

commit e08464126c11c710a11d94e4cc6a8b06593465be
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Thu Jun 25 13:22:11 2020 -0700

    Skip directory tests in gdb.base/info_sources.exp on remote host
    
    When testing on a remote host, source files from build are copied to
    an arbitrary location on host.  Tests that try to pattern-match host
    pathnames against directory prefixes on build don't generally work.
    
    2020-06-25  Sandra Loosemore  <sandra@codesourcery.com>
    
    	gdb/testsuite/
    	* gdb.base/info_sources.exp: Skip directory match tests on
    	remote hosts.

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8ad2448..3434aa1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@ 
+2020-06-25  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/info_sources.exp: Skip directory match tests on
+	remote hosts.
+
 2020-06-25  Andrew Burgess  <andrew.burgess@embecosm.com>
 
 	* gdb.arch/riscv-tdesc-regs.exp: New test cases.
diff --git a/gdb/testsuite/gdb.base/info_sources.exp b/gdb/testsuite/gdb.base/info_sources.exp
index fa643c5..8bcedfa 100644
--- a/gdb/testsuite/gdb.base/info_sources.exp
+++ b/gdb/testsuite/gdb.base/info_sources.exp
@@ -71,7 +71,9 @@  test_info_sources "--" 1 1
 
 # List both files with regexp matching anywhere in the filenames:
 test_info_sources "info_sources" 1 1
-test_info_sources "gdb.base" 1 1
+if { ! [is_remote host] } {
+    test_info_sources "gdb.base" 1 1
+}
 
 # List both files with regexp matching the filename basenames,
 # using various parts of the -basename option:
@@ -88,8 +90,10 @@  test_info_sources "-b base" 0 1
 
 # List the files with dirname matching regexp,
 # using various part of the -dirname option:
-test_info_sources "-d base" 1 1
-test_info_sources "-dirname base" 1 1
+if { ! [is_remote host] } {
+    test_info_sources "-d base" 1 1
+    test_info_sources "-dirname base" 1 1
+}
 
 # Test non matching regexp, with option terminator:
 test_info_sources "-b -- -d" 0 0