[6/7,gdb/testsuite] Add gdb.src/news.exp

Message ID 20261102163352.2416793-7-tdevries@suse.de
State New
Headers
Series Move NEWS items to gdb/doc/NEWS-* |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Tom de Vries Nov. 2, 2026, 4:33 p.m. UTC
  Add a test-case gdb.src/news.exp that fails when gdb/NEWS is not up-to-date.
---
 gdb/testsuite/gdb.src/news.exp | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 gdb/testsuite/gdb.src/news.exp
  

Patch

diff --git a/gdb/testsuite/gdb.src/news.exp b/gdb/testsuite/gdb.src/news.exp
new file mode 100644
index 00000000000..3bb2bf39dfb
--- /dev/null
+++ b/gdb/testsuite/gdb.src/news.exp
@@ -0,0 +1,23 @@ 
+# Copyright 2026 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set repodir $srcdir/../..
+
+with_cwd $repodir {
+
+    set result [remote_exec build "gdb/doc/gen-news.sh --check"]
+    set status [lindex $result 0]
+    gdb_assert {$status == 0} "gdb/NEWS up to date"
+}