summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-11-13 14:53:45 +0100
committerMichael Adam <obnox@samba.org>2013-11-13 14:53:45 +0100
commit06be5962aba761ec0ac02fb2b8e108ec1918bfed (patch)
treeda828bd091a3665c707fda85caf08ffa16d37768 /script
parentc4214a7942c2c544d2692375780c794272694027 (diff)
downloadsamba-06be5962aba761ec0ac02fb2b8e108ec1918bfed.tar.gz
random-sleep: add possiblity to override via environment variable
set AUTOBUILD_RANDOM_SLEEP_OVERRIDE=<x> to the number x of seconds that you want to sleep. This is added to make it possible to run one autobuild target without having to wait for several minutes. Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/random-sleep.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/random-sleep.sh b/script/random-sleep.sh
index 9bb866b3e09..6d79ffbf299 100755
--- a/script/random-sleep.sh
+++ b/script/random-sleep.sh
@@ -16,6 +16,10 @@ r=$(head --bytes=2 /dev/urandom | od -l | head -n 1 | sed -e 's/^[^ ]* *//')
v=$(expr $r % $s)
d=$(expr $l + $v)
+if test "x${AUTOBUILD_RANDOM_SLEEP_OVERRIDE}" != "x" ; then
+ d="${AUTOBUILD_RANDOM_SLEEP_OVERRIDE}"
+fi
+
echo "$0: sleep $d ... start"
sleep $d
echo "$0: sleep $d ... end"