summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-20 11:03:48 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-20 14:56:51 +0200
commitab96359bfefa08eddfb688137ca07c1efcbb494f (patch)
tree8ab436ccfe073459a2b0114256babf9b270d4b64 /script
parentc30e6b5973b78c04b9131a2adf1eb5dda2222c2f (diff)
downloadsamba-ab96359bfefa08eddfb688137ca07c1efcbb494f.tar.gz
script/autobuild: delay start of small projects by 60 to 600 seconds
This should reduce the startup load. metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jun 20 14:56:51 CEST 2012 on sn-devel-104
Diffstat (limited to 'script')
-rwxr-xr-xscript/autobuild.py32
-rwxr-xr-xscript/random-sleep.sh21
2 files changed, 45 insertions, 8 deletions
diff --git a/script/autobuild.py b/script/autobuild.py
index c1edc92061b..8bdb281bbd2 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -55,7 +55,9 @@ tasks = {
("check-clean-tree", "script/clean-source-tree.sh", "text/plain"),
("clean", "make clean", "text/plain") ],
- "samba4-libs" : [ ("talloc-configure", "cd lib/talloc && PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=NONE --abi-check --enable-debug -C ${PREFIX}", "text/plain"),
+ "samba4-libs" : [
+ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
+ ("talloc-configure", "cd lib/talloc && PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=NONE --abi-check --enable-debug -C ${PREFIX}", "text/plain"),
("talloc-make", "cd lib/talloc && make", "text/plain"),
("talloc-install", "cd lib/talloc && make install", "text/plain"),
@@ -75,7 +77,9 @@ tasks = {
("make", "make", "text/plain"),
("install", "make install", "text/plain")],
- "ldb" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
+ "ldb" : [
+ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
+ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
("make", "make", "text/plain"),
("install", "make install", "text/plain"),
("test", "TDB_NO_FSYNC=1 make test", "text/plain"),
@@ -84,7 +88,9 @@ tasks = {
("clean", "make clean", "text/plain") ],
# We don't use TDB_NO_FSYNC=1 here, because we want to test the transaction code
- "tdb" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
+ "tdb" : [
+ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
+ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
("make", "make", "text/plain"),
("install", "make install", "text/plain"),
("test", "make test", "text/plain"),
@@ -92,7 +98,9 @@ tasks = {
("distcheck", "make distcheck", "text/plain"),
("clean", "make clean", "text/plain") ],
- "ntdb" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
+ "ntdb" : [
+ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
+ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
("make", "make", "text/plain"),
("install", "make install", "text/plain"),
("test", "make test", "text/plain"),
@@ -100,7 +108,9 @@ tasks = {
("distcheck", "make distcheck", "text/plain"),
("clean", "make clean", "text/plain") ],
- "talloc" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
+ "talloc" : [
+ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
+ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
("make", "make", "text/plain"),
("install", "make install", "text/plain"),
("test", "make test", "text/plain"),
@@ -108,7 +118,9 @@ tasks = {
("distcheck", "make distcheck", "text/plain"),
("clean", "make clean", "text/plain") ],
- "replace" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
+ "replace" : [
+ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
+ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
("make", "make", "text/plain"),
("install", "make install", "text/plain"),
("test", "make test", "text/plain"),
@@ -116,7 +128,9 @@ tasks = {
("distcheck", "make distcheck", "text/plain"),
("clean", "make clean", "text/plain") ],
- "tevent" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
+ "tevent" : [
+ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
+ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
("make", "make", "text/plain"),
("install", "make install", "text/plain"),
("test", "make test", "text/plain"),
@@ -124,7 +138,9 @@ tasks = {
("distcheck", "make distcheck", "text/plain"),
("clean", "make clean", "text/plain") ],
- "pidl" : [ ("configure", "perl Makefile.PL PREFIX=${PREFIX_DIR}", "text/plain"),
+ "pidl" : [
+ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
+ ("configure", "perl Makefile.PL PREFIX=${PREFIX_DIR}", "text/plain"),
("touch", "touch *.yp", "text/plain"),
("make", "make", "text/plain"),
("test", "make test", "text/plain"),
diff --git a/script/random-sleep.sh b/script/random-sleep.sh
new file mode 100755
index 00000000000..70b0c03ec9e
--- /dev/null
+++ b/script/random-sleep.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+
+if [ $# -lt 2 ]; then
+ echo "$0: <low> <high>"
+ exit 1;
+fi
+
+l=$1
+h=$2
+
+s=$(expr $h - $l)
+
+r=$(head --bytes=2 /dev/urandom | od -l | head -n 1 | sed -e 's/^[^ ]* *//')
+
+v=$(expr $r % $s)
+d=$(expr $l + $v)
+
+echo "$0: sleep $d ... start"
+#sleep $d
+echo "$0: sleep $d ... end"