diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/fullpath-expand.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/fullpath-expand.exp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.base/fullpath-expand.exp b/gdb/testsuite/gdb.base/fullpath-expand.exp index efa8d63b1d4..b3890244997 100644 --- a/gdb/testsuite/gdb.base/fullpath-expand.exp +++ b/gdb/testsuite/gdb.base/fullpath-expand.exp @@ -25,13 +25,13 @@ if { [file pathtype $objdir] != "absolute" } { return -1 } -set saved_pwd [pwd] -cd $srcdir -set err [gdb_compile "${subdir}/${srcfile} ${subdir}/${srcfile2}" $binfile executable {debug}] -cd $saved_pwd -if { $err != "" } { - untested "${srcfile} or ${srcfile2} compilation failed" - return -1 +with_cwd $srcdir { + set err [gdb_compile "${subdir}/${srcfile} ${subdir}/${srcfile2}" $binfile executable {debug}] + + if { $err != "" } { + untested "${srcfile} or ${srcfile2} compilation failed" + return -1 + } } set result [catch "exec realpath ${srcdir}/${subdir}/${srcfile2}" realsrcfile2] |