# HG changeset patch # User Vadim Gelfer # Date 1140242133 28800 # Node ID 385b064934651a0bc293fa22988bba35367550f0 # Parent 1e5bb6c929cd6ec919a42b32c816b752e670a8d3 make server tests use --daemon. diff --git a/tests/test-archive b/tests/test-archive --- a/tests/test-archive +++ b/tests/test-archive @@ -18,8 +18,8 @@ echo "name = test-archive" >> .hg/hgrc echo "allowzip = true" >> .hg/hgrc echo "allowgz = true" >> .hg/hgrc echo "allowbz2 = true" >> .hg/hgrc -hg serve -p 20059 > /dev/null & -sleep 1 # wait for server to be started +serverpid=`mktemp` +hg serve -p 20059 -d --pid-file=$serverpid TIP=`hg id -v | cut -f1 -d' '` QTIP=`hg id -q` @@ -35,4 +35,5 @@ http_proxy= python getarchive.py "$TIP" http_proxy= python getarchive.py "$TIP" zip > archive.zip unzip -t archive.zip | sed "s/$QTIP/TIP/" -kill $! +kill `cat $serverpid` +rm $serverpid diff --git a/tests/test-archive.out b/tests/test-archive.out --- a/tests/test-archive.out +++ b/tests/test-archive.out @@ -12,4 +12,3 @@ Archive: archive.zip testing: test-archive-TIP/baz/bletch OK testing: test-archive-TIP/foo OK No errors detected in compressed data of archive.zip. -killed! diff --git a/tests/test-pull b/tests/test-pull --- a/tests/test-pull +++ b/tests/test-pull @@ -7,8 +7,8 @@ hg init hg addremove hg commit -m 1 hg verify -hg serve -p 20059 > /dev/null & -sleep 1 # wait for server to be started +serverpid=`mktemp` +hg serve -p 20059 -d --pid-file=$serverpid cd .. hg clone http://localhost:20059/ copy @@ -19,4 +19,5 @@ cat foo hg manifest hg pull -kill $! +kill `cat $serverpid` +rm $serverpid diff --git a/tests/test-pull.out b/tests/test-pull.out --- a/tests/test-pull.out +++ b/tests/test-pull.out @@ -19,4 +19,3 @@ 2ed2a3912a0b24502043eae84ee4b279c18b90dd pulling from http://localhost:20059/ searching for changes no changes found -killed!