Fix mingw32 failures due to incorrect directory separator in pattern
authorLuis Machado <lgustavo@codesourcery.com>
Fri, 17 Oct 2014 14:28:17 +0000 (11:28 -0300)
committerLuis Machado <lgustavo@codesourcery.com>
Fri, 17 Oct 2014 14:28:17 +0000 (11:28 -0300)
commita80db0157c31d3f0fbb37ea40384b11041429a2f
tree59f7ba93c9c0637d6649db8a4022a3d8fbb66465
parentb22089abcba7cc3be26a9ab7d60e01299ac13ea0
Fix mingw32 failures due to incorrect directory separator in pattern

Some testcases, mostly gdb.reverse ones, assume the presence of a
'/' directory separator before the source file name. This is
incorrect for mingw32 hosts, generating false failures for those
tests.

I attempted to catch most of the occurrences of the pattern
".*/$srcfile" and replaced them with ".*$srcfile". The latter
is used elsewhere in the testsuite. The resulting patch is attached.

I also see other occurrences of the same assumption throughout the
testsuite, but usually they are arguments for function calls and i
seem to recall either the test harness or GDB deals with those
paths properly.

gdb/testsuite:

2014-10-17  Luis Machado  <lgustavo@codesourcery.com>

* gdb.guile/scm-breakpoint.exp: Do not assume any
directory separators when matching source file paths.
* gdb.python/py-breakpoint.exp: Likewise.
* gdb.reverse/break-precsave.exp: Likewise.
* gdb.reverse/break-reverse.exp: Likewise.
* gdb.reverse/consecutive-precsave.exp: Likewise.
* gdb.reverse/finish-precsave.exp: Likewise.
* gdb.reverse/finish-reverse-bkpt.exp: Likewise.
* gdb.reverse/finish-reverse.exp: Likewise.
* gdb.reverse/i386-precsave.exp: Likewise.
* gdb.reverse/i387-env-reverse.exp: Likewise.
* gdb.reverse/i387-stack-reverse.exp: Likewise.
* gdb.reverse/machinestate-precsave.exp: Likewise.
* gdb.reverse/machinestate.exp: Likewise.
* gdb.reverse/sigall-precsave.exp: Likewise.
* gdb.reverse/solib-precsave.exp: Likewise.
* gdb.reverse/step-precsave.exp: Likewise.
* gdb.reverse/until-precsave.exp: Likewise.
* gdb.reverse/watch-precsave.exp: Likewise.
* gdb.reverse/watch-reverse.exp: Likewise.
20 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.guile/scm-breakpoint.exp
gdb/testsuite/gdb.python/py-breakpoint.exp
gdb/testsuite/gdb.reverse/break-precsave.exp
gdb/testsuite/gdb.reverse/break-reverse.exp
gdb/testsuite/gdb.reverse/consecutive-precsave.exp
gdb/testsuite/gdb.reverse/finish-precsave.exp
gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp
gdb/testsuite/gdb.reverse/finish-reverse.exp
gdb/testsuite/gdb.reverse/i386-precsave.exp
gdb/testsuite/gdb.reverse/i387-env-reverse.exp
gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
gdb/testsuite/gdb.reverse/machinestate-precsave.exp
gdb/testsuite/gdb.reverse/machinestate.exp
gdb/testsuite/gdb.reverse/sigall-precsave.exp
gdb/testsuite/gdb.reverse/solib-precsave.exp
gdb/testsuite/gdb.reverse/step-precsave.exp
gdb/testsuite/gdb.reverse/until-precsave.exp
gdb/testsuite/gdb.reverse/watch-precsave.exp
gdb/testsuite/gdb.reverse/watch-reverse.exp