summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-31 18:36:30 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-31 18:36:30 +0000
commitd61b406b114d997e521cc446d6f7fdd1747fe35d (patch)
tree7bcd664bdc70831e7da8746fdaa745ef7550f552 /gcc/testsuite/lib
parentfbfa4aa27f92646c7d078074ac7e213ae2c34165 (diff)
downloadgcc-d61b406b114d997e521cc446d6f7fdd1747fe35d.tar.gz
* lib/profopt.exp: Treat prof_ext as a list.
* gcc.misc-tests/bprob.exp: Ditto. * g++.dg/bprob/bprob.exp: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97343 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r--gcc/testsuite/lib/profopt.exp28
1 files changed, 16 insertions, 12 deletions
diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp
index 8b74967c57d..b24dfff74f0 100644
--- a/gcc/testsuite/lib/profopt.exp
+++ b/gcc/testsuite/lib/profopt.exp
@@ -38,7 +38,7 @@ if ![info exists tool] {
error "Tools is not specified."
}
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.
@@ -66,14 +66,16 @@ set prof_option_list $PROFOPT_OPTIONS
# profopt-cleanup -- remove profiling or performance results files.
#
# 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 base [file rootname $basename]
- set files [glob -nocomplain $base.$ext]
- if { $files != "" } {
- eval "remote_file build delete $files"
+ foreach ext $extlist {
+ set files [glob -nocomplain $base.$ext]
+ if { $files != "" } {
+ eval "remote_file build delete $files"
+ }
}
}
@@ -181,12 +183,14 @@ proc profopt-execute { src } {
if { $status == "pass" } {
set basename [file tail $testcase]
set base [file rootname $basename]
- set files [glob -nocomplain $base.$prof_ext]
- if { $files == "" } {
- set status "fail"
- fail "$testcase execution: file $base.$prof_ext does not exist, $option $profile_option"
- } else {
- $status "$testcase execution, $optstr"
+ foreach ext $prof_ext {
+ set files [glob -nocomplain $base.$ext]
+ if { $files == "" } {
+ set status "fail"
+ fail "$testcase execution: file $base.$ext does not exist, $option $profile_option"
+ } else {
+ $status "$testcase execution, $optstr"
+ }
}
} else {
$status "$testcase execution, $optstr"