Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/test-http-proxy @ 5384:e3a0c092b4e2
Allow tests to run in parallel.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri, 05 Oct 2007 12:17:01 -0700 |
parents | fa4229c60dd7 |
children |
comparison
equal
deleted
inserted
replaced
5383:7cdc896fdcd5 | 5384:e3a0c092b4e2 |
---|---|
2 | 2 |
3 hg init a | 3 hg init a |
4 cd a | 4 cd a |
5 echo a > a | 5 echo a > a |
6 hg ci -Ama -d '1123456789 0' | 6 hg ci -Ama -d '1123456789 0' |
7 hg --config server.uncompressed=True serve -p 20059 -d --pid-file=hg.pid | 7 hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid |
8 cat hg.pid >> $DAEMON_PIDS | 8 cat hg.pid >> $DAEMON_PIDS |
9 | 9 |
10 cd .. | 10 cd .. |
11 ("$TESTDIR/tinyproxy.py" 20060 localhost >proxy.log 2>&1 </dev/null & | 11 ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null & |
12 echo $! > proxy.pid) | 12 echo $! > proxy.pid) |
13 cat proxy.pid >> $DAEMON_PIDS | 13 cat proxy.pid >> $DAEMON_PIDS |
14 sleep 2 | 14 sleep 2 |
15 | 15 |
16 echo %% url for proxy, stream | 16 echo %% url for proxy, stream |
17 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone --uncompressed http://localhost:20059/ b | \ | 17 http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b | \ |
18 sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' | 18 sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' |
19 cd b | 19 cd b |
20 hg verify | 20 hg verify |
21 cd .. | 21 cd .. |
22 | 22 |
23 echo %% url for proxy, pull | 23 echo %% url for proxy, pull |
24 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone http://localhost:20059/ b-pull | 24 http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull |
25 cd b-pull | 25 cd b-pull |
26 hg verify | 26 hg verify |
27 cd .. | 27 cd .. |
28 | 28 |
29 echo %% host:port for proxy | 29 echo %% host:port for proxy |
30 http_proxy=localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ c | 30 http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c |
31 | 31 |
32 echo %% proxy url with user name and password | 32 echo %% proxy url with user name and password |
33 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ d | 33 http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d |
34 | 34 |
35 echo %% url with user name and password | 35 echo %% url with user name and password |
36 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://user:passwd@localhost:20059/ e | 36 http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e |
37 | 37 |
38 echo %% bad host:port for proxy | 38 echo %% bad host:port for proxy |
39 http_proxy=localhost:20061 hg clone --config http_proxy.always=True http://localhost:20059/ f | 39 http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f |
40 | 40 |
41 exit 0 | 41 exit 0 |