<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/e07abc87b9c75e19de3611e1750304f5eb192e7b">https://github.com/macports/macports-base/commit/e07abc87b9c75e19de3611e1750304f5eb192e7b</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new e07abc8 Fix test.tcl parsing of test output
</span>e07abc8 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit e07abc87b9c75e19de3611e1750304f5eb192e7b
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Thu Dec 8 03:47:09 2016 +1100
<span style='display:block; white-space:pre;color:#404040;'> Fix test.tcl parsing of test output
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This could not handle tests with more than one constraint at all.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/52217
</span>---
src/tests/test.tcl | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/tests/test.tcl b/src/tests/test.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index c4ac0ad..36c3d19 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/tests/test.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/tests/test.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -80,17 +80,14 @@ if {$test_name ne ""} {
</span>
foreach test $test_suite {
set result [exec -ignorestderr $tcl $test {*}$arguments]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set lastline [lindex [split $result "\n"] end]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lrange [split $lastline "\t"] 1 1] ne "Total"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lrange [split $lastline "\t"] 1 1] eq ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set lastline [lindex [split $result "\n"] 0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set errmsg [lindex [split $result "\n"] 2]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set lastline [lindex [split $result "\n"] end-2]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set errmsg [lindex [split $result "\n"] end]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set lines [split $result "\n"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set lastline [lindex $lines end]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set i 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ while {[lindex [split $lastline "\t"] 1] ne "Total"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ incr i
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set lastline [lindex $lines end-$i]
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set errmsgs [lrange $lines end-[expr {$i-2}] end]
</span>
set splitresult [split $lastline "\t"]
set total [lindex $splitresult 2]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -125,12 +122,14 @@ if {$test_name ne ""} {
</span> append out "Total:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " " $test
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Print results and constrints for auto-skipped tests.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Print results and constraints for auto-skipped tests.
</span> puts $out
if {$skip != 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set out " Constraint: "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- append out [string trim $errmsg "\t {}"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts $out
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach errmsg $errmsgs {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set out " Constraint: "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append out [string trim $errmsg "\t {}"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts $out
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
if {$fail != 0} {
set end [expr {[string first $test $result 0] - 1}]
</pre><pre style='margin:0'>
</pre>