[Swift-commit] r5164 - in branches/release-0.93: bin tests tests/groups tests/stress tests/stress/persistent-coasters

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Sat Sep 24 13:10:59 CDT 2011


Author: davidk
Date: 2011-09-24 13:10:59 -0500 (Sat, 24 Sep 2011)
New Revision: 5164

Added:
   branches/release-0.93/tests/groups/group-local-coasters.sh
   branches/release-0.93/tests/groups/group-local.sh
   branches/release-0.93/tests/groups/group-stress.sh
   branches/release-0.93/tests/stress/
   branches/release-0.93/tests/stress/persistent-coasters/
   branches/release-0.93/tests/stress/persistent-coasters/catsn.0001.out.expected
   branches/release-0.93/tests/stress/persistent-coasters/catsn.repeat
   branches/release-0.93/tests/stress/persistent-coasters/catsn.setup.sh
   branches/release-0.93/tests/stress/persistent-coasters/catsn.swift
   branches/release-0.93/tests/stress/persistent-coasters/catsn.timeout
   branches/release-0.93/tests/stress/persistent-coasters/coaster-service.conf
   branches/release-0.93/tests/stress/persistent-coasters/data.txt
Removed:
   branches/release-0.93/tests/groups/local-coasters.sh
Modified:
   branches/release-0.93/bin/start-coaster-service
   branches/release-0.93/bin/stop-coaster-service
   branches/release-0.93/tests/suite.sh
Log:
Add ability to repeat tests in suite.sh with scriptname.repeat file
Add stress test group to suite
Persistent coasters stress test
Fixes to start and stop-coaster-service


Modified: branches/release-0.93/bin/start-coaster-service
===================================================================
--- branches/release-0.93/bin/start-coaster-service	2011-09-24 13:51:56 UTC (rev 5163)
+++ branches/release-0.93/bin/start-coaster-service	2011-09-24 18:10:59 UTC (rev 5164)
@@ -119,18 +119,18 @@
 RUN_DIR=`pwd`
 
 # Import settings
-if [ -f "$HOME/.swift/coaster-service.conf" ]; then
+if [ -f "$RUN_DIR/coaster-service.conf" ]; then
+   CONFIG_FILE="$RUN_DIR/coaster-service.conf"
+elif [ -f "$HOME/.swift/coaster-service.conf" ]; then
    CONFIG_FILE="$HOME/.swift/coaster-service.conf"
 elif [ -f "$(dirname $(readlink -f $0))/../etc/coaster-service.conf" ]; then
    CONFIG_FILE="$(dirname $(readlink -f $0))/../etc/coaster-service.conf"
-fi
-
-if [ -n "$CONFIG_FILE" ]; then
-   source "$CONFIG_FILE"
 else
    crash "Cannot find coaster-service.conf!"
 fi
 
+source $CONFIG_FILE
+
 # Determine information needed about this machine
 if [ -z "$IPADDR" ]; then
    if [ -x "/sbin/ifconfig" ]; then

Modified: branches/release-0.93/bin/stop-coaster-service
===================================================================
--- branches/release-0.93/bin/stop-coaster-service	2011-09-24 13:51:56 UTC (rev 5163)
+++ branches/release-0.93/bin/stop-coaster-service	2011-09-24 18:10:59 UTC (rev 5164)
@@ -12,24 +12,19 @@
 PID_FILE="$HOME/.swift/.coaster-service-pids"
 SWIFTVM_INSTANCES="$HOME/.swift/.swiftvm_instances"
 
-if [ -f "$HOME/.swift/coaster-service.conf" ]; then
+# Import settings
+if [ -f "./coaster-service.conf" ]; then
+   CONFIG_FILE="./coaster-service.conf"
+elif [ -f "$HOME/.swift/coaster-service.conf" ]; then
    CONFIG_FILE="$HOME/.swift/coaster-service.conf"
 elif [ -f "$(dirname $(readlink -f $0))/../etc/coaster-service.conf" ]; then
    CONFIG_FILE="$(dirname $(readlink -f $0))/../etc/coaster-service.conf"
-fi
-
-if [ -z "$CONFIG_FILE" ]; then
-   crash "Unable to find coaster-service.conf!"
-fi
-
-
-# Read config file to determine worker mode
-if [ -f "$CONFIG_FILE" ]; then
-   source "$CONFIG_FILE"
 else
    crash "Cannot find coaster-service.conf!"
 fi
 
+source "$CONFIG_FILE"
+
 echo Ending coaster processes..
 if [ -f "$PID_FILE" ]; then
    for pid in `cat $PID_FILE`

Copied: branches/release-0.93/tests/groups/group-local-coasters.sh (from rev 5145, branches/release-0.93/tests/groups/local-coasters.sh)
===================================================================
--- branches/release-0.93/tests/groups/group-local-coasters.sh	                        (rev 0)
+++ branches/release-0.93/tests/groups/group-local-coasters.sh	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1,4 @@
+
+# GROUPLIST definition to run local coasters tests
+
+GROUPLIST=( $TESTDIR/providers/local-coasters )

Added: branches/release-0.93/tests/groups/group-local.sh
===================================================================
--- branches/release-0.93/tests/groups/group-local.sh	                        (rev 0)
+++ branches/release-0.93/tests/groups/group-local.sh	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1,4 @@
+
+# GROUPLIST definition to run local coasters tests
+
+GROUPLIST=( $TESTDIR/providers/local )

Added: branches/release-0.93/tests/groups/group-stress.sh
===================================================================
--- branches/release-0.93/tests/groups/group-stress.sh	                        (rev 0)
+++ branches/release-0.93/tests/groups/group-stress.sh	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1,8 @@
+
+# GROUPLIST definition to run all local tests
+
+GROUPLIST=( 
+	    $TESTDIR/stress/persistent-coasters \
+          )
+
+checkvars WORK

Deleted: branches/release-0.93/tests/groups/local-coasters.sh
===================================================================
--- branches/release-0.93/tests/groups/local-coasters.sh	2011-09-24 13:51:56 UTC (rev 5163)
+++ branches/release-0.93/tests/groups/local-coasters.sh	2011-09-24 18:10:59 UTC (rev 5164)
@@ -1,4 +0,0 @@
-
-# GROUPLIST definition to run local coasters tests
-
-GROUPLIST=( $TESTDIR/providers/local-coasters )

Added: branches/release-0.93/tests/stress/persistent-coasters/catsn.0001.out.expected
===================================================================
--- branches/release-0.93/tests/stress/persistent-coasters/catsn.0001.out.expected	                        (rev 0)
+++ branches/release-0.93/tests/stress/persistent-coasters/catsn.0001.out.expected	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1 @@
+Hello world

Added: branches/release-0.93/tests/stress/persistent-coasters/catsn.repeat
===================================================================
--- branches/release-0.93/tests/stress/persistent-coasters/catsn.repeat	                        (rev 0)
+++ branches/release-0.93/tests/stress/persistent-coasters/catsn.repeat	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1 @@
+1000

Added: branches/release-0.93/tests/stress/persistent-coasters/catsn.setup.sh
===================================================================
--- branches/release-0.93/tests/stress/persistent-coasters/catsn.setup.sh	                        (rev 0)
+++ branches/release-0.93/tests/stress/persistent-coasters/catsn.setup.sh	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+cp $GROUP/coaster-service.conf .
+cp $GROUP/data.txt .


Property changes on: branches/release-0.93/tests/stress/persistent-coasters/catsn.setup.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/release-0.93/tests/stress/persistent-coasters/catsn.swift
===================================================================
--- branches/release-0.93/tests/stress/persistent-coasters/catsn.swift	                        (rev 0)
+++ branches/release-0.93/tests/stress/persistent-coasters/catsn.swift	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1,12 @@
+type file;
+
+app (file o) cat (file i)
+{
+  cat @i stdout=@o;
+}
+
+file out[]<simple_mapper; location=".", prefix="catsn.",suffix=".out">;
+foreach j in [1:@toint(@arg("n","1"))] {
+  file data<"data.txt">;
+  out[j] = cat(data);
+}

Added: branches/release-0.93/tests/stress/persistent-coasters/catsn.timeout
===================================================================
--- branches/release-0.93/tests/stress/persistent-coasters/catsn.timeout	                        (rev 0)
+++ branches/release-0.93/tests/stress/persistent-coasters/catsn.timeout	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1 @@
+999999

Added: branches/release-0.93/tests/stress/persistent-coasters/coaster-service.conf
===================================================================
--- branches/release-0.93/tests/stress/persistent-coasters/coaster-service.conf	                        (rev 0)
+++ branches/release-0.93/tests/stress/persistent-coasters/coaster-service.conf	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1,42 @@
+# Keep all interesting settings in one place
+# User should modify this to fit environment
+
+# Location of SWIFT. If empty, PATH is searched
+export SWIFT=
+
+# Where to copy worker.pl on the remote machine for sites.xml
+export WORKER_WORK=$HOME/swiftwork
+
+# How to launch workers: local, ssh, cobalt, or futuregrid
+export WORKER_MODE=ssh
+
+# SSH hosts to start workers on (ssh mode only)
+export WORKER_HOSTS="localhost"
+
+# Do all the worker nodes you're using have a shared filesystem? (yes/no)
+export SHARED_FILESYSTEM=yes
+
+# Username to use on worker nodes
+export WORKER_USERNAME=$USER
+
+# Enable SSH tunneling? (yes/no)
+export SSH_TUNNELING=no
+
+# Directory to keep log files, relative to working directory when launching start-coaster-service
+export LOG_DIR=logs
+
+# Manually define ports. If not specified, an available port will be used
+export LOCAL_PORT=
+export SERVICE_PORT=
+
+# start-coaster-service tries to automatically detect the IP address of this system. Specify here if you have multiple network interfaces
+export IPADDR=
+
+# Location of the swift-vm-boot scripts
+export SWIFTVMBOOT_DIR=$HOME/swift-vm-boot
+
+# Swift information for creating sites.xml
+export WORK=$HOME/swiftwork
+export QUEUE=prod-devel
+export MAXTIME=20
+export NODE=64

Added: branches/release-0.93/tests/stress/persistent-coasters/data.txt
===================================================================
--- branches/release-0.93/tests/stress/persistent-coasters/data.txt	                        (rev 0)
+++ branches/release-0.93/tests/stress/persistent-coasters/data.txt	2011-09-24 18:10:59 UTC (rev 5164)
@@ -0,0 +1 @@
+Hello world

Modified: branches/release-0.93/tests/suite.sh
===================================================================
--- branches/release-0.93/tests/suite.sh	2011-09-24 13:51:56 UTC (rev 5163)
+++ branches/release-0.93/tests/suite.sh	2011-09-24 18:10:59 UTC (rev 5164)
@@ -1085,13 +1085,20 @@
 
     cp $GROUP/$TESTNAME .
     TESTLINK=$TESTNAME
-    start_row
+
+    # Use repeat.txt to determine number of test iterations
+    SCRIPT_BASENAME=`basename $TESTNAME .swift`
+    if [ -f "$GROUP/$SCRIPT_BASENAME.repeat" ]; then
+      ITERS_LOCAL=`cat $GROUP/$SCRIPT_BASENAME.repeat`
+    fi
+
     for (( i=0; $i<$ITERS_LOCAL; i=$i+1 )); do
+      start_row
       swift_test_case $TESTNAME
       (( $TESTCOUNT >= $NUMBER_OF_TESTS )) && return
       (( $SHUTDOWN )) && return
+      end_row
     done
-     end_row
   done
     group_statistics
     TOTAL_TIME=0




More information about the Swift-commit mailing list