forked from ceph/teuthology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschedule_suite.sh
executable file
·67 lines (53 loc) · 1.44 KB
/
schedule_suite.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh -e
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> [flavor] [template]"
echo " flavor can be 'basic', 'gcov', 'notcmalloc'."
exit 1
fi
[ -z "$flavor" ] && flavor='basic'
##
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:
kdb: true
sha1: $KERNEL_SHA1
nuke-on-error: true
tasks:
- chef:
- clock:
overrides:
ceph:
sha1: $CEPH_SHA1
log-whitelist:
- slow request
EOF
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-$suite-$ceph-$kernel-$flavor"
~/src/teuthology/virtualenv/bin/teuthology-suite -v $fn \
--collections ~/src/ceph-qa-suite/suites/$suite/* \
--email $email \
--timeout 21600 \
--name $name