From b3215adc06e4946aca4b6b6c4ebea305753fbe22 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 22 Jul 2011 18:01:43 +0000 Subject: [PATCH] * gdb.python/py-mi.exp: Use different file names for different versions of the executable under test. * gdb.python/py-prettyprint.exp: Likewise. * gdb.python/py-symbol.exp: Likewise. * gdb.python/py-template.exp: Likewise. * gdb.python/py-type.exp: Likewise. * gdb.python/py-value.exp: Likewise. --- gdb/testsuite/ChangeLog | 10 ++++++++++ gdb/testsuite/gdb.python/py-mi.exp | 4 ++-- gdb/testsuite/gdb.python/py-prettyprint.exp | 4 ++-- gdb/testsuite/gdb.python/py-symbol.exp | 4 ++-- gdb/testsuite/gdb.python/py-template.exp | 22 ++++++++++----------- gdb/testsuite/gdb.python/py-type.exp | 10 +++++----- gdb/testsuite/gdb.python/py-value.exp | 4 ++-- 7 files changed, 34 insertions(+), 24 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c7e60d730ec..d44833747d1 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2011-07-22 Ulrich Weigand + + * gdb.python/py-mi.exp: Use different file names for different + versions of the executable under test. + * gdb.python/py-prettyprint.exp: Likewise. + * gdb.python/py-symbol.exp: Likewise. + * gdb.python/py-template.exp: Likewise. + * gdb.python/py-type.exp: Likewise. + * gdb.python/py-value.exp: Likewise. + 2011-07-22 Ulrich Weigand * gdb.python/py-breakpoint.exp: Re-set can-use-hw-watchpoints diff --git a/gdb/testsuite/gdb.python/py-mi.exp b/gdb/testsuite/gdb.python/py-mi.exp index 2e4d12bd39d..749cb930838 100644 --- a/gdb/testsuite/gdb.python/py-mi.exp +++ b/gdb/testsuite/gdb.python/py-mi.exp @@ -286,7 +286,7 @@ mi_list_varobj_children nstype2 { # C++ MI tests gdb_exit -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-c++" \ executable {debug c++ additional_flags=-DMI}] != "" } { untested "Couldn't compile ${srcfile} in c++ mode" return -1 @@ -297,7 +297,7 @@ if [mi_gdb_start] { } mi_delete_breakpoints mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} +mi_gdb_load ${binfile}-c++ if {[lsearch -exact [mi_get_features] python] < 0} { unsupported "python support is disabled" diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp index 911725f6f25..f3a5e5e9240 100644 --- a/gdb/testsuite/gdb.python/py-prettyprint.exp +++ b/gdb/testsuite/gdb.python/py-prettyprint.exp @@ -35,7 +35,7 @@ if { [skip_python_tests] } { continue } proc run_lang_tests {lang} { global srcdir subdir srcfile binfile testfile hex - if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug $lang"] != "" } { + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-${lang}" executable "debug $lang"] != "" } { untested "Couldn't compile ${srcfile} in $lang mode" return -1 } @@ -46,7 +46,7 @@ proc run_lang_tests {lang} { gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} + gdb_load ${binfile}-${lang} if ![runto_main ] then { perror "couldn't run to breakpoint" diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp index bb224858b5b..2feff6a2503 100644 --- a/gdb/testsuite/gdb.python/py-symbol.exp +++ b/gdb/testsuite/gdb.python/py-symbol.exp @@ -99,7 +99,7 @@ gdb_test "python print t\[0\].symtab" "gdb.python/py-symbol.c.*" "Get symtab" # C++ tests # Recompile binary. - if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug c++"] != "" } { + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-c++" executable "debug c++"] != "" } { untested "Couldn't compile ${srcfile} in c++ mode" return -1 } @@ -108,7 +108,7 @@ gdb_test "python print t\[0\].symtab" "gdb.python/py-symbol.c.*" "Get symtab" gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +gdb_load ${binfile}-c++ if ![runto_main] then { fail "Can't run to main" diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp index 9656831693e..ab49ca95f81 100644 --- a/gdb/testsuite/gdb.python/py-template.exp +++ b/gdb/testsuite/gdb.python/py-template.exp @@ -40,15 +40,15 @@ gdb_reinitialize_dir $srcdir/$subdir # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } -proc test_template_arg {type} { +proc test_template_arg {name type} { global testfile srcdir subdir srcfile binfile - if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-${name}" \ executable \ [list debug c++ additional_flags="-DTYPE=$type"]] != "" } { untested $type return -1 } - gdb_load ${binfile} + gdb_load ${binfile}-${name} if ![runto_main ] then { perror "couldn't run to breakpoint" return @@ -62,11 +62,11 @@ proc test_template_arg {type} { gdb_test "python print foo.type.template_argument(0)" $t $type } -test_template_arg "const int" -test_template_arg "volatile int" -test_template_arg "const int &" -test_template_arg "volatile int &" -test_template_arg "volatile int * const" -test_template_arg "volatile int * const *" -test_template_arg "const int * volatile" -test_template_arg "const int * volatile * const * volatile *" +test_template_arg "ci" "const int" +test_template_arg "vi" "volatile int" +test_template_arg "cir" "const int &" +test_template_arg "vir" "volatile int &" +test_template_arg "vipc" "volatile int * const" +test_template_arg "vipcp" "volatile int * const *" +test_template_arg "cipv" "const int * volatile" +test_template_arg "cipvpcpvp" "const int * volatile * const * volatile *" diff --git a/gdb/testsuite/gdb.python/py-type.exp b/gdb/testsuite/gdb.python/py-type.exp index 01d4477b2f3..41d4594492f 100644 --- a/gdb/testsuite/gdb.python/py-type.exp +++ b/gdb/testsuite/gdb.python/py-type.exp @@ -34,20 +34,20 @@ if [get_compiler_info not-used c++] { proc build_inferior {lang} { global srcdir subdir srcfile binfile testfile hex - if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug $lang"] != "" } { + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-${lang}" executable "debug $lang"] != "" } { untested "Couldn't compile ${srcfile} in $lang mode" return -1 } } # Restart GDB. -proc restart_gdb {} { +proc restart_gdb {lang} { global srcdir subdir srcfile binfile testfile hex gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} + gdb_load ${binfile}-${lang} if ![runto_main ] then { perror "couldn't run to breakpoint" @@ -162,7 +162,7 @@ proc test_template {} { # Perform C Tests. build_inferior "c" -restart_gdb +restart_gdb "c" # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } @@ -172,7 +172,7 @@ test_fields "c" # Perform C++ Tests. build_inferior "c++" -restart_gdb +restart_gdb "c++" runto_bp "break to inspect struct and array." test_fields "c++" test_base_class diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index faeb64361e2..cd8b9a5d4e1 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -326,7 +326,7 @@ proc test_value_after_death {} { proc test_subscript_regression {lang} { global srcdir subdir srcfile binfile testfile hex - if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug $lang"] != "" } { + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-${lang}" executable "debug $lang"] != "" } { untested "Couldn't compile ${srcfile} in $lang mode" return -1 } @@ -335,7 +335,7 @@ proc test_subscript_regression {lang} { gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} + gdb_load ${binfile}-${lang} if ![runto_main ] then { perror "couldn't run to breakpoint" -- 2.30.2