Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Check compilation result in gdb.dwarf2/dw2-opt-structptr.exp
Date: Thu, 30 Sep 2021 19:10:09 +0200	[thread overview]
Message-ID: <20210930171007.GA25157@delia> (raw)

Hi,

When running test-case gdb.dwarf2/dw2-opt-structptr.exp with target board
unix/-bad, I get:
...
gdb compile failed, gcc: error: unrecognized command line option '-bad'
UNTESTED: gdb.dwarf2/dw2-opt-structptr.exp: dw2-opt-structptr.exp
UNTESTED: gdb.dwarf2/dw2-opt-structptr.exp: failed to compile
ERROR: (dw2-opt-structptr) No such file or directory
UNRESOLVED: gdb.dwarf2/dw2-opt-structptr.exp: console: set print object on
...

Merge the two UNTESTEDs.

Fix the UNRESOLVED by checking result of compilation.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Check compilation result in gdb.dwarf2/dw2-opt-structptr.exp

---
 gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
index 6883b086b89..82a53a3d2ea 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
@@ -123,8 +123,7 @@ proc build_test_program {} {
     }
     
     set sources "$srcfile $asm_file"
-    if {[build_executable $testfile.exp $testfile $sources {nodebug}]} { 
-	untested "failed to compile"
+    if {[build_executable "failed to compile" $testfile $sources {nodebug}]} {
 	return -1
     }
 }
@@ -245,6 +244,9 @@ proc do_mi_test {} {
     }
 }
 
-build_test_program
+if { [build_test_program] == -1 } {
+    return -1
+}
+
 do_console_test
 do_mi_test

                 reply	other threads:[~2021-09-30 17:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210930171007.GA25157@delia \
    --to=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox