[Swift-commit] r4216 - trunk/bin

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Wed Mar 23 09:58:55 CDT 2011


Author: wozniak
Date: 2011-03-23 09:58:55 -0500 (Wed, 23 Mar 2011)
New Revision: 4216

Modified:
   trunk/bin/swift
Log:
New SWIFT_ASSERTS variable- only for developers


Modified: trunk/bin/swift
===================================================================
--- trunk/bin/swift	2011-03-23 14:58:09 UTC (rev 4215)
+++ trunk/bin/swift	2011-03-23 14:58:55 UTC (rev 4216)
@@ -1,6 +1,7 @@
 #! /bin/sh
 
 # Referenced environment variables (default values):
+# SWIFT_ASSERTS
 # SWIFT_HEAP_MAX (256M)
 # SWIFT_USAGE_STATS
 
@@ -29,7 +30,7 @@
 }
 
 updateOptions() {
- 
+
     if [ "X$1" != "X" ] ; then
        OPTIONS="$OPTIONS -D$2=$1"
     fi
@@ -64,8 +65,8 @@
 
 USERID=`id | awk '{printf("%s\n", substr($1, 5, index($1, "(")-5 ) ) }'`
 
-if [ "X$GLOBUS_HOSTNAME" = "X" ] && [ "X$HOSTNAME" != "X" ]; then 
-	GLOBUS_HOSTNAME=$HOSTNAME  
+if [ "X$GLOBUS_HOSTNAME" = "X" ] && [ "X$HOSTNAME" != "X" ]; then
+	GLOBUS_HOSTNAME=$HOSTNAME
 fi
 
 updateOptions "$USERID" "UID"
@@ -86,13 +87,17 @@
 #large delays if /dev/random does not have enough entropy collected
 updateOptions "file:///dev/urandom" "java.security.egd"
 
-if [ "X$SWIFT_HEAP_MAX" != "X" ]; then 
+if [ "X$SWIFT_HEAP_MAX" != "X" ]; then
 	HEAPMAX=$SWIFT_HEAP_MAX
 fi
 if [ "X$HEAPMAX" != "X" ]; then
 	OPTIONS="-Xmx$HEAPMAX $OPTIONS"
 fi
 
+if [ "X$SWIFT_ASSERTS" != "X" ]; then
+	OPTIONS="-ea $OPTIONS"
+fi
+
 # Anonymous usage statistics
 LISTENER="128.135.125.18"
 PORT="9999"
@@ -133,7 +138,7 @@
             SCRIPT=$var
             SCRIPTID=`$MD5SUM $SCRIPT|cut -d ' ' -f1`
             SCRIPTLENGTH=`wc -l $SCRIPT|cut -d ' ' -f1`
-        fi 
+        fi
     done
     HOSTNAME=`hostname`
     USERID=`echo $USERID $HOSTNAME $MAC | $MD5SUM |cut -d ' ' -f1`




More information about the Swift-commit mailing list