Commit 1194911f by Janis Johnson Committed by Janis Johnson

profopt.exp: Treat prof_ext as a list.

	* lib/profopt.exp: Treat prof_ext as a list.
	* gcc.misc-tests/bprob.exp: Ditto.
	* g++.dg/bprob/bprob.exp: Ditto.

From-SVN: r97343
parent 6491eb15
2005-03-31 Janis Johnson <janis187@us.ibm.com> 2005-03-31 Janis Johnson <janis187@us.ibm.com>
* lib/profopt.exp: Treat prof_ext as a list.
* gcc.misc-tests/bprob.exp: Ditto.
* g++.dg/bprob/bprob.exp: Ditto.
* g++.dg/opt/nothrow1.C: Use cleanup-tree-dump. * g++.dg/opt/nothrow1.C: Use cleanup-tree-dump.
g++.dg/tree-ssa/empty-1.C, g++.dg/tree-ssa/nothrow-1.C, g++.dg/tree-ssa/empty-1.C, g++.dg/tree-ssa/nothrow-1.C,
g++.dg/tree-ssa/pointer-reference-alias.C, g++.dg/tree-ssa/pointer-reference-alias.C,
......
...@@ -27,7 +27,7 @@ if { ![check_profiling_available "-fprofile-arcs"] } { ...@@ -27,7 +27,7 @@ if { ![check_profiling_available "-fprofile-arcs"] } {
# The procedures in profopt.exp need these parameters. # The procedures in profopt.exp need these parameters.
set tool g++ set tool g++
set prof_ext gcda set prof_ext "gcda gcno"
if $tracelevel then { if $tracelevel then {
strace $tracelevel strace $tracelevel
......
...@@ -27,7 +27,7 @@ if { ![check_profiling_available "-fprofile-arcs"] } { ...@@ -27,7 +27,7 @@ if { ![check_profiling_available "-fprofile-arcs"] } {
# The procedures in profopt.exp need these parameters. # The procedures in profopt.exp need these parameters.
set tool gcc set tool gcc
set prof_ext gcda set prof_ext "gcda gcno"
set perf_ext tim set perf_ext tim
# Override the list defined in profopt.exp. # Override the list defined in profopt.exp.
......
...@@ -38,7 +38,7 @@ if ![info exists tool] { ...@@ -38,7 +38,7 @@ if ![info exists tool] {
error "Tools is not specified." error "Tools is not specified."
} }
if ![info exists prof_ext] { if ![info exists prof_ext] {
error "No profile data file extension specified." error "No profile data file extensions specified."
} }
# The maximum perforance degradation can be defined in the including file. # The maximum perforance degradation can be defined in the including file.
...@@ -66,14 +66,16 @@ set prof_option_list $PROFOPT_OPTIONS ...@@ -66,14 +66,16 @@ set prof_option_list $PROFOPT_OPTIONS
# profopt-cleanup -- remove profiling or performance results files. # profopt-cleanup -- remove profiling or performance results files.
# #
# TESTCASE is the name of the test # TESTCASE is the name of the test
# EXT is the extension of file to remove # EXT is the extensions of files to remove
# #
proc profopt-cleanup { testcase ext } { proc profopt-cleanup { testcase extlist } {
set basename [file tail $testcase] set basename [file tail $testcase]
set base [file rootname $basename] set base [file rootname $basename]
set files [glob -nocomplain $base.$ext] foreach ext $extlist {
if { $files != "" } { set files [glob -nocomplain $base.$ext]
eval "remote_file build delete $files" if { $files != "" } {
eval "remote_file build delete $files"
}
} }
} }
...@@ -181,12 +183,14 @@ proc profopt-execute { src } { ...@@ -181,12 +183,14 @@ proc profopt-execute { src } {
if { $status == "pass" } { if { $status == "pass" } {
set basename [file tail $testcase] set basename [file tail $testcase]
set base [file rootname $basename] set base [file rootname $basename]
set files [glob -nocomplain $base.$prof_ext] foreach ext $prof_ext {
if { $files == "" } { set files [glob -nocomplain $base.$ext]
set status "fail" if { $files == "" } {
fail "$testcase execution: file $base.$prof_ext does not exist, $option $profile_option" set status "fail"
} else { fail "$testcase execution: file $base.$ext does not exist, $option $profile_option"
$status "$testcase execution, $optstr" } else {
$status "$testcase execution, $optstr"
}
} }
} else { } else {
$status "$testcase execution, $optstr" $status "$testcase execution, $optstr"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment