mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
[gdb/testsuite] Fix gdb.cp/*.exp for remote host
Fix a few test-cases in gdb.cp/*.exp for remote host using new proc include_file. Tested on x86_64-linux.
This commit is contained in:
parent
904d9b02a1
commit
722c459603
@ -19,6 +19,8 @@ require allow_cplus_tests
|
|||||||
|
|
||||||
standard_testfile .cc breakpoint-locs-2.cc
|
standard_testfile .cc breakpoint-locs-2.cc
|
||||||
|
|
||||||
|
include_file breakpoint-locs.h
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2"\
|
if { [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2"\
|
||||||
{debug c++}] } {
|
{debug c++}] } {
|
||||||
return -1
|
return -1
|
||||||
|
@ -17,6 +17,8 @@ require allow_cplus_tests
|
|||||||
|
|
||||||
standard_testfile .cc
|
standard_testfile .cc
|
||||||
|
|
||||||
|
include_file includefile
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,8 @@ require allow_cplus_tests allow_shlib_tests
|
|||||||
|
|
||||||
standard_testfile .cc gdb2384-base.cc
|
standard_testfile .cc gdb2384-base.cc
|
||||||
|
|
||||||
|
include_file gdb2384-base.h
|
||||||
|
|
||||||
set sofile [standard_output_file gdb2384-base.so]
|
set sofile [standard_output_file gdb2384-base.so]
|
||||||
|
|
||||||
if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $sofile {debug c++}] != ""
|
if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $sofile {debug c++}] != ""
|
||||||
|
@ -18,6 +18,8 @@ require allow_cplus_tests
|
|||||||
|
|
||||||
standard_testfile hang1.cc hang2.cc hang3.cc
|
standard_testfile hang1.cc hang2.cc hang3.cc
|
||||||
|
|
||||||
|
include_file hang.H
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile \
|
if {[prepare_for_testing "failed to prepare" $testfile \
|
||||||
[list $srcfile $srcfile2 $srcfile3] {debug c++}]} {
|
[list $srcfile $srcfile2 $srcfile3] {debug c++}]} {
|
||||||
return -1
|
return -1
|
||||||
|
@ -27,6 +27,8 @@ require allow_cplus_tests
|
|||||||
|
|
||||||
standard_testfile .cc m-static1.cc
|
standard_testfile .cc m-static1.cc
|
||||||
|
|
||||||
|
include_file m-static.h
|
||||||
|
|
||||||
set flags [list debug c++]
|
set flags [list debug c++]
|
||||||
if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
|
if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
|
||||||
# Work around PR gcc/101452.
|
# Work around PR gcc/101452.
|
||||||
@ -181,7 +183,11 @@ gdb_test "print test4.somewhere" "\\$\[0-9\].* = 3.14\[0-9\]*" "static const flo
|
|||||||
|
|
||||||
# Also make sure static const members can be found via "info var".
|
# Also make sure static const members can be found via "info var".
|
||||||
if { $non_dwarf } { setup_xfail *-*-* }
|
if { $non_dwarf } { setup_xfail *-*-* }
|
||||||
gdb_test "info variable everywhere" "File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;"
|
gdb_test "info variable everywhere" \
|
||||||
|
[multi_line \
|
||||||
|
"File (.*/)?m-static\[.\]h:" \
|
||||||
|
"$decimal:\tconst int gnu_obj_4::everywhere;" \
|
||||||
|
".*"]
|
||||||
|
|
||||||
# Perhaps at some point test4 should also include a test for a static
|
# Perhaps at some point test4 should also include a test for a static
|
||||||
# const int that was initialized in the header file. But I'm not sure
|
# const int that was initialized in the header file. But I'm not sure
|
||||||
|
@ -22,6 +22,7 @@ require allow_cplus_tests
|
|||||||
|
|
||||||
standard_testfile mb-inline1.cc mb-inline2.cc
|
standard_testfile mb-inline1.cc mb-inline2.cc
|
||||||
set hdrfile "${testfile}.h"
|
set hdrfile "${testfile}.h"
|
||||||
|
include_file $hdrfile
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile \
|
if {[prepare_for_testing "failed to prepare" $testfile \
|
||||||
[list $srcfile $srcfile2] {debug c++}]} {
|
[list $srcfile $srcfile2] {debug c++}]} {
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
# a different file providing only ELF symbols.
|
# a different file providing only ELF symbols.
|
||||||
|
|
||||||
standard_testfile .cc minsym-fallback-main.cc
|
standard_testfile .cc minsym-fallback-main.cc
|
||||||
|
|
||||||
|
include_file minsym-fallback.h
|
||||||
|
|
||||||
set executable $testfile
|
set executable $testfile
|
||||||
set objfile [standard_output_file ${testfile}.o]
|
set objfile [standard_output_file ${testfile}.o]
|
||||||
set objmainfile [standard_output_file ${testfile}-main.o]
|
set objmainfile [standard_output_file ${testfile}-main.o]
|
||||||
|
@ -57,6 +57,8 @@ require allow_cplus_tests
|
|||||||
# Test for c++/11734
|
# Test for c++/11734
|
||||||
standard_testfile ovsrch1.cc ovsrch2.cc ovsrch3.cc ovsrch4.cc
|
standard_testfile ovsrch1.cc ovsrch2.cc ovsrch3.cc ovsrch4.cc
|
||||||
|
|
||||||
|
include_file ovsrch.h
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile \
|
if {[prepare_for_testing "failed to prepare" $testfile \
|
||||||
[list $srcfile $srcfile2 $srcfile3 $srcfile4] {c++ debug}]} {
|
[list $srcfile $srcfile2 $srcfile3 $srcfile4] {c++ debug}]} {
|
||||||
return -1
|
return -1
|
||||||
|
@ -22,6 +22,8 @@ require allow_cplus_tests
|
|||||||
load_lib "cp-support.exp"
|
load_lib "cp-support.exp"
|
||||||
|
|
||||||
standard_testfile pr10728-x.cc pr10728-y.cc
|
standard_testfile pr10728-x.cc pr10728-y.cc
|
||||||
|
include_file pr10728-x.h
|
||||||
|
|
||||||
set tfx [standard_output_file pr10728-x.o]
|
set tfx [standard_output_file pr10728-x.o]
|
||||||
set tfy [standard_output_file pr10728-y.o]
|
set tfy [standard_output_file pr10728-y.o]
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ require allow_cplus_tests
|
|||||||
|
|
||||||
standard_testfile rtti1.cc rtti2.cc
|
standard_testfile rtti1.cc rtti2.cc
|
||||||
|
|
||||||
|
include_file rtti.h
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile \
|
if {[prepare_for_testing "failed to prepare" $testfile \
|
||||||
[list $srcfile $srcfile2] {debug c++}]} {
|
[list $srcfile $srcfile2] {debug c++}]} {
|
||||||
return -1
|
return -1
|
||||||
|
@ -22,6 +22,8 @@ require allow_cplus_tests
|
|||||||
|
|
||||||
standard_testfile .cc stub-array-size2.cc
|
standard_testfile .cc stub-array-size2.cc
|
||||||
|
|
||||||
|
include_file stub-array-size.h
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
|
if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
|
||||||
{c++ debug}]} {
|
{c++ debug}]} {
|
||||||
return -1
|
return -1
|
||||||
|
@ -22,6 +22,8 @@ load_lib "cp-support.exp"
|
|||||||
|
|
||||||
standard_testfile .cc subtypes-2.cc
|
standard_testfile .cc subtypes-2.cc
|
||||||
|
|
||||||
|
include_file subtypes.h
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile \
|
if {[prepare_for_testing "failed to prepare" $testfile \
|
||||||
[list $srcfile $srcfile2] \
|
[list $srcfile $srcfile2] \
|
||||||
{debug c++ additional_flags=-std=c++11}]} {
|
{debug c++ additional_flags=-std=c++11}]} {
|
||||||
|
@ -9554,6 +9554,18 @@ gdb_caching_proc have_compile_flag { flag } {
|
|||||||
additional_flags=$flag]
|
additional_flags=$flag]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Handle include file $srcdir/$subdir/FILE.
|
||||||
|
|
||||||
|
proc include_file { file } {
|
||||||
|
set file [file join $::srcdir $::subdir $file]
|
||||||
|
if { [is_remote host] } {
|
||||||
|
set res [remote_download host $file]
|
||||||
|
} else {
|
||||||
|
set res $file
|
||||||
|
}
|
||||||
|
|
||||||
|
return $res
|
||||||
|
}
|
||||||
|
|
||||||
# Handle include file FILE, and if necessary update compiler flags variable
|
# Handle include file FILE, and if necessary update compiler flags variable
|
||||||
# FLAGS.
|
# FLAGS.
|
||||||
|
Loading…
Reference in New Issue
Block a user