The current darcs testsuite requires network connectivity (to http servers)
When behind an http proxy, doing http_proxy=wwwcache cabal test works. darcs
record --test hangs trying to connect to the http servers during the test suite.
Probably, the environment variable is not passed to the test suite.
On Fri, Sep 25, 2009 at 01:37:44PM +0000, Florent Becker wrote:
> The current darcs testsuite requires network connectivity (to http servers)
I can confirm that this is restricted to the tests in tests/network.
> When behind an http proxy, doing http_proxy=wwwcache cabal test works.
"cabal test" does not run the network tests.
> darcs record --test hangs trying to connect to the http servers
> during the test suite.
That is because it runs "runghc Setup test tests network", i.e. both
normal and network-dependent tests.
Are you sure that http_proxy=wwwcache is what you want? Compare
env -u http_proxy curl -fvI http://example.net/
http_proxy=wwwcache curl -fvI http://example.net/
http_proxy=http://wwwcache:1080 curl -fvI http://example.net/
PS: I simulated an environment in which a proxy is required, by adding
127.0.0.1 darcs.net
to /etc/hosts. Now:
$ getent hosts darcs.net
127.0.0.1 darcs.net
$ env -u http_proxy curl -vI http://darcs.net/
* About to connect() to darcs.net port 80 (#0)
* Trying 127.0.0.1... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
$ curl -I http://darcs.net/
HTTP/1.0 200 OK
[...]
Here, "./Setup test network" passes iff http_proxy is set.