S390: Fix output path for s390-tdbregs test case

Message ID m3a8mp189b.fsf@oc1027705133.ibm.com
State New, archived
Headers

Commit Message

Andreas Arnez Feb. 25, 2016, 8:53 a.m. UTC
  Since test artifacts are always organized in a directory hierarchy, the
s390-tdbregs test case is not executed correctly any more.  This is
because it uses an obsolete way of constructing the executable's path.

This change invokes prepare_for_testing instead.

gdb/testsuite/ChangeLog:

	* gdb.arch/s390-tdbregs.exp: Use prepare_for_testing instead of
	manually constructing the output path.
---
 gdb/testsuite/gdb.arch/s390-tdbregs.exp | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
  

Comments

Andreas Arnez March 1, 2016, 11:49 a.m. UTC | #1
Pushed:

On Thu, Feb 25 2016, Andreas Arnez wrote:

> Since test artifacts are always organized in a directory hierarchy, the
> s390-tdbregs test case is not executed correctly any more.  This is
> because it uses an obsolete way of constructing the executable's path.
>
> This change invokes prepare_for_testing instead.
>
> gdb/testsuite/ChangeLog:
>
> 	* gdb.arch/s390-tdbregs.exp: Use prepare_for_testing instead of
> 	manually constructing the output path.
  

Patch

diff --git a/gdb/testsuite/gdb.arch/s390-tdbregs.exp b/gdb/testsuite/gdb.arch/s390-tdbregs.exp
index 113125d..a377668 100644
--- a/gdb/testsuite/gdb.arch/s390-tdbregs.exp
+++ b/gdb/testsuite/gdb.arch/s390-tdbregs.exp
@@ -24,25 +24,12 @@  if { ![istarget s390-*-*] && ![istarget s390x-*-* ] } {
     return
 }
 
-set testfile "s390-tdbregs"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
-if { [get_compiler_info] } {
+if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
     return -1
 }
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
-      executable [list debug]] != "" } {
-    fail "compile failed"
-    return
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 if { ![runto_main] } then {
     gdb_suppress_tests
 }