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.
This commit is contained in:
Carl E. Love
2016-08-19 11:06:38 -07:00
parent 03bcd7394e
commit 20c2c024c1
7 changed files with 23 additions and 22 deletions

View File

@ -1,3 +1,14 @@
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.
2016-08-19 Pedro Alves <palves@redhat.com> 2016-08-19 Pedro Alves <palves@redhat.com>
* gdb.trace/mi-trace-frame-collected.exp * gdb.trace/mi-trace-frame-collected.exp

View File

@ -26,9 +26,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then {
return return
} }
set testfile "altivec-abi" standard_testfile
set binfile ${objdir}/${subdir}/${testfile}
set srcfile ${testfile}.c
if [get_compiler_info] { if [get_compiler_info] {
warning "get_compiler failed" warning "get_compiler failed"
@ -146,6 +144,8 @@ proc altivec_abi_tests { extra_flags force_abi } {
} }
if [test_compiler_info gcc*] { if [test_compiler_info gcc*] {
set binprefix ${binfile}
with_test_prefix "default ABI, auto" { with_test_prefix "default ABI, auto" {
altivec_abi_tests "additional_flags=-maltivec" "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 # On 64-bit GNU/Linux with GCC 4.1 and 4.2, -mabi=no-altivec
# was broken, so skip those tests there. # was broken, so skip those tests there.
if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } { 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" { with_test_prefix "generic ABI, forced" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic" 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" { with_test_prefix "generic ABI, auto" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "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" { with_test_prefix "AltiVec ABI, forced" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec" 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" { with_test_prefix "AltiVec ABI, auto" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto" altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto"
} }

View File

@ -27,9 +27,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then {
return return
} }
set testfile "altivec-regs" standard_testfile
set binfile ${objdir}/${subdir}/${testfile}
set srcfile ${testfile}.c
set compile_flags {debug nowarnings} set compile_flags {debug nowarnings}
if [get_compiler_info] { if [get_compiler_info] {

View File

@ -25,9 +25,7 @@ if ![istarget "powerpc64*-*"] then {
return return
} }
set testfile "powerpc-d128-regs" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } {
untested powerpc-d128-regs.exp untested powerpc-d128-regs.exp

View File

@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then {
return return
} }
set testfile "ppc-dfp" standard_testfile
set binfile ${objdir}/${subdir}/${testfile}
set srcfile ${testfile}.c
if [get_compiler_info] { if [get_compiler_info] {
warning "get_compiler failed" warning "get_compiler failed"

View File

@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then {
return return
} }
set testfile "ppc-fp" standard_testfile
set binfile ${objdir}/${subdir}/${testfile}
set srcfile ${testfile}.c
if [get_compiler_info] { if [get_compiler_info] {
warning "get_compiler failed" warning "get_compiler failed"

View File

@ -24,9 +24,7 @@ if {![istarget "powerpc*"] || [skip_vsx_tests]} then {
return return
} }
set testfile "vsx-regs" standard_testfile
set binfile ${objdir}/${subdir}/${testfile}
set srcfile ${testfile}.c
set compile_flags {debug nowarnings quiet} set compile_flags {debug nowarnings quiet}
if [get_compiler_info] { if [get_compiler_info] {