1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

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>
This commit is contained in:
Michael Adam 2013-11-13 14:53:45 +01:00
parent c4214a7942
commit 06be5962ab

View File

@ -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"