From: Jonathan Wakely Date: Fri, 26 Aug 2016 11:35:58 +0000 (+0100) Subject: Restore dg-interpreter-batch-mode for libstdc++ tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8223484b3a8b8bbe20dfd70706e3da626f2b962;p=gcc.git Restore dg-interpreter-batch-mode for libstdc++ tests 2016-08-26 Jonathan Wakely Pedro Alves * testsuite/lib/gdb-test.exp (gdb-dg-runtest): Define wrapper to save and restore dg-interpreter-batch-mode. * testsuite/libstdc++-prettyprinters/prettyprinters.exp: Use gdb-dg-runtest instead of dg-runtest. * testsuite/libstdc++-xmethods/xmethods.exp: Likewise. Co-Authored-By: Pedro Alves From-SVN: r239776 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8b552b08cfb..8a7f59da1de 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2016-08-26 Jonathan Wakely + Pedro Alves + + * testsuite/lib/gdb-test.exp (gdb-dg-runtest): Define wrapper to save + and restore dg-interpreter-batch-mode. + * testsuite/libstdc++-prettyprinters/prettyprinters.exp: Use + gdb-dg-runtest instead of dg-runtest. + * testsuite/libstdc++-xmethods/xmethods.exp: Likewise. + 2016-08-26 Jonathan Wakely * config/abi/pre/gnu.ver (GLIBCXX_3.4, GLIBCXX_3.4.21): Use more diff --git a/libstdc++-v3/testsuite/lib/gdb-test.exp b/libstdc++-v3/testsuite/lib/gdb-test.exp index 5570009a0d6..a0298832be1 100644 --- a/libstdc++-v3/testsuite/lib/gdb-test.exp +++ b/libstdc++-v3/testsuite/lib/gdb-test.exp @@ -277,3 +277,15 @@ proc gdb_version_check_xmethods {} { "python import gdb.xmethod; print(gdb.xmethod.XMethod)" \ ""] } + +# Like dg-runtest but keep the .exe around. dg-test has an option for +# this but there is no way to pass it through dg-runtest. +proc gdb-dg-runtest {args} { + global dg-interpreter-batch-mode + set saved-dg-interpreter-batch-mode ${dg-interpreter-batch-mode} + set dg-interpreter-batch-mode 1 + + eval dg-runtest $args + + set dg-interpreter-batch-mode ${saved-dg-interpreter-batch-mode} +} diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp b/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp index 0c62b5e608a..cc003cddafd 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp @@ -41,14 +41,9 @@ if {! [gdb_version_check]} { return } -# This can be used to keep the .exe around. dg-test has an option for -# this but there is no way to pass it through dg-runtest. -global dg-interpreter-batch-mode -set dg-interpreter-batch-mode 1 - global DEFAULT_CXXFLAGS global PCH_CXXFLAGS -dg-runtest [lsort [glob $srcdir/$subdir/*.cc]] \ +gdb-dg-runtest [lsort [glob $srcdir/$subdir/*.cc]] \ "" "$DEFAULT_CXXFLAGS $PCH_CXXFLAGS" if [info exists guality_gdb_name] { diff --git a/libstdc++-v3/testsuite/libstdc++-xmethods/xmethods.exp b/libstdc++-v3/testsuite/libstdc++-xmethods/xmethods.exp index ee9b31ac65d..e580d730a56 100644 --- a/libstdc++-v3/testsuite/libstdc++-xmethods/xmethods.exp +++ b/libstdc++-v3/testsuite/libstdc++-xmethods/xmethods.exp @@ -42,14 +42,9 @@ if {! [gdb_version_check_xmethods]} { return } -# This can be used to keep the .exe around. dg-test has an option for -# this but there is no way to pass it through dg-runtest. -global dg-interpreter-batch-mode -set dg-interpreter-batch-mode 1 - global DEFAULT_CXXFLAGS global PCH_CXXFLAGS -dg-runtest [lsort [glob $srcdir/$subdir/*.cc]] \ +gdb-dg-runtest [lsort [glob $srcdir/$subdir/*.cc]] \ "" "$DEFAULT_CXXFLAGS $PCH_CXXFLAGS" if [info exists guality_gdb_name] {