##// END OF EJS Templates
Allow for MB/sec transfer rates in test-http-proxy and test-ssh....
Lee Cantey -
r3015:fa4229c6 default
parent child Browse files
Show More
@@ -1,34 +1,34 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 hg init test
3 hg init test
4 cd test
4 cd test
5 echo foo>foo
5 echo foo>foo
6 hg commit -A -d '0 0' -m 1
6 hg commit -A -d '0 0' -m 1
7 hg --config server.uncompressed=True serve -p 20059 -d --pid-file=../hg1.pid
7 hg --config server.uncompressed=True serve -p 20059 -d --pid-file=../hg1.pid
8 hg serve -p 20060 -d --pid-file=../hg2.pid
8 hg serve -p 20060 -d --pid-file=../hg2.pid
9 cd ..
9 cd ..
10 cat hg1.pid hg2.pid >> $DAEMON_PIDS
10 cat hg1.pid hg2.pid >> $DAEMON_PIDS
11
11
12 echo % clone via stream
12 echo % clone via stream
13 http_proxy= hg clone --uncompressed http://localhost:20059/ copy 2>&1 | \
13 http_proxy= hg clone --uncompressed http://localhost:20059/ copy 2>&1 | \
14 sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/.\(B\/sec\)/X\1/'
14 sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/'
15 hg verify -R copy
15 hg verify -R copy
16
16
17 echo % try to clone via stream, should use pull instead
17 echo % try to clone via stream, should use pull instead
18 http_proxy= hg clone --uncompressed http://localhost:20060/ copy2
18 http_proxy= hg clone --uncompressed http://localhost:20060/ copy2
19
19
20 echo % clone via pull
20 echo % clone via pull
21 http_proxy= hg clone http://localhost:20059/ copy-pull
21 http_proxy= hg clone http://localhost:20059/ copy-pull
22 hg verify -R copy-pull
22 hg verify -R copy-pull
23
23
24 cd test
24 cd test
25 echo bar > bar
25 echo bar > bar
26 hg commit -A -d '1 0' -m 2
26 hg commit -A -d '1 0' -m 2
27 cd ..
27 cd ..
28
28
29 echo % pull
29 echo % pull
30 cd copy-pull
30 cd copy-pull
31 echo '[hooks]' >> .hg/hgrc
31 echo '[hooks]' >> .hg/hgrc
32 echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
32 echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
33 hg pull
33 hg pull
34 cd ..
34 cd ..
@@ -1,41 +1,41 b''
1 #!/bin/sh
1 #!/bin/sh
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 20059 -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" 20060 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:20060/ hg --config http_proxy.always=True clone --uncompressed http://localhost:20059/ b | \
18 sed -e 's/[0-9][0-9.]*/XXX/g'
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:20060/ hg --config http_proxy.always=True clone http://localhost:20059/ 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:20060 hg clone --config http_proxy.always=True http://localhost:20059/ 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:20060 hg clone --config http_proxy.always=True http://localhost:20059/ 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:20060 hg clone --config http_proxy.always=True http://user:passwd@localhost:20059/ 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:20061 hg clone --config http_proxy.always=True http://localhost:20059/ f
40
40
41 exit 0
41 exit 0
@@ -1,46 +1,46 b''
1 adding a
1 adding a
2 %% url for proxy, stream
2 %% url for proxy, stream
3 streaming all changes
3 streaming all changes
4 XXX files to transfer, XXX bytes of data
4 XXX files to transfer, XXX bytes of data
5 transferred XXX bytes in XXX seconds (XXX KB/sec)
5 transferred XXX bytes in XXX seconds (XXX XB/sec)
6 XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
6 XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
7 checking changesets
7 checking changesets
8 checking manifests
8 checking manifests
9 crosschecking files in changesets and manifests
9 crosschecking files in changesets and manifests
10 checking files
10 checking files
11 1 files, 1 changesets, 1 total revisions
11 1 files, 1 changesets, 1 total revisions
12 %% url for proxy, pull
12 %% url for proxy, pull
13 requesting all changes
13 requesting all changes
14 adding changesets
14 adding changesets
15 adding manifests
15 adding manifests
16 adding file changes
16 adding file changes
17 added 1 changesets with 1 changes to 1 files
17 added 1 changesets with 1 changes to 1 files
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 checking changesets
19 checking changesets
20 checking manifests
20 checking manifests
21 crosschecking files in changesets and manifests
21 crosschecking files in changesets and manifests
22 checking files
22 checking files
23 1 files, 1 changesets, 1 total revisions
23 1 files, 1 changesets, 1 total revisions
24 %% host:port for proxy
24 %% host:port for proxy
25 requesting all changes
25 requesting all changes
26 adding changesets
26 adding changesets
27 adding manifests
27 adding manifests
28 adding file changes
28 adding file changes
29 added 1 changesets with 1 changes to 1 files
29 added 1 changesets with 1 changes to 1 files
30 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
30 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
31 %% proxy url with user name and password
31 %% proxy url with user name and password
32 requesting all changes
32 requesting all changes
33 adding changesets
33 adding changesets
34 adding manifests
34 adding manifests
35 adding file changes
35 adding file changes
36 added 1 changesets with 1 changes to 1 files
36 added 1 changesets with 1 changes to 1 files
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 %% url with user name and password
38 %% url with user name and password
39 requesting all changes
39 requesting all changes
40 adding changesets
40 adding changesets
41 adding manifests
41 adding manifests
42 adding file changes
42 adding file changes
43 added 1 changesets with 1 changes to 1 files
43 added 1 changesets with 1 changes to 1 files
44 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 %% bad host:port for proxy
45 %% bad host:port for proxy
46 abort: error: Connection refused
46 abort: error: Connection refused
@@ -1,99 +1,99 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 # This test tries to exercise the ssh functionality with a dummy script
3 # This test tries to exercise the ssh functionality with a dummy script
4
4
5 cat <<'EOF' > dummyssh
5 cat <<'EOF' > dummyssh
6 #!/bin/sh
6 #!/bin/sh
7 # this attempts to deal with relative pathnames
7 # this attempts to deal with relative pathnames
8 cd `dirname $0`
8 cd `dirname $0`
9
9
10 # check for proper args
10 # check for proper args
11 if [ $1 != "user@dummy" ] ; then
11 if [ $1 != "user@dummy" ] ; then
12 exit -1
12 exit -1
13 fi
13 fi
14
14
15 # check that we're in the right directory
15 # check that we're in the right directory
16 if [ ! -x dummyssh ] ; then
16 if [ ! -x dummyssh ] ; then
17 exit -1
17 exit -1
18 fi
18 fi
19
19
20 SSH_CLIENT='127.0.0.1 1 2'
20 SSH_CLIENT='127.0.0.1 1 2'
21 export SSH_CLIENT
21 export SSH_CLIENT
22 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog
22 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog
23 $2
23 $2
24 EOF
24 EOF
25 chmod +x dummyssh
25 chmod +x dummyssh
26
26
27 echo "# creating 'remote'"
27 echo "# creating 'remote'"
28 hg init remote
28 hg init remote
29 cd remote
29 cd remote
30 echo this > foo
30 echo this > foo
31 hg ci -A -m "init" -d "1000000 0" foo
31 hg ci -A -m "init" -d "1000000 0" foo
32 echo '[server]' > .hg/hgrc
32 echo '[server]' > .hg/hgrc
33 echo 'uncompressed = True' >> .hg/hgrc
33 echo 'uncompressed = True' >> .hg/hgrc
34 echo '[hooks]' >> .hg/hgrc
34 echo '[hooks]' >> .hg/hgrc
35 echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc
35 echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc
36
36
37 cd ..
37 cd ..
38
38
39 echo "# clone remote via stream"
39 echo "# clone remote via stream"
40 hg clone -e ./dummyssh --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \
40 hg clone -e ./dummyssh --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \
41 sed -e 's/[0-9][0-9.]*/XXX/g'
41 sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/'
42 cd local-stream
42 cd local-stream
43 hg verify
43 hg verify
44 cd ..
44 cd ..
45
45
46 echo "# clone remote via pull"
46 echo "# clone remote via pull"
47 hg clone -e ./dummyssh ssh://user@dummy/remote local
47 hg clone -e ./dummyssh ssh://user@dummy/remote local
48
48
49 echo "# verify"
49 echo "# verify"
50 cd local
50 cd local
51 hg verify
51 hg verify
52
52
53 echo '[hooks]' >> .hg/hgrc
53 echo '[hooks]' >> .hg/hgrc
54 echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc
54 echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc
55
55
56 echo "# empty default pull"
56 echo "# empty default pull"
57 hg paths
57 hg paths
58 hg pull -e ../dummyssh
58 hg pull -e ../dummyssh
59
59
60 echo "# local change"
60 echo "# local change"
61 echo bleah > foo
61 echo bleah > foo
62 hg ci -m "add" -d "1000000 0"
62 hg ci -m "add" -d "1000000 0"
63
63
64 echo "# updating rc"
64 echo "# updating rc"
65 echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
65 echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
66 echo "[ui]" >> .hg/hgrc
66 echo "[ui]" >> .hg/hgrc
67 echo "ssh = ../dummyssh" >> .hg/hgrc
67 echo "ssh = ../dummyssh" >> .hg/hgrc
68
68
69 echo "# find outgoing"
69 echo "# find outgoing"
70 hg out ssh://user@dummy/remote
70 hg out ssh://user@dummy/remote
71
71
72 echo "# find incoming on the remote side"
72 echo "# find incoming on the remote side"
73 hg incoming -R ../remote -e ../dummyssh ssh://user@dummy/local
73 hg incoming -R ../remote -e ../dummyssh ssh://user@dummy/local
74
74
75 echo "# push"
75 echo "# push"
76 hg push
76 hg push
77
77
78 cd ../remote
78 cd ../remote
79
79
80 echo "# check remote tip"
80 echo "# check remote tip"
81 hg tip
81 hg tip
82 hg verify
82 hg verify
83 hg cat foo
83 hg cat foo
84
84
85 echo z > z
85 echo z > z
86 hg ci -A -m z -d '1000001 0' z
86 hg ci -A -m z -d '1000001 0' z
87
87
88 cd ../local
88 cd ../local
89 echo r > r
89 echo r > r
90 hg ci -A -m z -d '1000002 0' r
90 hg ci -A -m z -d '1000002 0' r
91
91
92 echo "# push should fail"
92 echo "# push should fail"
93 hg push
93 hg push
94
94
95 echo "# push should succeed"
95 echo "# push should succeed"
96 hg push -f
96 hg push -f
97
97
98 cd ..
98 cd ..
99 cat dummylog
99 cat dummylog
@@ -1,89 +1,89 b''
1 # creating 'remote'
1 # creating 'remote'
2 # clone remote via stream
2 # clone remote via stream
3 streaming all changes
3 streaming all changes
4 XXX files to transfer, XXX bytes of data
4 XXX files to transfer, XXX bytes of data
5 transferred XXX bytes in XXX seconds (XXX KB/sec)
5 transferred XXX bytes in XXX seconds (XXX XB/sec)
6 XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
6 XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
7 checking changesets
7 checking changesets
8 checking manifests
8 checking manifests
9 crosschecking files in changesets and manifests
9 crosschecking files in changesets and manifests
10 checking files
10 checking files
11 1 files, 1 changesets, 1 total revisions
11 1 files, 1 changesets, 1 total revisions
12 # clone remote via pull
12 # clone remote via pull
13 requesting all changes
13 requesting all changes
14 adding changesets
14 adding changesets
15 adding manifests
15 adding manifests
16 adding file changes
16 adding file changes
17 added 1 changesets with 1 changes to 1 files
17 added 1 changesets with 1 changes to 1 files
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 # verify
19 # verify
20 checking changesets
20 checking changesets
21 checking manifests
21 checking manifests
22 crosschecking files in changesets and manifests
22 crosschecking files in changesets and manifests
23 checking files
23 checking files
24 1 files, 1 changesets, 1 total revisions
24 1 files, 1 changesets, 1 total revisions
25 # empty default pull
25 # empty default pull
26 default = ssh://user@dummy/remote
26 default = ssh://user@dummy/remote
27 pulling from ssh://user@dummy/remote
27 pulling from ssh://user@dummy/remote
28 searching for changes
28 searching for changes
29 no changes found
29 no changes found
30 # local change
30 # local change
31 # updating rc
31 # updating rc
32 # find outgoing
32 # find outgoing
33 searching for changes
33 searching for changes
34 changeset: 1:c54836a570be
34 changeset: 1:c54836a570be
35 tag: tip
35 tag: tip
36 user: test
36 user: test
37 date: Mon Jan 12 13:46:40 1970 +0000
37 date: Mon Jan 12 13:46:40 1970 +0000
38 summary: add
38 summary: add
39
39
40 # find incoming on the remote side
40 # find incoming on the remote side
41 searching for changes
41 searching for changes
42 changeset: 1:c54836a570be
42 changeset: 1:c54836a570be
43 tag: tip
43 tag: tip
44 user: test
44 user: test
45 date: Mon Jan 12 13:46:40 1970 +0000
45 date: Mon Jan 12 13:46:40 1970 +0000
46 summary: add
46 summary: add
47
47
48 # push
48 # push
49 pushing to ssh://user@dummy/remote
49 pushing to ssh://user@dummy/remote
50 searching for changes
50 searching for changes
51 remote: adding changesets
51 remote: adding changesets
52 remote: adding manifests
52 remote: adding manifests
53 remote: adding file changes
53 remote: adding file changes
54 remote: added 1 changesets with 1 changes to 1 files
54 remote: added 1 changesets with 1 changes to 1 files
55 # check remote tip
55 # check remote tip
56 changeset: 1:c54836a570be
56 changeset: 1:c54836a570be
57 tag: tip
57 tag: tip
58 user: test
58 user: test
59 date: Mon Jan 12 13:46:40 1970 +0000
59 date: Mon Jan 12 13:46:40 1970 +0000
60 summary: add
60 summary: add
61
61
62 checking changesets
62 checking changesets
63 checking manifests
63 checking manifests
64 crosschecking files in changesets and manifests
64 crosschecking files in changesets and manifests
65 checking files
65 checking files
66 1 files, 2 changesets, 2 total revisions
66 1 files, 2 changesets, 2 total revisions
67 bleah
67 bleah
68 # push should fail
68 # push should fail
69 pushing to ssh://user@dummy/remote
69 pushing to ssh://user@dummy/remote
70 searching for changes
70 searching for changes
71 abort: unsynced remote changes!
71 abort: unsynced remote changes!
72 (did you forget to sync? use push -f to force)
72 (did you forget to sync? use push -f to force)
73 # push should succeed
73 # push should succeed
74 pushing to ssh://user@dummy/remote
74 pushing to ssh://user@dummy/remote
75 searching for changes
75 searching for changes
76 remote: adding changesets
76 remote: adding changesets
77 remote: adding manifests
77 remote: adding manifests
78 remote: adding file changes
78 remote: adding file changes
79 remote: added 1 changesets with 1 changes to 1 files
79 remote: added 1 changesets with 1 changes to 1 files
80 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
80 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
81 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
81 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
82 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
82 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
83 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
83 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
84 Got arguments 1:user@dummy 2:hg -R local serve --stdio 3: 4: 5:
84 Got arguments 1:user@dummy 2:hg -R local serve --stdio 3: 4: 5:
85 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
85 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
86 changegroup in remote: u=remote:ssh:127.0.0.1
86 changegroup in remote: u=remote:ssh:127.0.0.1
87 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
87 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
88 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
88 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
89 changegroup in remote: u=remote:ssh:127.0.0.1
89 changegroup in remote: u=remote:ssh:127.0.0.1
General Comments 0
You need to be logged in to leave comments. Login now