diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2002-10-21 20:21:00 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2002-10-21 20:21:00 +0000 |
commit | aaee784acf0a3a5817e35b70ba930c625ce8057e (patch) | |
tree | 6c6280fdb21a113e85f3e09360656e24f1c0531c /gcc | |
parent | 5d4d885ca6321901051b3374817ff46249f273f1 (diff) | |
download | gcc-aaee784acf0a3a5817e35b70ba930c625ce8057e.zip gcc-aaee784acf0a3a5817e35b70ba930c625ce8057e.tar.gz gcc-aaee784acf0a3a5817e35b70ba930c625ce8057e.tar.bz2 |
profopt.exp (profopt-cleanup): New argument TESTCASE.
* 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.
From-SVN: r58380
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/bprob/bprob.exp | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/bprob/g++-bprob-1.C (renamed from gcc/testsuite/g++.dg/bprob/bprob-1.C) | 0 | ||||
-rw-r--r-- | gcc/testsuite/g77.dg/bprob/bprob.exp | 6 | ||||
-rw-r--r-- | gcc/testsuite/g77.dg/bprob/g77-bprob-1.f (renamed from gcc/testsuite/g77.dg/bprob/bprob-1.f) | 0 | ||||
-rw-r--r-- | gcc/testsuite/gcc.misc-tests/bprob.exp | 4 | ||||
-rw-r--r-- | gcc/testsuite/lib/profopt.exp | 19 |
7 files changed, 34 insertions, 17 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4d6ffd5..fba7676 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,22 @@ +2002-10-21 Ulrich Weigand <uweigand@de.ibm.com> + + * 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. + 2002-10-21 Zack Weinberg <zack@codesourcery.com> * gcc.dg/noncompile/920923-1.c: Prevent spurious regressions with diff --git a/gcc/testsuite/g++.dg/bprob/bprob.exp b/gcc/testsuite/g++.dg/bprob/bprob.exp index 7249540..d19e341 100644 --- a/gcc/testsuite/g++.dg/bprob/bprob.exp +++ b/gcc/testsuite/g++.dg/bprob/bprob.exp @@ -51,9 +51,6 @@ if $tracelevel then { # Load support procs. load_lib profopt.exp -# Clean up existing .da files. -profopt-cleanup da - # Main loop. foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.C]] { # If we're only testing specific files and this isn't one of them, skip it. diff --git a/gcc/testsuite/g++.dg/bprob/bprob-1.C b/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C index b1a1de7..b1a1de7 100644 --- a/gcc/testsuite/g++.dg/bprob/bprob-1.C +++ b/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C diff --git a/gcc/testsuite/g77.dg/bprob/bprob.exp b/gcc/testsuite/g77.dg/bprob/bprob.exp index 7e5629d..8ca9e9e 100644 --- a/gcc/testsuite/g77.dg/bprob/bprob.exp +++ b/gcc/testsuite/g77.dg/bprob/bprob.exp @@ -48,11 +48,7 @@ if $tracelevel then { # Load support procs. load_lib profopt.exp -# Clean up existing .da and .tim files. -profopt-cleanup da -profopt-cleanup tim - -foreach src [lsort [glob -nocomplain $srcdir/$subdir/bprob-*.f]] { +foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.f]] { # If we're only testing specific files and this isn't one of them, skip it. if ![runtest_file_p $runtests $src] then { continue diff --git a/gcc/testsuite/g77.dg/bprob/bprob-1.f b/gcc/testsuite/g77.dg/bprob/g77-bprob-1.f index 73f0440..73f0440 100644 --- a/gcc/testsuite/g77.dg/bprob/bprob-1.f +++ b/gcc/testsuite/g77.dg/bprob/g77-bprob-1.f diff --git a/gcc/testsuite/gcc.misc-tests/bprob.exp b/gcc/testsuite/gcc.misc-tests/bprob.exp index d6c5d17..5f37068 100644 --- a/gcc/testsuite/gcc.misc-tests/bprob.exp +++ b/gcc/testsuite/gcc.misc-tests/bprob.exp @@ -48,10 +48,6 @@ if $tracelevel then { # Load support procs. load_lib profopt.exp -# Clean up existing .da and .tim files. -profopt-cleanup da -profopt-cleanup tim - foreach src [lsort [glob -nocomplain $srcdir/$subdir/bprob-*.c]] { # If we're only testing specific files and this isn't one of them, skip it. if ![runtest_file_p $runtests $src] then { diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp index 57d79e9..5ecf3149 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. |