On Wed, Dec 04, 2013 at 12:09:09PM -0800, Junio C Hamano wrote:
> Duy Nguyen <[email protected]> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html