don't use directory in test name

Message ID 1402596363-21741-1-git-send-email-tromey@redhat.com
State Committed
Headers

Commit Message

Tom Tromey June 12, 2014, 6:06 p.m. UTC
  I noticed that a few tests in completion.exp put the directory name
into the name of the resulting test.  While the directory name is
relative, this still makes for spurious differences depending on
whether the test was run in serial or parallel mode.

This patch fixes the problem.  I'm checking it in.

2014-06-12  Tom Tromey  <tromey@redhat.com>

	* gdb.base/completion.exp: Don't use directory name in test.
---
 gdb/testsuite/ChangeLog               | 4 ++++
 gdb/testsuite/gdb.base/completion.exp | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)
  

Comments

Doug Evans July 7, 2014, 8:37 p.m. UTC | #1
On Thu, Jun 12, 2014 at 11:06 AM, Tom Tromey <tromey@redhat.com> wrote:
> I noticed that a few tests in completion.exp put the directory name
> into the name of the resulting test.  While the directory name is
> relative, this still makes for spurious differences depending on
> whether the test was run in serial or parallel mode.
>
> This patch fixes the problem.  I'm checking it in.
>
> 2014-06-12  Tom Tromey  <tromey@redhat.com>
>
>         * gdb.base/completion.exp: Don't use directory name in test.

Hi.  fyi,
I've added an entry to the wiki documenting the issue.

https://sourceware.org/gdb/wiki/Internals%20GDB-Testsuite-Coding-Standards
  

Patch

diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 2a85df5..c633a51 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -114,7 +114,8 @@  foreach dir1 [ list "./gdb.base" "./outputs/gdb.base/completion" ] {
 	 && [remote_file host exists ${dir1}/completion1.o] } {
 	foreach target_name ${targets} {
 	    gdb_test "complete target ${target_name} ${dir1}/completion" \
-		"target ${target_name} ${dir1}/completion.*${dir1}/completion0\\.o.*${dir1}/completion1\\.o.*"
+		"target ${target_name} ${dir1}/completion.*${dir1}/completion0\\.o.*${dir1}/completion1\\.o.*" \
+		"complete target ${target_name}"
 	}
 	break
     }