[Swift-commit] r7552 - in SwiftApps/swift-galaxy/swift: . test_exec

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Mon Feb 3 15:11:16 CST 2014


Author: ketan
Date: 2014-02-03 15:11:16 -0600 (Mon, 03 Feb 2014)
New Revision: 7552

Added:
   SwiftApps/swift-galaxy/swift/test_exec/echo.py
Modified:
   SwiftApps/swift-galaxy/swift/swiftforeachrange.sh
   SwiftApps/swift-galaxy/swift/swiftforeachrange.xml
Log:
ability to run via choser interpreter: sh, java, python etc

Modified: SwiftApps/swift-galaxy/swift/swiftforeachrange.sh
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeachrange.sh	2014-02-03 19:53:51 UTC (rev 7551)
+++ SwiftApps/swift-galaxy/swift/swiftforeachrange.sh	2014-02-03 21:11:16 UTC (rev 7552)
@@ -8,6 +8,8 @@
 # numeric range
 site=$1
 shift
+interpreter=$1
+shift
 executable=$1
 shift
 rstart=$1
@@ -42,7 +44,7 @@
 type file;
 
 app (file _out, file _err) anapp(file _exec, int _i, string _args[]){
-    sh @_exec _i _args stdout=@_out stderr=@_err;
+    $interpreter @_exec _i _args stdout=@_out stderr=@_err;
 }
 $arrayexpr
 
@@ -72,18 +74,7 @@
 
 #build tc
 cat << EOF > /tmp/tc
-localhost sh /bin/sh
-localhost echo echo
-localhost cat cat
-uc3 sh /bin/sh
-uc3 echo  /bin/echo
-uc3 cat   /bin/cat
-stampede sh /bin/sh
-stampede echo echo
-stampede cat cat
-midway echo  echo
-midway sh /bin/sh
-midway cat   cat
+$site $interpreter $interpreter
 EOF
 
 $swift -sites.file /tmp/sites.xml -tc.file /tmp/tc -config /tmp/cf /tmp/script.swift 2>$logfile

Modified: SwiftApps/swift-galaxy/swift/swiftforeachrange.xml
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeachrange.xml	2014-02-03 19:53:51 UTC (rev 7551)
+++ SwiftApps/swift-galaxy/swift/swiftforeachrange.xml	2014-02-03 21:11:16 UTC (rev 7552)
@@ -4,6 +4,7 @@
     <command interpreter="bash">
         swiftforeachrange.sh
         $site 
+        $interpreter
         $executable
         $rstart
         $rend
@@ -24,6 +25,14 @@
             <option value="stampede">Stampede</option>
         </param>
 
+        <param name="interpreter" type="select" label="Execution interpreter">
+            <option value="sh">sh</option>
+            <option value="python">python</option>
+            <option value="java">java</option>
+            <option value="R">R</option>
+            <option value="matlab">matlab</option>
+        </param>
+
         <param format="sh,binexec" name="executable" type="data" label="Executable"/>
 
         <param name="rstart" size="2" type="integer"  value="0" label="start"/>

Added: SwiftApps/swift-galaxy/swift/test_exec/echo.py
===================================================================
--- SwiftApps/swift-galaxy/swift/test_exec/echo.py	                        (rev 0)
+++ SwiftApps/swift-galaxy/swift/test_exec/echo.py	2014-02-03 21:11:16 UTC (rev 7552)
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+import sys
+
+print sys.argv
+


Property changes on: SwiftApps/swift-galaxy/swift/test_exec/echo.py
___________________________________________________________________
Added: svn:executable
   + *




More information about the Swift-commit mailing list