Message ID | 20190814231502.78501-1-cbiesinger@google.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 113705 invoked by alias); 14 Aug 2019 23:15:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 113573 invoked by uid 89); 14 Aug 2019 23:15:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=H*MI:google X-HELO: mail-qt1-f202.google.com Received: from mail-qt1-f202.google.com (HELO mail-qt1-f202.google.com) (209.85.160.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Aug 2019 23:15:15 +0000 Received: by mail-qt1-f202.google.com with SMTP id j10so768072qtl.23 for <gdb-patches@sourceware.org>; Wed, 14 Aug 2019 16:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=cqk12VITCVzYQCrb7gGYmoieYDDz2bW2/YnfyvO6yBc=; b=qio8NoYZwKcBNbQry8OSDNlRBRQIlKyUB5r0kv6lbCcDh6IxHbHLOBl3Coo/UAtjAv VJaIcaUXtffIDY7fWb6t/FSx3ERucWwRYYnIo2B8Yziz9HOgKLeTkmCaReXiOeTLy/kq chl0ZJxmTdISi+twcmIGDyEjsGfsHOIwXVnGoM3k22MDZE8M7hymUtWGThTuKO60VytM 0QOgoTWE8hQqujHEGIbD1+5MRFobDh1oj3iLWPE00a7e5NkXEEkZ7C0YRac/UJ2+KoAm CVuo58Z6nHIjSj6/EJvqbuXifAZk1Cxg2PGV2GNZibz8apIX9nF9r9sccRqCFb3kYnOu PNQg== Date: Wed, 14 Aug 2019 18:15:02 -0500 Message-Id: <20190814231502.78501-1-cbiesinger@google.com> Mime-Version: 1.0 Subject: [PATCH] [testsuite] Make the testsuite work on mingw From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org> Reply-To: Christian Biesinger <cbiesinger@google.com> To: gdb-patches@sourceware.org Cc: Christian Biesinger <cbiesinger@google.com> Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes |
Commit Message
Terekhov, Mikhail via Gdb-patches
Aug. 14, 2019, 11:15 p.m. UTC
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(+)
Comments
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
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
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
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] }