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