Fix unstable test names in gdb.base/startup-with-shell.exp
authorPedro Alves <palves@redhat.com>
Tue, 24 Oct 2017 09:43:33 +0000 (10:43 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 24 Oct 2017 09:52:09 +0000 (10:52 +0100)
commit10389c2c8b56b2519441e55bf16f77882fb897cb
tree932c57116262609e677cfe452603f591d65198b7
parenta80e65a9d590f8817e4acd5a62363319b6a1f961
Fix unstable test names in gdb.base/startup-with-shell.exp

Currently, if you diff testsuite/gdb.sum of two builds in different
directories you see these spurious hunks:

  -PASS: gdb.base/startup-with-shell.exp: touch /home/pedro/gdb1/build/gdb/testsuite/outputs/gdb.base/startup-with-shell/unique-file.unique-extension
  +PASS: gdb.base/startup-with-shell.exp: touch /home/pedro/gdb2/build/gdb/testsuite/outputs/gdb.base/startup-with-shell/unique-file.unique-extension

  -PASS: gdb.base/startup-with-shell.exp: startup_with_shell = on; run_args = *.unique-extension: set args /home/pedro/gdb1/build/gdb/testsuite/outputs/gdb.base/startup-with-shell/*.unique-extension
  +PASS: gdb.base/startup-with-shell.exp: startup_with_shell = on; run_args = *.unique-extension: set args /home/pedro/gdb2/build/gdb/testsuite/outputs/gdb.base/startup-with-shell/*.unique-extension

  -PASS: gdb.base/startup-with-shell.exp: startup_with_shell = off; run_args = *.unique-extension: set args /home/pedro/gdb1/build/gdb/testsuite/outputs/gdb.base/startup-with-shell/*.unique-extension
  +PASS: gdb.base/startup-with-shell.exp: startup_with_shell = off; run_args = *.unique-extension: set args /home/pedro/gdb2/build/gdb/testsuite/outputs/gdb.base/startup-with-shell/*.unique-extension

Since the run_args arguments are already shown in the test prefix, we
can change the "set args" test name to literally "set args $run_args".
I.e., after this commit we'll show:

  PASS: gdb.base/startup-with-shell.exp: startup_with_shell = on; run_args = *.unique-extension: set args $run_args
  PASS: gdb.base/startup-with-shell.exp: startup_with_shell = off; run_args = *.unique-extension: set args $run_args
  PASS: gdb.base/startup-with-shell.exp: startup_with_shell = on; run_args = $TEST: set args $run_args
  PASS: gdb.base/startup-with-shell.exp: startup_with_shell = off; run_args = $TEST: set args $run_args

gdb/testsuite/ChangeLog:
2017-10-24  Pedro Alves  <palves@redhat.com>

* gdb.base/startup-with-shell.exp ('touch $unique_file'): Don't
include the unstable output directory name in the test's name.
(initial_setup_simple) <'set args'>: Use custom test name.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/startup-with-shell.exp