Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH][gdb/testsuite] Remove stale exec in gdb_compile_ada
@ 2020-02-13 10:47 Tom de Vries
  2020-02-13 14:25 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2020-02-13 10:47 UTC (permalink / raw)
  To: gdb-patches

Hi,

When running test-case gdb.ada/ptype_tagged_param.exp, I get:
...
PASS: gdb.ada/ptype_tagged_param.exp: compilation foo.adb
...

However, when I then de-install gnatmake and run again, I get the same result.
This is due to a stale exec. After removing the stale exec, I get:
...
UNSUPPORTED: gdb.ada/ptype_tagged_param.exp: compilation foo.adb
...

Fix this removing the stale exec in gdb_compile_ada before compilation.

Tested on x86_64-linux.

OK for trunk?

Thanks,
- Tom

[gdb/testsuite] Remove stale exec in gdb_compile_ada

gdb/testsuite/ChangeLog:

2020-02-13  Tom de Vries  <tdevries@suse.de>

	* lib/ada.exp (gdb_compile_ada): Delete stale exec before compilation.

---
 gdb/testsuite/lib/ada.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
index 726977d98f..9933cc951e 100644
--- a/gdb/testsuite/lib/ada.exp
+++ b/gdb/testsuite/lib/ada.exp
@@ -60,6 +60,8 @@ proc gdb_compile_ada {source dest type options} {
     set gprdir [file dirname $srcdir]
     set objdir [file dirname $dest]
 
+    file delete $dest
+
     # Although strictly not necessary, we force the recompilation
     # of all units (additional_flags=-f).  This is what is done
     # when using GCC to build programs in the other languages,


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

* Re: [PATCH][gdb/testsuite] Remove stale exec in gdb_compile_ada
  2020-02-13 10:47 [PATCH][gdb/testsuite] Remove stale exec in gdb_compile_ada Tom de Vries
@ 2020-02-13 14:25 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2020-02-13 14:25 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> 2020-02-13  Tom de Vries  <tdevries@suse.de>

Tom> 	* lib/ada.exp (gdb_compile_ada): Delete stale exec before compilation.

This is ok.  Thank you.

I would assume there are other weird bugs like this in the test suite.
One way to ensure a clean run is to remove the outputs and cache
directories.

Tom


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

end of thread, other threads:[~2020-02-13 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 10:47 [PATCH][gdb/testsuite] Remove stale exec in gdb_compile_ada Tom de Vries
2020-02-13 14:25 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox