##// END OF EJS Templates
make server tests use --daemon.
Vadim Gelfer -
r1744:385b0649 default
parent child Browse files
Show More
@@ -1,38 +1,39
1 1 #!/bin/sh
2 2
3 3 mkdir test
4 4 cd test
5 5 hg init
6 6 echo foo>foo
7 7 hg addremove
8 8 hg commit -m 1
9 9 echo bar>bar
10 10 hg addremove
11 11 hg commit -m 2
12 12 mkdir baz
13 13 echo bletch>baz/bletch
14 14 hg addremove
15 15 hg commit -m 3
16 16 echo "[web]" >> .hg/hgrc
17 17 echo "name = test-archive" >> .hg/hgrc
18 18 echo "allowzip = true" >> .hg/hgrc
19 19 echo "allowgz = true" >> .hg/hgrc
20 20 echo "allowbz2 = true" >> .hg/hgrc
21 hg serve -p 20059 > /dev/null &
22 sleep 1 # wait for server to be started
21 serverpid=`mktemp`
22 hg serve -p 20059 -d --pid-file=$serverpid
23 23
24 24 TIP=`hg id -v | cut -f1 -d' '`
25 25 QTIP=`hg id -q`
26 26 cat > getarchive.py <<EOF
27 27 import sys, urllib2
28 28 node, archive = sys.argv[1:]
29 29 f = urllib2.urlopen('http://127.0.0.1:20059/?cmd=archive;node=%s;type=%s'
30 30 % (node, archive))
31 31 sys.stdout.write(f.read())
32 32 EOF
33 33 http_proxy= python getarchive.py "$TIP" gz | tar tzf - | sed "s/$QTIP/TIP/"
34 34 http_proxy= python getarchive.py "$TIP" bz2 | tar tjf - | sed "s/$QTIP/TIP/"
35 35 http_proxy= python getarchive.py "$TIP" zip > archive.zip
36 36 unzip -t archive.zip | sed "s/$QTIP/TIP/"
37 37
38 kill $!
38 kill `cat $serverpid`
39 rm $serverpid
@@ -1,15 +1,14
1 1 adding foo
2 2 adding bar
3 3 adding baz/bletch
4 4 test-archive-TIP/bar
5 5 test-archive-TIP/baz/bletch
6 6 test-archive-TIP/foo
7 7 test-archive-TIP/bar
8 8 test-archive-TIP/baz/bletch
9 9 test-archive-TIP/foo
10 10 Archive: archive.zip
11 11 testing: test-archive-TIP/bar OK
12 12 testing: test-archive-TIP/baz/bletch OK
13 13 testing: test-archive-TIP/foo OK
14 14 No errors detected in compressed data of archive.zip.
15 killed!
@@ -1,22 +1,23
1 1 #!/bin/sh
2 2
3 3 mkdir test
4 4 cd test
5 5 echo foo>foo
6 6 hg init
7 7 hg addremove
8 8 hg commit -m 1
9 9 hg verify
10 hg serve -p 20059 > /dev/null &
11 sleep 1 # wait for server to be started
10 serverpid=`mktemp`
11 hg serve -p 20059 -d --pid-file=$serverpid
12 12 cd ..
13 13
14 14 hg clone http://localhost:20059/ copy
15 15 cd copy
16 16 hg verify
17 17 hg co
18 18 cat foo
19 19 hg manifest
20 20 hg pull
21 21
22 kill $!
22 kill `cat $serverpid`
23 rm $serverpid
@@ -1,22 +1,21
1 1 adding foo
2 2 checking changesets
3 3 checking manifests
4 4 crosschecking files in changesets and manifests
5 5 checking files
6 6 1 files, 1 changesets, 1 total revisions
7 7 requesting all changes
8 8 adding changesets
9 9 adding manifests
10 10 adding file changes
11 11 added 1 changesets with 1 changes to 1 files
12 12 checking changesets
13 13 checking manifests
14 14 crosschecking files in changesets and manifests
15 15 checking files
16 16 1 files, 1 changesets, 1 total revisions
17 17 foo
18 18 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo
19 19 pulling from http://localhost:20059/
20 20 searching for changes
21 21 no changes found
22 killed!
General Comments 0
You need to be logged in to leave comments. Login now