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
}