public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [testsuite] Make the testsuite work on mingw
@ 2019-08-14 23:15 Christian Biesinger via gdb-patches
  2019-08-15  1:47 ` Kevin Buettner
  2019-08-15 15:56 ` Pedro Alves
  0 siblings, 2 replies; 4+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-08-14 23:15 UTC (permalink / raw)
  To: gdb-patches; +Cc: Christian Biesinger

Dejagnu produces an objdir like /c/, but GDB expects something like c:/.
So fix it up in lib/gdb.exp.

gdb/testsuite/ChangeLog:

2019-08-14  Christian Biesinger  <cbiesinger@google.com>

	* lib/gdb.exp: When running on a mingw target, replace
	/x/ with x:/.
---
 gdb/testsuite/lib/gdb.exp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index edc8dfcdfd..af56e8aa12 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4724,6 +4724,10 @@ proc standard_output_file {basename} {
 
     set dir [make_gdb_parallel_path outputs $subdir $gdb_test_file_name]
     file mkdir $dir
+    # If running on MinGW, replace /c/foo with c:/foo
+    if { [ishost *-*-mingw*] } {
+        set dir [regsub {^/([a-z])/} $dir {\1:/}]
+    }
     return [file join $dir $basename]
 }
 
-- 
2.23.0.rc1.153.gdeed80330f-goog

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [testsuite] Make the testsuite work on mingw
  2019-08-14 23:15 [PATCH] [testsuite] Make the testsuite work on mingw Christian Biesinger via gdb-patches
@ 2019-08-15  1:47 ` Kevin Buettner
  2019-08-15 15:56 ` Pedro Alves
  1 sibling, 0 replies; 4+ messages in thread
From: Kevin Buettner @ 2019-08-15  1:47 UTC (permalink / raw)
  To: gdb-patches; +Cc: Christian Biesinger

On Wed, 14 Aug 2019 18:15:02 -0500
"Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org> wrote:

> Dejagnu produces an objdir like /c/, but GDB expects something like c:/.
> So fix it up in lib/gdb.exp.
> 
> gdb/testsuite/ChangeLog:
> 
> 2019-08-14  Christian Biesinger  <cbiesinger@google.com>
> 
> 	* lib/gdb.exp: When running on a mingw target, replace
> 	/x/ with x:/.

LGTM.

Kevin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [testsuite] Make the testsuite work on mingw
  2019-08-14 23:15 [PATCH] [testsuite] Make the testsuite work on mingw Christian Biesinger via gdb-patches
  2019-08-15  1:47 ` Kevin Buettner
@ 2019-08-15 15:56 ` Pedro Alves
  2019-08-15 16:15   ` Christian Biesinger via gdb-patches
  1 sibling, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2019-08-15 15:56 UTC (permalink / raw)
  To: Christian Biesinger, gdb-patches

On 8/15/19 12:15 AM, Christian Biesinger via gdb-patches wrote:
> Dejagnu produces an objdir like /c/, but GDB expects something like c:/.
> So fix it up in lib/gdb.exp.
> 
> gdb/testsuite/ChangeLog:
> 
> 2019-08-14  Christian Biesinger  <cbiesinger@google.com>
> 
> 	* lib/gdb.exp: When running on a mingw target, replace
> 	/x/ with x:/.
> ---
>  gdb/testsuite/lib/gdb.exp | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index edc8dfcdfd..af56e8aa12 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -4724,6 +4724,10 @@ proc standard_output_file {basename} {
>  
>      set dir [make_gdb_parallel_path outputs $subdir $gdb_test_file_name]
>      file mkdir $dir
> +    # If running on MinGW, replace /c/foo with c:/foo

OOC, does "on MinGW" mean using a Cygwin or MSYS2 dejagnu?

Or are you really using a native MinGW expect/dejagnu?

> +    if { [ishost *-*-mingw*] } {
> +        set dir [regsub {^/([a-z])/} $dir {\1:/}]
> +    }
>      return [file join $dir $basename]
>  }
>  
> 

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [testsuite] Make the testsuite work on mingw
  2019-08-15 15:56 ` Pedro Alves
@ 2019-08-15 16:15   ` Christian Biesinger via gdb-patches
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-08-15 16:15 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Christian Biesinger via gdb-patches

On Thu, Aug 15, 2019 at 10:56 AM Pedro Alves <palves@redhat.com> wrote:
> On 8/15/19 12:15 AM, Christian Biesinger via gdb-patches wrote:
> > Dejagnu produces an objdir like /c/, but GDB expects something like c:/.
> > So fix it up in lib/gdb.exp.
> >
> > gdb/testsuite/ChangeLog:
> >
> > 2019-08-14  Christian Biesinger  <cbiesinger@google.com>
> >
> >       * lib/gdb.exp: When running on a mingw target, replace
> >       /x/ with x:/.
> > ---
> >  gdb/testsuite/lib/gdb.exp | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> > index edc8dfcdfd..af56e8aa12 100644
> > --- a/gdb/testsuite/lib/gdb.exp
> > +++ b/gdb/testsuite/lib/gdb.exp
> > @@ -4724,6 +4724,10 @@ proc standard_output_file {basename} {
> >
> >      set dir [make_gdb_parallel_path outputs $subdir $gdb_test_file_name]
> >      file mkdir $dir
> > +    # If running on MinGW, replace /c/foo with c:/foo
>
> OOC, does "on MinGW" mean using a Cygwin or MSYS2 dejagnu?
>
> Or are you really using a native MinGW expect/dejagnu?

This was an MSYS dejagnu. (Hmm, I guess a cygwin one would require a
different patch, to also match and remove /cygdrive... but I'll leave
that to another time)

I pushed this patch.

Christian

> > +    if { [ishost *-*-mingw*] } {
> > +        set dir [regsub {^/([a-z])/} $dir {\1:/}]
> > +    }
> >      return [file join $dir $basename]
> >  }
> >
> >
>
> Thanks,
> Pedro Alves

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-15 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14 23:15 [PATCH] [testsuite] Make the testsuite work on mingw Christian Biesinger via gdb-patches
2019-08-15  1:47 ` Kevin Buettner
2019-08-15 15:56 ` Pedro Alves
2019-08-15 16:15   ` Christian Biesinger via gdb-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).