ceph/qa/runallonce.sh

24 lines
569 B
Bash
Raw Normal View History

#!/bin/bash -x
set -e
basedir=`echo $0 | sed 's/[^/]*$//g'`.
testdir="$1"
2009-12-08 00:48:35 +00:00
[ ${basedir:0:1} == "." ] && basedir=`pwd`/${basedir:1}
[ -z "$testdir" ] || [ ! -d "$testdir" ] && echo "specify test dir" && exit 1
cd $testdir
2010-02-11 18:36:45 +00:00
for test in `cd $basedir/workunits && ls | grep .sh`
do
echo "------ running test $test ------"
mkdir -p $test
2010-02-11 18:36:45 +00:00
test -d ${basedir}/logs || mkdir -p ${basedir}/logs
2009-12-22 22:50:38 +00:00
test -e ${basedir}/logs/${test}.log && rm ${basedir}/logs/${test}.log
pushd .
cd $test
2010-02-11 18:36:45 +00:00
${basedir}/workunits/${test} 2>&1 | tee ${basedir}/logs/${test}.log
popd
2009-12-08 00:48:35 +00:00
done