Whamcloud - gitweb
b=16264
authorgrev <grev>
Fri, 1 Aug 2008 16:02:46 +0000 (16:02 +0000)
committergrev <grev>
Fri, 1 Aug 2008 16:02:46 +0000 (16:02 +0000)
i=Adilger
new t-f init clients list fn

lustre/tests/test-framework.sh

index 3ee33cc..b1b5df1 100644 (file)
@@ -1561,6 +1561,29 @@ nodes_list () {
     echo $myNODES_sort
 }
 
+init_clients_lists () {
+    # Sanity check: exclude the local client from RCLIENTS
+    local rclients=$(echo " $RCLIENTS " | sed -re "s/\s+$HOSTNAME\s+/ /g")
+
+    # Sanity check: exclude the dup entries
+    rclients=$(for i in $rclients; do echo $i; done | sort -u)
+
+    local clients="$SINGLECLIENT $HOSTNAME $rclients"
+
+    # Sanity check: exclude the dup entries from CLIENTS
+    # for those configs which has SINGLCLIENT set to local client 
+    clients=$(for i in $clients; do echo $i; done | sort -u)
+
+    CLIENTS=`comma_list $clients`
+    local -a remoteclients=($rclients)
+    for ((i=0; $i<${#remoteclients[@]}; i++)); do
+            varname=CLIENT$((i + 2))
+            eval $varname=${remoteclients[i]}
+    done
+
+    CLIENTCOUNT=$((${#remoteclients[@]} + 1))
+}
+
 is_patchless ()
 {
     lctl get_param version | grep -q patchless