]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Restore dg-interpreter-batch-mode for libstdc++ tests
authorJonathan Wakely <jwakely@redhat.com>
Fri, 26 Aug 2016 11:35:58 +0000 (12:35 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 26 Aug 2016 11:35:58 +0000 (12:35 +0100)
2016-08-26  Jonathan Wakely  <jwakely@redhat.com>
    Pedro Alves  <palves@redhat.com>

* 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 <palves@redhat.com>
From-SVN: r239776

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/lib/gdb-test.exp
libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp
libstdc++-v3/testsuite/libstdc++-xmethods/xmethods.exp

index 8b552b08cfb9cf12ff27bbbc7987d09bd6c27620..8a7f59da1de6b55037a840c6f62bded4ba801e00 100644 (file)
@@ -1,3 +1,12 @@
+2016-08-26  Jonathan Wakely  <jwakely@redhat.com>
+           Pedro Alves  <palves@redhat.com>
+
+       * 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  <jwakely@redhat.com>
 
        * config/abi/pre/gnu.ver (GLIBCXX_3.4, GLIBCXX_3.4.21): Use more
index 5570009a0d6dc29e111a4f7a9135730648608a03..a0298832be1622bcdc272b7e84d3de5c3c9b25c7 100644 (file)
@@ -277,3 +277,15 @@ proc gdb_version_check_xmethods {} {
              "python import gdb.xmethod; print(gdb.xmethod.XMethod)" \
              "<class '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}
+}
index 0c62b5e608a23cf1d087516d982f3e0ef37758f7..cc003cddafde4f477cb0fd53f0e530201f5d5043 100644 (file)
@@ -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] {
index ee9b31ac65daae5b9ea88f958145964ecff93a84..e580d730a564318bd7222b775a25ca3c37f5a98d 100644 (file)
@@ -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] {