public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [committed][gdb/testsuite] Check compilation result in gdb.dwarf2/dw2-opt-structptr.exp
@ 2021-09-30 17:10 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-09-30 17:10 UTC (permalink / raw)
  To: gdb-patches

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-30 17:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 17:10 [committed][gdb/testsuite] Check compilation result in gdb.dwarf2/dw2-opt-structptr.exp Tom de Vries

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).