[PATCH STABLE] run-tests.py: clears http_proxy for all tests

Wagner Bruna wagner.bruna+mercurial at gmail.com
Tue Dec 29 15:41:55 CST 2009


# HG changeset patch
# User Wagner Bruna <wbruna at softwareexpress.com.br>
# Date 1262120546 7200
# Branch stable
# Node ID ccae2d56715f49597d722fd2b2cedaa6826c87e9
# Parent  37679dbf2ee3335f9025fc42fd30d35d034dc684
run-tests.py: clears http_proxy for all tests

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -786,6 +786,7 @@
     os.environ["EMAIL"] = "Foo Bar <foo.bar at example.com>"
     os.environ['CDPATH'] = ''
     os.environ['COLUMNS'] = '80'
+    os.environ['http_proxy'] = ''
 
     global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE
     TESTDIR = os.environ["TESTDIR"] = os.getcwd()
diff --git a/tests/test-archive b/tests/test-archive
--- a/tests/test-archive
+++ b/tests/test-archive
@@ -58,9 +58,9 @@
                     % (os.environ['HGPORT'], node, archive))
 sys.stdout.write(f.read())
 EOF
-http_proxy= python getarchive.py "$TIP" gz | gunzip | tar tf - 2>/dev/null | sed "s/$QTIP/TIP/"
-http_proxy= python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - 2>/dev/null | sed "s/$QTIP/TIP/"
-http_proxy= python getarchive.py "$TIP" zip > archive.zip
+python getarchive.py "$TIP" gz | gunzip | tar tf - 2>/dev/null | sed "s/$QTIP/TIP/"
+python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - 2>/dev/null | sed "s/$QTIP/TIP/"
+python getarchive.py "$TIP" zip > archive.zip
 unzip -t archive.zip | sed "s/$QTIP/TIP/"
 
 "$TESTDIR/killdaemons.py"
diff --git a/tests/test-bad-pull b/tests/test-bad-pull
--- a/tests/test-bad-pull
+++ b/tests/test-bad-pull
@@ -23,7 +23,7 @@
 # give the server some time to start running
 sleep 1
 
-http_proxy= hg clone http://localhost:$HGPORT/foo copy2 2>&1 | \
+hg clone http://localhost:$HGPORT/foo copy2 2>&1 | \
     sed -e 's/404.*/404/' -e 's/Date:.*/Date:/'
 echo $?
 
diff --git a/tests/test-http b/tests/test-http
--- a/tests/test-http
+++ b/tests/test-http
@@ -19,15 +19,15 @@
 cat hg1.pid hg2.pid >> $DAEMON_PIDS
 
 echo % clone via stream
-http_proxy= hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 | \
+hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 | \
   sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/'
 hg verify -R copy
 
 echo % try to clone via stream, should use pull instead
-http_proxy= hg clone --uncompressed http://localhost:$HGPORT1/ copy2
+hg clone --uncompressed http://localhost:$HGPORT1/ copy2
 
 echo % clone via pull
-http_proxy= hg clone http://localhost:$HGPORT1/ copy-pull
+hg clone http://localhost:$HGPORT1/ copy-pull
 hg verify -R copy-pull
 
 cd test
diff --git a/tests/test-incoming-outgoing b/tests/test-incoming-outgoing
--- a/tests/test-incoming-outgoing
+++ b/tests/test-incoming-outgoing
@@ -14,8 +14,8 @@
 
 hg init new
 # http incoming
-http_proxy= hg -R new incoming http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
-http_proxy= hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+hg -R new incoming http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
 # local incoming
 hg -R new incoming test
 hg -R new incoming -r 4 test
@@ -25,7 +25,7 @@
 hg -R new incoming -l 2 -p --git test
 
 # test with --bundle
-http_proxy= hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
 hg -R new incoming --bundle test2.hg test
 
 # test the resulting bundles
@@ -50,5 +50,5 @@
 hg -R test-dev outgoing test
 echo "% limit to 3 changesets"
 hg -R test-dev outgoing -l 3 test
-http_proxy= hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
-http_proxy= hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
diff --git a/tests/test-pull b/tests/test-pull
--- a/tests/test-pull
+++ b/tests/test-pull
@@ -11,7 +11,7 @@
 cat hg.pid >> $DAEMON_PIDS
 cd ..
 
-http_proxy= hg clone --pull http://localhost:$HGPORT/ copy | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone --pull http://localhost:$HGPORT/ copy | sed -e 's,:[0-9][0-9]*/,/,'
 cd copy
 hg verify
 hg co
diff --git a/tests/test-static-http b/tests/test-static-http
--- a/tests/test-static-http
+++ b/tests/test-static-http
@@ -2,7 +2,7 @@
 
 cp "$TESTDIR"/printenv.py .
 
-http_proxy= hg clone http://localhost:$HGPORT/ copy
+hg clone http://localhost:$HGPORT/ copy
 echo $?
 test -d copy || echo copy: No such file or directory
 
@@ -34,7 +34,7 @@
 
 cd ..
 
-http_proxy= hg clone static-http://localhost:$HGPORT/remote local | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone static-http://localhost:$HGPORT/remote local | sed -e 's,:[0-9][0-9]*/,/,'
 
 cd local
 hg verify
@@ -47,13 +47,13 @@
 cd ../local
 echo '[hooks]' >> .hg/hgrc
 echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
-http_proxy= hg pull | sed -e 's,:[0-9][0-9]*/,/,'
+hg pull | sed -e 's,:[0-9][0-9]*/,/,'
 
 echo '% trying to push'
 hg update
 echo more foo >> bar
 hg commit -m"test" -d "100000000 0"
-http_proxy= hg push | sed -e 's,:[0-9][0-9]*/,/,'
+hg push | sed -e 's,:[0-9][0-9]*/,/,'
 
 echo '% test with "/" URI (issue 747)'
 cd ..
@@ -62,7 +62,7 @@
 hg add a
 hg ci -ma
 
-http_proxy= hg clone static-http://localhost:$HGPORT/ local2 | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone static-http://localhost:$HGPORT/ local2 | sed -e 's,:[0-9][0-9]*/,/,'
 
 cd local2
 hg verify
@@ -73,7 +73,7 @@
 cd ..
 hg init remotempty
 
-http_proxy= hg clone static-http://localhost:$HGPORT/remotempty local3 | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone static-http://localhost:$HGPORT/remotempty local3 | sed -e 's,:[0-9][0-9]*/,/,'
 
 cd local3
 hg verify
@@ -82,6 +82,6 @@
 echo '% test with non-repo'
 cd ..
 mkdir notarepo
-http_proxy= hg clone static-http://localhost:$HGPORT/notarepo local3 2>&1 | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone static-http://localhost:$HGPORT/notarepo local3 2>&1 | sed -e 's,:[0-9][0-9]*/,/,'
 
 kill $!


More information about the Mercurial-devel mailing list