Re: [PATCH] gcc/testsuite: guality.exp: Fix `test_counts' restoration

2014-11-15 Thread Maciej W. Rozycki
On Fri, 14 Nov 2014, Jakub Jelinek wrote:

  gcc/testsuite/ 
  * g++.dg/guality/guality.exp (check_guality): Fix `test_counts' 
  restoration.
 
 Ok, thanks.

 Applied, thanks.

  Maciej


[PATCH] gcc/testsuite: guality.exp: Fix `test_counts' restoration

2014-11-14 Thread Maciej W. Rozycki
On Mon, 15 Sep 2014, Jakub Jelinek wrote:

 2014-09-14  Jakub Jelinek  ja...@redhat.com
 
 gcc/testsuite/
   * g++.dg/guality/guality.exp (check_guality): Save/restore
   test_counts array around the body of the procedure.
   * gcc.dg/guality/guality.exp (check_guality): Likewise.
[...]
 --- gcc/testsuite/g++.dg/guality/guality.exp.jj   2014-09-14 
 21:09:04.767498056 +0200
 +++ gcc/testsuite/g++.dg/guality/guality.exp  2014-09-14 21:25:17.768673222 
 +0200
 @@ -14,6 +14,11 @@ if { [istarget powerpc-ibm-aix*] } {
  }
  
  proc check_guality {args} {
 +# Don't count check_guality as PASS, or FAIL etc., that would make
 +# the total PASS count dependent on how many parallel runtest invocations
 +# ran guality.exp.  So save the counts first and restore them afterwards.
 +global test_counts
 +array set saved_test_counts [array get test_counts]
  set result [eval check_compile guality_check executable $args -g -O0]
  set lines [lindex $result 0]
  set output [lindex $result 1]
 @@ -23,6 +28,7 @@ proc check_guality {args} {
set ret [string match *1 PASS, 0 FAIL, 0 UNRESOLVED* $execout]
  }
  remote_file build delete $output
 +array get test_counts [array get saved_test_counts]
  return $ret
  }
  

 ^-- typo here I believe, compare the corresponding change below:

 --- gcc/testsuite/gcc.dg/guality/guality.exp.jj   2014-09-14 
 21:09:05.362495088 +0200
 +++ gcc/testsuite/gcc.dg/guality/guality.exp  2014-09-14 21:25:17.769673197 
 +0200
 @@ -14,6 +14,11 @@ if { [istarget powerpc-ibm-aix*] } {
  }
  
  proc check_guality {args} {
 +# Don't count check_guality as PASS, or FAIL etc., that would make
 +# the total PASS count dependent on how many parallel runtest invocations
 +# ran guality.exp.  So save the counts first and restore them afterwards.
 +global test_counts
 +array set saved_test_counts [array get test_counts]
  set result [eval check_compile guality_check executable $args -g -O0]
  set lines [lindex $result 0]
  set output [lindex $result 1]
 @@ -23,6 +28,7 @@ proc check_guality {args} {
set ret [string match *1 PASS, 0 FAIL, 0 UNRESOLVED* $execout]
  }
  remote_file build delete $output
 +array set test_counts [array get saved_test_counts]
  return $ret
  }
  

 OK to apply?

2014-11-14  Maciej W. Rozycki  ma...@codesourcery.com

gcc/testsuite/ 
* g++.dg/guality/guality.exp (check_guality): Fix `test_counts' 
restoration.

  Maciej

gcc-test-guality.patch
Index: gcc-fsf-trunk-quilt/gcc/testsuite/g++.dg/guality/guality.exp
===
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/g++.dg/guality/guality.exp   
2014-11-14 18:33:47.0 +
+++ gcc-fsf-trunk-quilt/gcc/testsuite/g++.dg/guality/guality.exp
2014-11-14 20:18:35.038856372 +
@@ -28,7 +28,7 @@ proc check_guality {args} {
   set ret [string match *1 PASS, 0 FAIL, 0 UNRESOLVED* $execout]
 }
 remote_file build delete $output
-array get test_counts [array get saved_test_counts]
+array set test_counts [array get saved_test_counts]
 return $ret
 }
 


Re: [PATCH] gcc/testsuite: guality.exp: Fix `test_counts' restoration

2014-11-14 Thread Jakub Jelinek
On Fri, Nov 14, 2014 at 09:01:25PM +, Maciej W. Rozycki wrote:
 2014-11-14  Maciej W. Rozycki  ma...@codesourcery.com
 
   gcc/testsuite/ 
   * g++.dg/guality/guality.exp (check_guality): Fix `test_counts' 
   restoration.

Ok, thanks.

 --- gcc-fsf-trunk-quilt.orig/gcc/testsuite/g++.dg/guality/guality.exp 
 2014-11-14 18:33:47.0 +
 +++ gcc-fsf-trunk-quilt/gcc/testsuite/g++.dg/guality/guality.exp  
 2014-11-14 20:18:35.038856372 +
 @@ -28,7 +28,7 @@ proc check_guality {args} {
set ret [string match *1 PASS, 0 FAIL, 0 UNRESOLVED* $execout]
  }
  remote_file build delete $output
 -array get test_counts [array get saved_test_counts]
 +array set test_counts [array get saved_test_counts]
  return $ret
  }
  

Jakub