comparison tests/test-archive @ 1744:385b06493465

make server tests use --daemon.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Fri, 17 Feb 2006 21:55:33 -0800
parents 4603eef60237
children ffb584a182d1
comparison
equal deleted inserted replaced
1742:1e5bb6c929cd 1744:385b06493465
16 echo "[web]" >> .hg/hgrc 16 echo "[web]" >> .hg/hgrc
17 echo "name = test-archive" >> .hg/hgrc 17 echo "name = test-archive" >> .hg/hgrc
18 echo "allowzip = true" >> .hg/hgrc 18 echo "allowzip = true" >> .hg/hgrc
19 echo "allowgz = true" >> .hg/hgrc 19 echo "allowgz = true" >> .hg/hgrc
20 echo "allowbz2 = true" >> .hg/hgrc 20 echo "allowbz2 = true" >> .hg/hgrc
21 hg serve -p 20059 > /dev/null & 21 serverpid=`mktemp`
22 sleep 1 # wait for server to be started 22 hg serve -p 20059 -d --pid-file=$serverpid
23 23
24 TIP=`hg id -v | cut -f1 -d' '` 24 TIP=`hg id -v | cut -f1 -d' '`
25 QTIP=`hg id -q` 25 QTIP=`hg id -q`
26 cat > getarchive.py <<EOF 26 cat > getarchive.py <<EOF
27 import sys, urllib2 27 import sys, urllib2
33 http_proxy= python getarchive.py "$TIP" gz | tar tzf - | sed "s/$QTIP/TIP/" 33 http_proxy= python getarchive.py "$TIP" gz | tar tzf - | sed "s/$QTIP/TIP/"
34 http_proxy= python getarchive.py "$TIP" bz2 | tar tjf - | sed "s/$QTIP/TIP/" 34 http_proxy= python getarchive.py "$TIP" bz2 | tar tjf - | sed "s/$QTIP/TIP/"
35 http_proxy= python getarchive.py "$TIP" zip > archive.zip 35 http_proxy= python getarchive.py "$TIP" zip > archive.zip
36 unzip -t archive.zip | sed "s/$QTIP/TIP/" 36 unzip -t archive.zip | sed "s/$QTIP/TIP/"
37 37
38 kill $! 38 kill `cat $serverpid`
39 rm $serverpid