diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-21 20:21:00 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-21 20:21:00 +0000 |
commit | 878b2d705a2184a6d17fd7a704444dff1d9fe5e9 (patch) | |
tree | 6c6280fdb21a113e85f3e09360656e24f1c0531c /gcc/testsuite/lib/profopt.exp | |
parent | abd8f04d9f8d7f2f6f1fe990ca51aa46cfee9bc0 (diff) | |
download | gcc-878b2d705a2184a6d17fd7a704444dff1d9fe5e9.tar.gz |
* lib/profopt.exp (profopt-cleanup): New argument TESTCASE.
Remove only files with the same base name as the test case.
(profopt-perf-value): Pass TESTCASE to profopt-cleanup.
(profopt-execute): Likewise. Also, remove old profiling
and performance data files before running the tests.
* gcc.misc-tests/bprob.exp: Remove profopt-cleanup calls.
* g++.dg/bprob/bprob.exp: Likewise.
* g77.dg/bprob/bprob.exp: Likewise. Also, relax regexp
to allow more general test case names.
* g++.dg/bprob/bprob-1.C: Rename to ...
* g++.dg/bprob/g++-bprob-1.C: ... this.
* g77.dg/bprob/bprob-1.f: Rename to ...
* g77.dg/bprob/g77-bprob-1.f: ... this.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58380 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib/profopt.exp')
-rw-r--r-- | gcc/testsuite/lib/profopt.exp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp index 57d79e956b3..5ecf314977f 100644 --- a/gcc/testsuite/lib/profopt.exp +++ b/gcc/testsuite/lib/profopt.exp @@ -71,10 +71,13 @@ set option_list $PROFOPT_OPTIONS # # profopt-cleanup -- remove profiling or performance results files. # -# EXT is the extension of files to remove +# TESTCASE is the name of the test +# EXT is the extension of file to remove # -proc profopt-cleanup { ext } { - set files [glob -nocomplain *.$ext] +proc profopt-cleanup { testcase ext } { + set basename [file tail $testcase] + set base [file rootname $basename] + set files [glob -nocomplain $base.$ext] if { $files != "" } { eval "remote_file build delete $files" } @@ -112,7 +115,7 @@ proc profopt-perf-value { testcase perf_ext optstr } { fail "$testcase perf check: file $base.$perf_ext has wrong format, $optstr" } close $fd - profopt-cleanup $perf_ext + profopt-cleanup $testcase $perf_ext return $val } @@ -150,6 +153,12 @@ proc profopt-execute { src } { remote_file build delete $execname3 verbose "Testing $testcase, $option" 1 + # Remove old profiling and performance data files. + profopt-cleanup $testcase $prof_ext + if [info exists perf_ext] { + profopt-cleanup $testcase $perf_ext + } + # Compile for profiling. set options "" @@ -210,7 +219,7 @@ proc profopt-execute { src } { } # Remove the profiling data files. - profopt-cleanup $prof_ext + profopt-cleanup $testcase $prof_ext # If the test is not expected to produce performance data then # we're done now. |