From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: 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 17:25:22 -0500 [thread overview]
Message-ID: <20131204222522.GA16706@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqa9ggl6oq.fsf@gitster.dls.corp.google.com>
On Wed, Dec 04, 2013 at 12:09:09PM -0800, Junio C Hamano wrote:
> Duy Nguyen <pclouds@gmail.com> writes:
>
> > I was thinking of an alternative to apache for testing smart-http
> > so that most of http tests could always run. Mongoose [1] looks
> > like a good candidate to bundle with git. Just one pair of source
> > files, mongoose.[ch], a mainloop wrapper and we have an http
> > server.
>
> Hmmmm. How would the high-level integration look like?
>
> - we add contrib/mongoose/*;
>
> - in t/Makefile, we:
>
> . set GIT_TEST_HTTPD to yes, unless it is already set to another value;
>
> . set LIB_HTTPD_PATH to $GIT_BUILD_DIR/contrib/mongoose/mongoose,
> unless it is already set to another value;
>
> . if LIB_HTTPD_PATH is set to our mongoose and if it hasn't been
> built, go ../contrib/mongoose and build it.
I think building it on-demand is probably too much effort. If it is
portable, then it should not be a problem to just build it along with
the rest of git. If it is not, then we should rethink whether it is
worth including.
> - we teach lib-httpd.sh to trigger the DEFAULT_HTTPD_PATH
> computation when LIB_HTTPD_PATH is set to 'system-apache', so
> that people can test with their installed apache if they choose
> to; and
I do not think we want to allow run-time switching between an embedded
solution and apache. That would mean that we have to keep two sets of
http-server config in sync.
> Or were you thinking about embedding mongoose in the git executable?
I don't think it makes sense to embed it in git, but it could easily be
test-httpd.
The rollout would be:
1. add contrib/mongoose/*
2. add test-httpd which links against mongoose, built by default in the
Makefile
3. convert lib-httpd/apache.conf into mongoose config as necessary
4. convert lib-httpd.sh to run test-httpd instead of LIB_HTTPD_PATH
5. delete apache.conf, LIB_HTTPD_PATH and any other apache remnants
6. default GIT_TEST_HTTPD to yes
Step 3 is the part where I would anticipate trouble (i.e., finding out
that the new server does not do everything the tests expect).
-Peff
next prev parent reply other threads:[~2013-12-04 22:25 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
2013-12-04 20:09 ` Junio C Hamano
2013-12-04 22:25 ` Jeff King [this message]
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=20131204222522.GA16706@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/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).