]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
hammer.sh: -a to archive each run
authorSage Weil <sage@newdream.net>
Fri, 20 Apr 2012 18:32:30 +0000 (11:32 -0700)
committerSage Weil <sage@newdream.net>
Fri, 20 Apr 2012 18:32:30 +0000 (11:32 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
hammer.sh

index b78a7ca9ec183cce368359743db76fa189af42e6..30af3f375664ed2615ca0e9a6c9c1ca9e0b702ce 100755 (executable)
--- 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."