[Swift-commit] r6604 - in branches/faster: . libexec

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Mon Jul 8 00:31:00 CDT 2013


Author: hategan
Date: 2013-07-08 00:30:38 -0500 (Mon, 08 Jul 2013)
New Revision: 6604

Modified:
   branches/faster/
   branches/faster/libexec/_swiftwrap
Log:
merged 6172 from trunk


Property changes on: branches/faster
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/release-0.93:4761-5122
   + /branches/release-0.93:4761-5122
/trunk:6172

Modified: branches/faster/libexec/_swiftwrap
===================================================================
--- branches/faster/libexec/_swiftwrap	2013-07-03 21:44:35 UTC (rev 6603)
+++ branches/faster/libexec/_swiftwrap	2013-07-08 05:30:38 UTC (rev 6604)
@@ -475,19 +475,27 @@
 
     TIMEARGS=(-o swiftapp.resources -f APP_RESOURCES=real_secs:%e,kernel_secs:%S,user_secs:%U,percent_cpu:%P,max_rss:%M,avg_rss:%t,avg_tot_vm:%K,avg_priv_data:%D,avg_priv_stack:%p,avg_shared_text:%X,page_size:%Z,major_pgfaults:%F,minor_pgfaults:%R,swaps:%W,invol_context_switches:%c,vol_waits:%w,fs_reads:%I,fs_writes:%O,sock_recv:%r,sock_send:%s,signals:%k,exit_status:%x)
 
-    if [ -x /usr/bin/time ]; then
+    if [[ "$OSTYPE" == *darwin* ]]; then
+        TIMECMD=
+        TIMEARGS=
+    elif [ -x /usr/bin/time ]; then
         TIMECMD="/usr/bin/time"
     elif [ -x $HOME/swift.time ]; then
         TIMECMD="$HOME/swift.time"
     else
         TIMECMD=""
-		TIMEARGS=""
+	TIMEARGS=""
     fi
 	if [ "$STDIN" == "" ]; then
 		if [ "$SWIFT_GEN_SCRIPTS" != "" ]; then
 			genScripts
 		fi
-        "$TIMECMD" "${TIMEARGS[@]}" "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR"
+                
+                if [ -n "$TIMECMD" ] && [ -n "$TIMEARGS" ]; then
+                   "$TIMECMD" "${TIMEARGS[@]}" "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR"
+                else
+                   "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR"
+                fi
 	else
 		if [ "$SWIFT_GEN_SCRIPTS" != "" ]; then
 			genScripts




More information about the Swift-commit mailing list