From 37ab3bf83dfe0a45dc06d06d8d6e4168428a203f Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 13 Jan 2002 22:13:06 +0000 Subject: [PATCH] 2002-01-13 Daniel Jacobowitz * gdb.base/completion.exp: Expand ${srcdir} to an absolute path. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/completion.exp | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3ec48f5..72db078 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-01-13 Daniel Jacobowitz + + * gdb.base/completion.exp: Expand ${srcdir} to an absolute path. + 2002-01-10 Jason Merrill * gdb.c++/namespace.exp: Accept trailing const for 'this'. diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index e8069d3..d8d5baf 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -656,8 +656,14 @@ gdb_expect { timeout { fail "(timeout) complete 'file ./Make'" } } - -gdb_test "cd ${srcdir}" "Working directory ${srcdir}.*" "cd to \${srcdir}" +# ${srcdir} may be a relative path. We want to make sure we end up +# in the right directory - so make sure we know where it is. +set mydir [pwd] +cd ${srcdir} +set fullsrcdir [pwd] +cd ${mydir} + +gdb_test "cd ${fullsrcdir}" "Working directory ${fullsrcdir}.*" "cd to \${srcdir}" send_gdb "file ./gdb.base/compl\t" sleep 1 gdb_expect { -- 2.7.4