]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
schedule_suite.sh: add flavors, check/fix sha1s, optional templates
authorSage Weil <sage@newdream.net>
Thu, 14 Jun 2012 20:23:24 +0000 (13:23 -0700)
committerSage Weil <sage@newdream.net>
Thu, 14 Jun 2012 21:04:21 +0000 (14:04 -0700)
This should be everything we need to use this for the nightlies, with the
exception of updating the git trees, which can happen explicitly in the
crontab.

schedule_suite.sh

index aa2143fcc09ca7fbc34705313785956f3618e53e..2331cb2bbf9f4b11aa9ca961a55ae78be8f0a59d 100755 (executable)
@@ -1,34 +1,61 @@
-#!/bin/sh
+#!/bin/sh -ex
 
 suite=$1
 ceph=$2
 kernel=$3
 email=$4
+flavor=$5
+template=$6
 
 if [ -z "$email" ]; then
-    echo "usage: $0 <suite> <ceph branch> <kernel branch> <email>"
+    echo "usage: $0 <suite> <ceph branch> <kernel branch> <email> [flavor] [template]"
+    echo "  flavor can be 'basic', 'gcov', 'notcmalloc'."
     exit 1
 fi
 
-stamp=`date +%Y-%m-%d_%H:%M:%S`
+[ -z "$flavor" ] && flavor='basic'
 
-fn="/tmp/schedule.suite.$$"
 
+##
+test ! -d ~/src/ceph-qa-suite && echo "error: expects to find ~/src/ceph-qa-suite" && exit 1
+test ! -d ~/src/teuthology/virtualenv/bin && echo "error: expects to find ~/src/teuthology/virtualenv/bin" && exit 1
+
+## get sha1
+KERNEL_SHA1=`wget http://gitbuilder.ceph.com/kernel-deb-precise-x86_64-basic/ref/$kernel/sha1 -O- 2>/dev/null`
+CEPH_SHA1=`wget http://gitbuilder.ceph.com/ceph-tarball-precise-x86_64-$flavor/ref/$ceph/sha1 -O- 2>/dev/null`
+
+## always include this
+fn="/tmp/schedule.suite.$$"
+trap "rm $fn" EXIT
 cat <<EOF > $fn
 kernel:
   branch: $kernel
 nuke-on-error: true
+tasks:
+- chef:
 overrides:
   ceph:
-    btrfs: 1
-    log-whitelist:
-    - clocks not synchronized
-    - slow request
     branch: $ceph
-tasks:
-- chef:
 EOF
 
-bin/teuthology-suite -v $fn --collections /home/sage/src/ceph-qa-suite/suites/$suite/* --email $email --timeout 21600 --name $ceph-$stamp 
+if [ "$flavor" = "gcov" ]; then
+    cat <<EOF >> $fn
+    coverage: yes
+EOF
+fi
+
+## template, too?
+if [ -n "$template" ]; then
+    sed s/CEPH_SHA1/$CEPH_SHA1/ $template | sed s/KERNEL_SHA1/$KERNEL_SHA1/ >> $fn
+fi
+
+##
+stamp=`date +%Y-%m-%d_%H:%M:%S`
+name=`whoami`"-$stamp-$ceph-$kernel-$flavor"
+
+~/src/teuthology/virtualenv/bin/teuthology-suite -v $fn \
+    --collections ~/src/ceph-qa-suite/suites/$suite/* \
+    --email $email \
+    --timeout 21600 \
+    --name $name
 
-rm $fn