This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] profopt.exp and remote testing


Hi,

While testing a cross compiler I came across this bug.  Regtested on
i686-pc-linux-gnu.

OK for mainline and the 3.3 branch?

Adam

2003-03-23  Adam Nemet  <anemet at lnxw dot com> 
 
        * lib/profopt.exp (profopt-execute): Check for profiling data 
        files on the target. 

Index: profopt.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/profopt.exp,v
retrieving revision 1.4
diff -u -p -r1.4 profopt.exp
--- profopt.exp	31 Dec 2002 20:00:44 -0000	1.4
+++ profopt.exp	23 Mar 2003 08:23:12 -0000
@@ -140,6 +140,8 @@ proc profopt-execute { src } {
     }
 
     set executable $tmpdir/[file tail [file rootname $src].x]
+    set base [file rootname [file tail $testcase]]
+    set profname $base.$prof_ext
 
     set count 0
     foreach option $prof_option_list {
@@ -154,7 +156,7 @@ proc profopt-execute { src } {
 	verbose "Testing $testcase, $option" 1
 
 	# Remove old profiling and performance data files.
-	profopt-cleanup $testcase $prof_ext
+ 	remote_file target delete $tmpdir/$profname
 	if [info exists perf_ext] {
 	    profopt-cleanup $testcase $perf_ext
 	}
@@ -178,12 +180,11 @@ proc profopt-execute { src } {
 	set status [lindex $result 0]
 	# Make sure the profile data was generated, and fail if not.
 	if { $status == "pass" } {
-	    set basename [file tail $testcase]
-	    set base [file rootname $basename]
-	    set files [glob -nocomplain $base.$prof_ext]
+	    remote_upload target $tmpdir/$profname $profname
+	    set files [glob -nocomplain $profname]
 	    if { $files == "" } {
 		set status "fail"
-		fail "$testcase execution: file $base.$prof_ext does not exist, $option $profile_option"
+		fail "$testcase execution: file $profname does not exist, $option $profile_option"
 	    } else {
 	        $status "$testcase execution,   $optstr"
 	    }
@@ -219,7 +220,7 @@ proc profopt-execute { src } {
 	}
 
 	# Remove the profiling data files.
-	profopt-cleanup $testcase $prof_ext
+ 	remote_file target delete $tmpdir/$profname
 
 	# If the test is not expected to produce performance data then
 	# we're done now.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]