[Swift-commit] r3612 - SwiftApps/SwiftR/Swift/tests

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Sep 7 20:04:16 CDT 2010


Author: wilde
Date: 2010-09-07 20:04:16 -0500 (Tue, 07 Sep 2010)
New Revision: 3612

Modified:
   SwiftApps/SwiftR/Swift/tests/TestSwift.R
Log:
Added tests for passive coaster worker option.

Modified: SwiftApps/SwiftR/Swift/tests/TestSwift.R
===================================================================
--- SwiftApps/SwiftR/Swift/tests/TestSwift.R	2010-09-08 01:03:05 UTC (rev 3611)
+++ SwiftApps/SwiftR/Swift/tests/TestSwift.R	2010-09-08 01:04:16 UTC (rev 3612)
@@ -305,8 +305,38 @@
   cat("\n==> test 4.1 FAILED !!!!!\n")
 }
 
+#### Test Group 5: test passive mode (make this start of multiple config tests?)
 
+cat("\n*** Starting  test 5.1 ***\n\n")
 
+options(swift.site="passive")
+
+sumstuff <- function(treedata,cardata) { sum( treedata$Height, cardata$dist ) }
+data(cars)
+data(trees)
+
+args=list(trees,cars)
+arglist = rep(list(args),1)
+
+cat("Test of local do.call(sumstuff)\n")
+localres = do.call(sumstuff,args)
+cat("local result=\n")
+print(localres)
+
+cat("\nTest of swiftapply(sumstuff,arglist)\n")
+swiftres = swiftapply(sumstuff,arglist)
+cat("Swift result:\n")
+print(swiftres)
+
+if(identical(localres,swiftres[[1]])) {
+  cat("\n==> test 1.1 passed\n")
+} else {
+  cat("\n==> test 1.1 FAILED !!!!!\n")
+}
+
+
+
+
 if(FALSE) { # Test various batch sizes
 
     cat("\nTest of swiftapply(sumcrits,arglist,callsperbatch=10)\n")




More information about the Swift-commit mailing list