[testsuite] Fix retrieval of testname
commit63f43b8f93a68ae1212a397e009628845579a811
authorthopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Nov 2017 09:42:45 +0000 (10 09:42 +0000)
committerthopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Nov 2017 09:42:45 +0000 (10 09:42 +0000)
tree3371df485b71dc0f1f15ca9d26faa59f8cd0e71e
parent04915125c51f19594d77ba1f986803337f7f72b7
[testsuite] Fix retrieval of testname

When gcc-dg-runtest is used to run a test the test is run several times
with different options. For clarity of the log, the test infrastructure
then append the options to the testname. This means that all the code
that must deal with the testcase itself (eg. removing the output files
after the test has run) needs to remove the option name.

There is already a pattern (see below) for this in several place of the
testsuite framework but it is also missing in many places. This patch
fixes all of these places. The pattern is as follows:

set testcase [testname-for-summary]
; The name might include a list of options; extract the file name.
set testcase [lindex $testcase 0]

2017-11-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/testsuite/
    * lib/scanasm.exp (scan-assembler): Extract filename from testname used
    in summary.
    (scan-assembler-not): Likewise.
    (scan-hidden): Likewise.
    (scan-not-hidden): Likewise.
    (scan-stack-usage): Likewise.
    (scan-stack-usage-not): Likewise.
    (scan-assembler-times): Likewise.
    (scan-assembler-dem): Likewise.
    (scan-assembler-dem-not): Likewise.
    (object-size): Likewise.
    (scan-lto-assembler): Likewise.
    * lib/scandump.exp (scan-dump): Likewise.
    (scan-dump-times): Likewise.
    (scan-dump-not): Likewise.
    (scan-dump-dem): Likewise.
    (scan-dump-dem-not): Likewise

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254622 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/lib/scanasm.exp
gcc/testsuite/lib/scandump.exp