Whamcloud - gitweb
Don't upload to maloo by default
[fs/lustre-release.git] / lustre / tests / rundbench
index 57651f5..ab9f236 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 . $LUSTRE/tests/test-framework.sh
@@ -29,7 +29,7 @@ CLIENT_PREFIX="${DBENCH_LIB} /usr/share/dbench /usr/local/share /usr/lib/dbench"
 CLIENT_FILE="client.txt client_plain.txt dbench_client"
 if ! which dbench > /dev/null 2>&1 ; then
     [ "$MISSING_DBENCH_OK" ] || { error "$0 : $(hostname) dbench is not installed !" && exit 3; }
-    skip "$0 : $(hostname) dbench is not installed"
+    skip_env "$0 : $(hostname) dbench is not installed"
     exit 0
 fi
 CLIENT=""
@@ -49,7 +49,7 @@ if [ -n "$SRC" -a -s "$SRC" ]; then
 fi
 
 [ ! -s "$CLIENT" ] && \
-    skip "$0 : $(hostname) no client file found for dbench DBENCH_LIB=$DBENCH_LIB SRC=$SRC" && \
+    skip_env "$0 : $(hostname) no client file found for dbench DBENCH_LIB=$DBENCH_LIB SRC=$SRC" && \
         exit 0 
 
 [ ! -s "$TGT" ] && echo "copying $CLIENT to $TGT" && cp $CLIENT $TGT
@@ -60,8 +60,12 @@ if [ "x$CHROOT" == "xyes" ]; then
        echo "copying necessary libs to $DIR"
        cp `which dbench` $DIR
        LIBS71=$(ldd $DIR/dbench|sed -e 's/\t*//' -e 's/.*=> //' -e 's/ .*//' -e 's/^\///')
-       (cd / && tar chf - $LIBS71) | (cd $DIR && tar xvf -)
-       [ $? != 0 ] && echo "can't copy libs $LIBS71 to $DIR" && exit 1
+       tar -C / -chf - $LIBS71 | tar -C $DIR -xvf -
+       if [ "${PIPESTATUS[*]}" != "0 0" ]; then
+               echo "can't copy libs $LIBS71 to $DIR"
+               rm -f $DIR/dbench
+               exit 1
+       fi
        RUN="chroot $DIR"
        PREFIX="in"
        PATH=.:/:$PATH