mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
4a68eb4d14
Don't just put logs with the qa source. Among other things that means we can't run runallonce.sh twice.
23 lines
556 B
Bash
Executable File
23 lines
556 B
Bash
Executable File
#!/bin/bash -x
|
|
|
|
set -e
|
|
|
|
basedir=`echo $0 | sed 's/[^/]*$//g'`.
|
|
testdir="$1"
|
|
[ -n "$2" ] && logdir=$2 || logdir=$1
|
|
|
|
[ ${basedir:0:1} == "." ] && basedir=`pwd`/${basedir:1}
|
|
|
|
[ -z "$testdir" ] || [ ! -d "$testdir" ] && echo "specify test dir" && exit 1
|
|
cd $testdir
|
|
|
|
for test in `cd $basedir/workunits && ls | grep .sh`
|
|
do
|
|
echo "------ running test $test ------"
|
|
pwd
|
|
mkdir -p $test
|
|
mkdir -p `dirname $logdir/$test.log`
|
|
test -e $logdir/$test.log && rm $logdir/$test.log
|
|
sh -c "cd $test && $basedir/workunits/$test" 2>&1 | tee $logdir/$test.log
|
|
done
|