From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Shawn Pearce <spearce@spearce.org>,
Duy Nguyen <pclouds@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Use mongoose to test smart-http unconditionally?
Date: Wed, 4 Dec 2013 22:00:15 -0500 [thread overview]
Message-ID: <20131205030015.GB19376@sigill.intra.peff.net> (raw)
In-Reply-To: <20131204232800.GG29959@google.com>
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
fine.
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?
-Peff
next prev parent reply other threads:[~2013-12-05 3:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 10:53 Use mongoose to test smart-http unconditionally? Duy Nguyen
2013-12-04 18:13 ` Shawn Pearce
2013-12-04 18:48 ` Jeff King
2013-12-04 23:28 ` Jonathan Nieder
2013-12-05 0:18 ` Duy Nguyen
2013-12-05 3:00 ` Jeff King [this message]
2013-12-04 20:09 ` Junio C Hamano
2013-12-04 22:25 ` Jeff King
2013-12-04 22:53 ` Junio C Hamano
2013-12-05 2:49 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131205030015.GB19376@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=pclouds@gmail.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).