summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/scanasm.exp
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-26 03:10:43 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-26 03:10:43 +0000
commitdae098c6f7a552906f029e7062848203186dfda4 (patch)
treef5cd6542f29ec0e5e82054de63def7a401fe8aaf /gcc/testsuite/lib/scanasm.exp
parent42464af0083e2056d7f7363e75e36079768f1d3d (diff)
downloadgcc-dae098c6f7a552906f029e7062848203186dfda4.tar.gz
* lib/target-supports-dg.exp (testname-for-summary): New.
* lib/profopt.exp (profopt_execute): Define testname_with_flags. * lib/gcc-dg.exp (cleanup-coverage-files, cleanup-repo-notes, cleanup-stack-usage, cleanup-dump, cleanup-saved-temps, scan-module, scan-module-absence, output-exists, output-exists-not: Use testname-for-summary. (dg-test): Clean up testname_with_flags. * lib/scanasm.exp (scan-assembler, scan-assembler-not, scan-hidden, scan-not-hidden, scan-file, scan-file-not, scan-stack-usage, scan-stack-usage-not, scan-assembler-times, scan-assembler-dem, scan-assembler-dem-not, object-size: Use testname-for-summary. * lib/gcov.exp (run-gcov): Likewise. * lib/scandump.exp (scan-dump, scan-dump-times, scan-dump-not, scan-dump-dem, scan-dump-dem-note): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188972 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib/scanasm.exp')
-rw-r--r--gcc/testsuite/lib/scanasm.exp65
1 files changed, 12 insertions, 53 deletions
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index ebd3c611da6..51c19d3ade1 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -78,10 +78,7 @@ proc dg-scan { name positive testcase output_file orig_args } {
# dg-scan for details.
proc scan-assembler { args } {
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
set output_file "[file rootname [file tail $testcase]].s"
dg-scan "scan-assembler" 1 $testcase $output_file $args
}
@@ -95,10 +92,7 @@ proc scan-assembler_required_options { args } {
# compiler. See dg-scan for details.
proc scan-assembler-not { args } {
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
set output_file "[file rootname [file tail $testcase]].s"
dg-scan "scan-assembler-not" 0 $testcase $output_file $args
@@ -128,10 +122,7 @@ proc hidden-scan-for { symbol } {
# produced by the compiler.
proc scan-hidden { args } {
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
set output_file "[file rootname [file tail $testcase]].s"
set symbol [lindex $args 0]
@@ -147,10 +138,7 @@ proc scan-hidden { args } {
# produced by the compiler.
proc scan-not-hidden { args } {
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
set output_file "[file rootname [file tail $testcase]].s"
set symbol [lindex $args 0]
@@ -164,10 +152,7 @@ proc scan-not-hidden { args } {
# Look for a pattern in OUTPUT_FILE. See dg-scan for details.
proc scan-file { output_file args } {
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
dg-scan "scan-file" 1 $testcase $output_file $args
}
@@ -175,10 +160,7 @@ proc scan-file { output_file args } {
# for details.
proc scan-file-not { output_file args } {
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
dg-scan "scan-file-not" 0 $testcase $output_file $args
}
@@ -186,10 +168,7 @@ proc scan-file-not { output_file args } {
# dg-scan for details.
proc scan-stack-usage { args } {
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
set output_file "[file rootname [file tail $testcase]].su"
dg-scan "scan-file" 1 $testcase $output_file $args
@@ -199,10 +178,7 @@ proc scan-stack-usage { args } {
# compiler. See dg-scan for details.
proc scan-stack-usage-not { args } {
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
set output_file "[file rootname [file tail $testcase]].su"
dg-scan "scan-file-not" 0 $testcase $output_file $args
@@ -227,14 +203,7 @@ proc scan-assembler-times { args } {
}
}
- # This assumes that we are two frames down from dg-test, and that
- # it still stores the filename of the testcase in a local variable "name".
- # A cleaner solution would require a new dejagnu release.
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
-
+ set testcase [testname-for-summary]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
@@ -292,10 +261,7 @@ proc scan-assembler-dem { args } {
verbose -log "c++filt is $cxxfilt"
}
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
set output_file "[file rootname [file tail $testcase]].s"
@@ -349,10 +315,7 @@ proc scan-assembler-dem-not { args } {
verbose -log "c++filt is $cxxfilt"
}
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
+ set testcase [testname-for-summary]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
set output_file "[file rootname [file tail $testcase]].s"
@@ -407,11 +370,7 @@ proc object-size { args } {
verbose -log "size is $size"
}
- upvar 2 name testcase
- if { [llength $testcase] > 1 } {
- set testcase "$testcase "
- }
-
+ set testcase [testname-for-summary]
set what [lindex $args 0]
set where [lsearch { text data bss total } $what]
if { $where == -1 } {