Re: Use mongoose to test smart-http unconditionally?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 4, 2013, 20:09 UTC
- Message-ID
- <xmqqa9ggl6oq.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CACsJy8BHnTHRugJoTDGs7h=dF1qQUWyPXYxCU8YsDU57s+5gyg@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 5 quoted lines
> 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.- 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
- we teach lib-httpd.sh to write out an appropriate configuration for the mongoose server.
That would force people to run http tests by turning it from an opt-in option to an opt-out option.
Or were you thinking about embedding mongoose in the git executable?