Patchwork [testsuite] scanasm: don't strip torture args from testname in summary

login
register
mail settings
Submitter Janis Johnson
Date June 13, 2012, 9:14 p.m.
Message ID <4FD902C8.3020804@mentor.com>
Download mbox | patch
Permalink /patch/164765/
State New
Headers show

Comments

Janis Johnson - June 13, 2012, 9:14 p.m.
Test results in a summary file usually include the torture options used
for the test run, but those options are stripped for pass/fail reports
for most scan-* procedures used in dg-final test directives.  This patch
refrains from stripping them and adds an extra space beteween those
options and the rest of the summary line to make it slightly more
readable. 

Tested on i686-pc-linux-gnu and arm-none-eabi.  OK for mainline?

Janis
2012-06-13  Janis Johnson  <janisjo@codesourcery.com>

	* lib/scanasm.exp (scan-assembler, scan-assembler-not, scan-hidden,
	scan-not-hiddent, scan-file, scan-file-not, scan-stack-usage,
	scan-stack-usage-not): Don't strip torture options from test name.
Mike Stump - June 13, 2012, 10:13 p.m.
On Jun 13, 2012, at 2:14 PM, Janis Johnson wrote:
> Test results in a summary file usually include the torture options used
> for the test run, but those options are stripped for pass/fail reports
> for most scan-* procedures used in dg-final test directives.  This patch
> refrains from stripping

> OK for mainline?

Ok.

Patch

Index: lib/scanasm.exp
===================================================================
--- lib/scanasm.exp	(revision 188482)
+++ lib/scanasm.exp	(working copy)
@@ -79,9 +79,10 @@ 
 
 proc scan-assembler { args } {
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     set output_file "[file rootname [file tail $testcase]].s"
-
     dg-scan "scan-assembler" 1 $testcase $output_file $args
 }
 
@@ -95,7 +96,9 @@ 
 
 proc scan-assembler-not { args } {
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     set output_file "[file rootname [file tail $testcase]].s"
 
     dg-scan "scan-assembler-not" 0 $testcase $output_file $args
@@ -126,7 +129,9 @@ 
 
 proc scan-hidden { args } {
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     set output_file "[file rootname [file tail $testcase]].s"
 
     set symbol [lindex $args 0]
@@ -143,7 +148,9 @@ 
 
 proc scan-not-hidden { args } {
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     set output_file "[file rootname [file tail $testcase]].s"
 
     set symbol [lindex $args 0]
@@ -158,7 +165,9 @@ 
 
 proc scan-file { output_file args } {
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     dg-scan "scan-file" 1 $testcase $output_file $args
 }
 
@@ -167,7 +176,9 @@ 
 
 proc scan-file-not { output_file args } {
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     dg-scan "scan-file-not" 0 $testcase $output_file $args
 }
 
@@ -176,7 +187,9 @@ 
 
 proc scan-stack-usage { args } {
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     set output_file "[file rootname [file tail $testcase]].su"
 
     dg-scan "scan-file" 1 $testcase $output_file $args
@@ -187,7 +200,9 @@ 
 
 proc scan-stack-usage-not { args } {
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     set output_file "[file rootname [file tail $testcase]].su"
 
     dg-scan "scan-file-not" 0 $testcase $output_file $args
@@ -216,7 +231,9 @@ 
     # 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
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
 
     set pattern [lindex $args 0]
     set pp_pattern [make_pattern_printable $pattern]
@@ -276,7 +293,9 @@ 
     }
 
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     set pattern [lindex $args 0]
     set pp_pattern [make_pattern_printable $pattern]
     set output_file "[file rootname [file tail $testcase]].s"
@@ -331,7 +350,9 @@ 
     }
 
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
     set pattern [lindex $args 0]
     set pp_pattern [make_pattern_printable $pattern]
     set output_file "[file rootname [file tail $testcase]].s"
@@ -387,7 +408,9 @@ 
     }
 
     upvar 2 name testcase
-    set testcase [lindex $testcase 0]
+    if { [llength $testcase] > 1 } {
+	set testcase "$testcase "
+    }
 
     set what [lindex $args 0]
     set where [lsearch { text data bss total } $what]