gnu: dmd: Sleep longer in tests, for slower machines.

* gnu/packages/patches/dmd-tests-longer-sleeps.patch: New file.
* gnu/packages/admin.scm (dmd): Add the patch.
* gnu-system.am (dist_patch_DATA): Add it.
This commit is contained in:
Mark H Weaver 2014-02-16 02:23:18 -05:00
parent 72f210eafa
commit 436c95d9a7
3 changed files with 55 additions and 1 deletions

View File

@ -247,6 +247,7 @@ dist_patch_DATA = \
gnu/packages/patches/dbus-localstatedir.patch \ gnu/packages/patches/dbus-localstatedir.patch \
gnu/packages/patches/diffutils-gets-undeclared.patch \ gnu/packages/patches/diffutils-gets-undeclared.patch \
gnu/packages/patches/dmd-getpw.patch \ gnu/packages/patches/dmd-getpw.patch \
gnu/packages/patches/dmd-tests-longer-sleeps.patch \
gnu/packages/patches/emacs-configure-sh.patch \ gnu/packages/patches/emacs-configure-sh.patch \
gnu/packages/patches/findutils-absolute-paths.patch \ gnu/packages/patches/findutils-absolute-paths.patch \
gnu/packages/patches/flac-fix-memcmp-not-declared.patch \ gnu/packages/patches/flac-fix-memcmp-not-declared.patch \

View File

@ -49,7 +49,8 @@
(sha256 (sha256
(base32 (base32
"07mddw0p62fcphwjzgb6rfa0pjz5sy6jzbha0sm2vc3rqf459jxg")) "07mddw0p62fcphwjzgb6rfa0pjz5sy6jzbha0sm2vc3rqf459jxg"))
(patches (list (search-patch "dmd-getpw.patch"))))) (patches (list (search-patch "dmd-getpw.patch")
(search-patch "dmd-tests-longer-sleeps.patch")))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:configure-flags '("--localstatedir=/var"))) '(#:configure-flags '("--localstatedir=/var")))

View File

@ -0,0 +1,52 @@
Increase sleep times in tests, for slower machines.
Patch by Mark H Weaver <mhw@netris.org>.
--- dmd/tests/basic.sh 2013-11-30 17:22:00.000000000 -0500
+++ dmd/tests/basic.sh 2014-02-16 02:18:34.036376953 -0500
@@ -46,7 +46,7 @@
dmd -I -s "$socket" -c "$conf" -l "$log" &
dmd_pid=$!
-sleep 1 # XXX: wait till it's up
+sleep 3 # XXX: wait till it's up
kill -0 $dmd_pid
test -S "$socket"
$deco status dmd | grep -E '(Start.*dmd|Stop.*test)'
--- dmd/tests/respawn.sh 2013-12-01 16:50:37.000000000 -0500
+++ dmd/tests/respawn.sh 2014-02-16 02:19:16.958251953 -0500
@@ -39,7 +39,7 @@
i=0
while ! test -f "$1" && test $i -lt 20
do
- sleep 0.3
+ sleep 1
i=`expr $i + 1`
done
test -f "$1"
@@ -65,14 +65,14 @@
#:provides '(test1)
#:start (make-forkexec-constructor
"$SHELL" "-c"
- "echo \$\$ > $service1_pid ; while true ; do sleep 1 ; done")
+ "echo \$\$ > $service1_pid ; while true ; do sleep 3 ; done")
#:stop (make-kill-destructor)
#:respawn? #t)
(make <service>
#:provides '(test2)
#:start (make-forkexec-constructor
"$SHELL" "-c"
- "echo \$\$ > $service2_pid ; while true ; do sleep 1 ; done")
+ "echo \$\$ > $service2_pid ; while true ; do sleep 3 ; done")
#:stop (make-kill-destructor)
#:respawn? #t))
(start 'test1)
@@ -82,7 +82,7 @@
dmd -I -s "$socket" -c "$conf" -l "$log" &
dmd_pid=$!
-sleep 1 # XXX: wait till it's up
+sleep 3 # XXX: wait till it's up
kill -0 $dmd_pid
test -S "$socket"
$deco status test1 | grep started