gdb/testsuite: remove some duplicate test names from guile tests
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 13 May 2021 15:50:28 +0000 (16:50 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 13 May 2021 16:48:49 +0000 (17:48 +0100)
The guile support library has some "tests" that are actually being
used to setup GDB ready for the real guile tests, e.g. we load some
support modules, and define some helper functions.

As this setup is done every time we call gdb_guile_runto_main, which
could be called multiple times in a single test script, this can lead
to duplicate PASS lines.

As this setup is all pretty basic, and isn't the actual focus of the
real tests, then in this commit I pass an empty test name through to
the gdb_test_no_output calls, the result of this is that the PASS
lines are no longer printed.  This removes some duplicate tests from
the gdb.guile/*.exp set of tests.

gdb/testsuite/ChangeLog:

* lib/guile.exp (gdb_scm_load_file): Use empty test name to
silence PASS lines.
(gdb_install_guile_module): Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb-guile.exp

index e0f64965d9421ce0b4d0fa35b5ca4d79f977158e..afcf2acc0ff0de522f2ed7766e09c9d044abf749 100644 (file)
@@ -1,3 +1,9 @@
+2021-05-10  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * lib/guile.exp (gdb_scm_load_file): Use empty test name to
+       silence PASS lines.
+       (gdb_install_guile_module): Likewise.
+
 2021-05-12  George Barrett  <bob@bob131.so>
 
        * gdb.guile/scm-value.exp (test_value_in_inferior): Add test for
index f6e627e09027f067a210eaf5e48b4d8c8ca161ba..c118ffeda50c3d434eb2f12f6c95bb3cb627655d 100644 (file)
@@ -81,14 +81,23 @@ proc gdb_scm_load_file { file_name {test_name ""} } {
 proc gdb_install_guile_utils { } {
     # Define utilities in Guile to save needing (newline) all the time,
     # and in the case of "print" add a prefix to help erroneous passes.
-    gdb_test_no_output "guile (define (print x) (format #t \"= ~A\" x) (newline))"
-    gdb_test_no_output "guile (define (raw-print x) (format #t \"= ~S\" x) (newline))"
+    #
+    # Pass the empty string as the test name here, this means we don't
+    # get a pass/fail message for these tests, but also removes
+    # duplicate tests if this proc ends up getting called multiple
+    # times in a single test script.
+    gdb_test_no_output "guile (define (print x) (format #t \"= ~A\" x) (newline))" ""
+    gdb_test_no_output "guile (define (raw-print x) (format #t \"= ~S\" x) (newline))" ""
 }
 
 # Install the gdb module.
 
 proc gdb_install_guile_module { } {
-    gdb_test_no_output "guile (use-modules (gdb))"
+    # Pass the empty string as the test name here, this means we don't
+    # get a pass/fail message for these tests, but also removes
+    # duplicate tests if this proc ends up getting called multiple
+    # times in a single test script.
+    gdb_test_no_output "guile (use-modules (gdb))" ""
 }
 
 # Wrapper around runto_main that installs the guile utils and module.
This page took 0.03364 seconds and 4 git commands to generate.