* [PATCH] Fix missing files for ld when test suite not compiled in the source directory
@ 2016-08-19 15:51 Carl E. Love
2016-08-19 17:06 ` Ulrich Weigand
0 siblings, 1 reply; 3+ messages in thread
From: Carl E. Love @ 2016-08-19 15:51 UTC (permalink / raw)
To: Edjunior Barbosa Machado, Ulrich Weigand, gdb-patches; +Cc: cel
Fix missing files for ld when test suite not compiled in the source directory
This patch fixes an issues with six test suite expect files that do not
run correctly when the test suite is not built in the source directory. The
issue is these tests are not using the current "standard_testfile" call
but rather using the older set command to initialize the "testfile",
"srcfile" and "binprefix" variables or are missing the set for the
"binprefix" variable.
-----------------------------------------------
gdb/testsuite/ChangeLog
2016-08-19 Carl Love <cel@us.ibm.com>
* gdb.arch/altivec-regs.exp: Use standard_testfile instead of
maintaining separate logic for constructing the output path.
* gdb.arch/powerpc-d128-regs.exp: Likewise.
* gdb.arch/ppc-dfp.exp: Likewise.
* gdb.arch/ppc-fp.exp: Likewise.
* gdb.arch/vsx-regs.exp: Likewise.
* gdb.arch/altivec-abi.exp: Likewise, plus added local variable
binprefix for generating the additional binary files.
---
gdb/testsuite/gdb.arch/altivec-abi.exp | 14 +++++++-------
gdb/testsuite/gdb.arch/altivec-regs.exp | 4 +---
gdb/testsuite/gdb.arch/powerpc-d128-regs.exp | 4 +---
gdb/testsuite/gdb.arch/ppc-dfp.exp | 4 +---
gdb/testsuite/gdb.arch/ppc-fp.exp | 4 +---
gdb/testsuite/gdb.arch/vsx-regs.exp | 4 +---
6 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp
index 13350d2..3070fab 100644
--- a/gdb/testsuite/gdb.arch/altivec-abi.exp
+++ b/gdb/testsuite/gdb.arch/altivec-abi.exp
@@ -26,9 +26,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then {
return
}
-set testfile "altivec-abi"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
if [get_compiler_info] {
warning "get_compiler failed"
@@ -146,6 +144,8 @@ proc altivec_abi_tests { extra_flags force_abi } {
}
if [test_compiler_info gcc*] {
+ set binprefix ${binfile}
+
with_test_prefix "default ABI, auto" {
altivec_abi_tests "additional_flags=-maltivec" "auto"
}
@@ -156,23 +156,23 @@ if [test_compiler_info gcc*] {
# On 64-bit GNU/Linux with GCC 4.1 and 4.2, -mabi=no-altivec
# was broken, so skip those tests there.
if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } {
- set binfile ${objdir}/${subdir}/${testfile}-ge-ge
+ set binfile ${binprefix}-ge-ge
with_test_prefix "generic ABI, forced" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic"
}
- set binfile ${objdir}/${subdir}/${testfile}-ge-auto
+ set binfile ${binprefix}-ge-auto
with_test_prefix "generic ABI, auto" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "auto"
}
}
- set binfile ${objdir}/${subdir}/${testfile}-av-av
+ set binfile ${binprefix}-av-av
with_test_prefix "AltiVec ABI, forced" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec"
}
- set binfile ${objdir}/${subdir}/${testfile}-av-auto
+ set binfile ${binprefix}-av-auto
with_test_prefix "AltiVec ABI, auto" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto"
}
diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp
index 29cf021..f02ef26 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -27,9 +27,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then {
return
}
-set testfile "altivec-regs"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
set compile_flags {debug nowarnings}
if [get_compiler_info] {
diff --git a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
index 3335224..4a08f26 100644
--- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
@@ -25,9 +25,7 @@ if ![istarget "powerpc64*-*"] then {
return
}
-set testfile "powerpc-d128-regs"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } {
untested powerpc-d128-regs.exp
diff --git a/gdb/testsuite/gdb.arch/ppc-dfp.exp b/gdb/testsuite/gdb.arch/ppc-dfp.exp
index 75dc2ce..6f77d18 100644
--- a/gdb/testsuite/gdb.arch/ppc-dfp.exp
+++ b/gdb/testsuite/gdb.arch/ppc-dfp.exp
@@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then {
return
}
-set testfile "ppc-dfp"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
if [get_compiler_info] {
warning "get_compiler failed"
diff --git a/gdb/testsuite/gdb.arch/ppc-fp.exp b/gdb/testsuite/gdb.arch/ppc-fp.exp
index b59a3d9..523aaa3 100644
--- a/gdb/testsuite/gdb.arch/ppc-fp.exp
+++ b/gdb/testsuite/gdb.arch/ppc-fp.exp
@@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then {
return
}
-set testfile "ppc-fp"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
if [get_compiler_info] {
warning "get_compiler failed"
diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp
index 58bfab4..307f12a 100644
--- a/gdb/testsuite/gdb.arch/vsx-regs.exp
+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp
@@ -24,9 +24,7 @@ if {![istarget "powerpc*"] || [skip_vsx_tests]} then {
return
}
-set testfile "vsx-regs"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
set compile_flags {debug nowarnings quiet}
if [get_compiler_info] {
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix missing files for ld when test suite not compiled in the source directory
2016-08-19 15:51 [PATCH] Fix missing files for ld when test suite not compiled in the source directory Carl E. Love
@ 2016-08-19 17:06 ` Ulrich Weigand
2016-08-19 18:10 ` Carl E. Love
0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Weigand @ 2016-08-19 17:06 UTC (permalink / raw)
To: Carl E. Love; +Cc: Edjunior Barbosa Machado, Ulrich Weigand, gdb-patches, cel
Carl Love wrote:
> gdb/testsuite/ChangeLog
>
> 2016-08-19 Carl Love <cel@us.ibm.com>
>
> * gdb.arch/altivec-regs.exp: Use standard_testfile instead of
> maintaining separate logic for constructing the output path.
> * gdb.arch/powerpc-d128-regs.exp: Likewise.
> * gdb.arch/ppc-dfp.exp: Likewise.
> * gdb.arch/ppc-fp.exp: Likewise.
> * gdb.arch/vsx-regs.exp: Likewise.
> * gdb.arch/altivec-abi.exp: Likewise, plus added local variable
> binprefix for generating the additional binary files.
This is OK.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix missing files for ld when test suite not compiled in the source directory
2016-08-19 17:06 ` Ulrich Weigand
@ 2016-08-19 18:10 ` Carl E. Love
0 siblings, 0 replies; 3+ messages in thread
From: Carl E. Love @ 2016-08-19 18:10 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: Edjunior Barbosa Machado, Ulrich Weigand, gdb-patches
On Fri, 2016-08-19 at 19:06 +0200, Ulrich Weigand wrote:
> Carl Love wrote:
>
> > gdb/testsuite/ChangeLog
> >
> > 2016-08-19 Carl Love <cel@us.ibm.com>
> >
> > * gdb.arch/altivec-regs.exp: Use standard_testfile instead of
> > maintaining separate logic for constructing the output path.
> > * gdb.arch/powerpc-d128-regs.exp: Likewise.
> > * gdb.arch/ppc-dfp.exp: Likewise.
> > * gdb.arch/ppc-fp.exp: Likewise.
> > * gdb.arch/vsx-regs.exp: Likewise.
> > * gdb.arch/altivec-abi.exp: Likewise, plus added local variable
> > binprefix for generating the additional binary files.
>
> This is OK.
>
> Thanks,
> Ulrich
>
Uli:
I have committed the patch.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=20c2c024c1e89e402a57e8c3577fb9777709d9a4
Thanks.
Carl Love
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-19 18:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-19 15:51 [PATCH] Fix missing files for ld when test suite not compiled in the source directory Carl E. Love
2016-08-19 17:06 ` Ulrich Weigand
2016-08-19 18:10 ` Carl E. Love
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox