aboutsummaryrefslogtreecommitdiff
path: root/gdb/d-namespace.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-04-23 15:19:15 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-05-11 22:27:04 +0100
commitd30dcd1288ab230d9600413fc78a29bbd96aa14a (patch)
tree6d0eaf278f62c5ff5173c8374303fc6e0e56a539 /gdb/d-namespace.c
parent34584c091bb4414cea6531269f435b2938b2d8e6 (diff)
downloadbinutils-d30dcd1288ab230d9600413fc78a29bbd96aa14a.zip
binutils-d30dcd1288ab230d9600413fc78a29bbd96aa14a.tar.gz
binutils-d30dcd1288ab230d9600413fc78a29bbd96aa14a.tar.bz2
gdb/testsuite: Detect and warn about duplicate test names
Building on the previous commit, this patch detects when two tests have the same test name and causes Dejagnu to print a new result type '# of duplicate test names' in the result summary. A line starting with 'DUPLICATE: ' is also added to the gdb.sum and gdb.log files. The DUPLICATE markers will be printed the second time a duplicate test name is seen, and every time after that. So you might see: PASS: gdb.base/sometest.exp: foo PASS: gdb.base/sometest.exp: bar PASS: gdb.base/sometest.exp: foo DUPLICATE: gdb.base/sometest.exp: foo PASS: gdb.base/sometest.exp: baz PASS: gdb.base/sometest.exp: foo DUPLICATE: gdb.base/sometest.exp: foo However, the results will report a duplicate count of 1, indicating that just one test name (foo) was duplicated. Currently if the tests are run in parallel mode the new result type is not merged into the combined summary file so users will need to run in non-parallel mode to check this result. Similarly, the 'DUPLICATE: ' markers will not be merged into the final gdb.sum file. A later commit will fix this. gdb/testsuite/ChangeLog: * lib/check-test-names.exp (all_test_names): New module variable. (counts): Add 'duplicates' field. (_check_duplicates): New procedure. (check): Also check for duplicates. (do_log_summary): Print duplicates count. (do_reset_vars): Reset counter for duplicate test names, and discard all know test names.
Diffstat (limited to 'gdb/d-namespace.c')
0 files changed, 0 insertions, 0 deletions