On Wed, Dec 04, 2013 at 03:28:00PM -0800, Jonathan Nieder wrote:
> For what it's worth, when I build git and run tests I tend to be in an
> environment with apache available, but I'm too lazy to configure git's
> tests to pick the right port and make sure it is reserved and so on.
> Perhaps there's some way to help lazy people in the same boat? (E.g.,
> picking a port randomly and skipping instead of failing a test when
> it's taken or something)
What level of magic do you need?
For most people, "apt-get install apache && make GIT_TEST_HTTPD=yes
test" is enough to run the tests. It uses ports in the 5000-range; this
_can_ conflict with other services the user is running, but it should
not usually (we don't match anything in a typical /etc/services file).
And each script uses its own port, so running the tests in parallel is
If you are planning on running "make test" from multiple git checkouts
at the same time, though, they will conflict.
The failure mode is reasonable. You should get something like:
$ GIT_TEST_HTTPD=1 LIB_HTTPD_PORT=80 ./t5540-http-push.sh
1..0 # SKIP skipping test, web server setup failed
We could do better by retrying with a range of ports, but unless
somebody really needs that, I'd prefer to avoid complicating it more.
The one thing I have occasionally run into is a stale apache hanging
around. But I think that only happens when I am abusing the test script
(e.g., sticking a test_pause in, poking around, and then not letting the
script complete and do its cleanup).
So is the current behavior good enough to meet your needs and you
didn't know it, or do we need more?
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html