Mercurial > public > mercurial-scm > hg-stable
diff tests/test-static-http @ 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 | 598dae804a5f |
children | 6605a03cbf87 |
line wrap: on
line diff
--- a/tests/test-static-http Fri Oct 05 09:30:02 2007 -0700 +++ b/tests/test-static-http Fri Oct 05 12:17:01 2007 -0700 @@ -2,18 +2,18 @@ cp "$TESTDIR"/printenv.py . -http_proxy= hg clone static-http://localhost:20059/ copy +http_proxy= hg clone static-http://localhost:$HGPORT/ copy echo $? test -d copy || echo copy: No such file or directory # This server doesn't do range requests so it's basically only good for # one pull cat > dumb.py <<EOF -import BaseHTTPServer, SimpleHTTPServer, signal +import BaseHTTPServer, SimpleHTTPServer, os, signal def run(server_class=BaseHTTPServer.HTTPServer, handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): - server_address = ('localhost', 20059) + server_address = ('localhost', int(os.environ['HGPORT'])) httpd = server_class(server_address, handler_class) httpd.serve_forever() @@ -34,7 +34,7 @@ cd .. -http_proxy= hg clone static-http://localhost:20059/remote local +http_proxy= hg clone static-http://localhost:$HGPORT/remote local | sed -e 's,:[0-9][0-9]*/,/,' cd local hg verify @@ -47,7 +47,7 @@ cd ../local echo '[hooks]' >> .hg/hgrc echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc -http_proxy= hg pull +http_proxy= hg pull | sed -e 's,:[0-9][0-9]*/,/,' echo '% test with "/" URI (issue 747)' cd .. @@ -56,11 +56,11 @@ hg add a hg ci -ma -http_proxy= hg clone static-http://localhost:20059/ local2 +http_proxy= hg clone static-http://localhost:$HGPORT/ local2 | sed -e 's,:[0-9][0-9]*/,/,' cd local2 hg verify cat a -hg paths +hg paths | sed -e 's,:[0-9][0-9]*/,/,' kill $!