[107997] branches/gsoc13-tests/tests/test.tcl

marius at macports.org marius at macports.org
Wed Jul 10 09:53:15 PDT 2013


Revision: 107997
          https://trac.macports.org/changeset/107997
Author:   marius at macports.org
Date:     2013-07-10 09:53:15 -0700 (Wed, 10 Jul 2013)
Log Message:
-----------
test all: fixed exit code and print constraints

Modified Paths:
--------------
    branches/gsoc13-tests/tests/test.tcl

Modified: branches/gsoc13-tests/tests/test.tcl
===================================================================
--- branches/gsoc13-tests/tests/test.tcl	2013-07-10 16:50:18 UTC (rev 107996)
+++ branches/gsoc13-tests/tests/test.tcl	2013-07-10 16:53:15 UTC (rev 107997)
@@ -15,6 +15,7 @@
     statefile-version2-invalid
     statefile-version2-outdated
     svn-and-patchsites
+    trace
     universal
     variants
     xcodeversion
@@ -102,6 +103,7 @@
         set pass [lrange [split $result "\t"] 4 4]
         set skip [lrange [split $result "\t"] 6 6]
         set fail [lrange [split $result "\t\n"] 8 8]
+        set errmsg [lrange [split $result "\n"] 2 2]
 
         # Check for errors.
         if { $fail != 0 || $skip != 0 } {
@@ -115,15 +117,22 @@
         } else {
             append out "Total:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip "  " $test
         }
+
+        # Print results and constrints for auto-skipped tests.
         puts $out
+        if { $skip != 0 } {
+            set out "    Constraint: "
+            append out [string trim $errmsg "\t {}"]
+            puts $out
+        }
     
         cd ../..
     }
 }
 
-# Set return value
+# Return 1 if errors were found.
 if {$err != ""} {
-    return 1
-} else {
-    return 0
+    exit 1
 }
+
+return 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130710/77efe5c4/attachment.html>


More information about the macports-changes mailing list