From: Sage Weil Date: Fri, 20 Apr 2012 18:32:30 +0000 (-0700) Subject: hammer.sh: -a to archive each run X-Git-Tag: 1.1.0~2568 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c9d2185624858bc8d41b700725539b0dc45a4b5c;p=teuthology.git hammer.sh: -a to archive each run Signed-off-by: Sage Weil --- diff --git a/hammer.sh b/hammer.sh index b78a7ca9e..30af3f375 100755 --- a/hammer.sh +++ b/hammer.sh @@ -1,6 +1,14 @@ #!/bin/sh -ex -job=$1 +if [ $1 = "-a" ]; then + shift + job=$1 + log="--archive $job.out" +else + job=$1 + log="" +fi + test -e $1 teuthology-nuke -t $job @@ -11,11 +19,13 @@ title() { N=0 title -while teuthology $job $2 $3 $4 +[ -n "$log" ] && [ -d $job.out ] && rm -rf $job.out +while teuthology $log $job $2 $3 $4 do date N=$(($N+1)) echo "$job: $N passes" + [ -n "$log" ] && rm -rf $job.out title done echo "$job: $N passes, then failure."