diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /qa/loopall.sh | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/loopall.sh')
-rwxr-xr-x | qa/loopall.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/qa/loopall.sh b/qa/loopall.sh new file mode 100755 index 000000000..d69e8c720 --- /dev/null +++ b/qa/loopall.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -ex + +basedir=`echo $0 | sed 's/[^/]*$//g'`. +testdir="$1" +[ -n "$2" ] && logdir=$2 || logdir=$1 + +[ ${basedir:0:1} == "." ] && basedir=`pwd`/${basedir:1} + +PATH="$basedir/src:$PATH" + +[ -z "$testdir" ] || [ ! -d "$testdir" ] && echo "specify test dir" && exit 1 +cd $testdir + +while true +do + for test in `cd $basedir/workunits && find . -executable -type f | $basedir/../src/script/permute` + do + echo "------ running test $test ------" + pwd + [ -d $test ] && rm -r $test + 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 +done |