Re: [PATCH] http-push: add regression tests
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 26, 2008, 00:24 UTC
- Message-ID
- <7vprukfttt.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080225232820.GA18254@localhost>
Clemens Buchacher <drizzd@aon.at> writes:
> http-push tests require a web server with WebDAV support.
I'd rather see these tests that are heavyweight and (more importantly) open a listened network ports kept strictly optional. IOW, please enable them only when the user asks for them, like some of the heavier GIT_SVN tests already do with "make full-svn-test" target.
> create mode 100644 t/lib-httpd.sh > create mode 100644 t/lib-httpd/apache.conf > create mode 100644 t/lib-httpd/ssl.cnf > create mode 100644 t/t5540-http-push.sh
Others are Ok but the last one should be 100755 per convention.
Show 7 quoted lines
> +TEST_PATH="$PWD"/../lib-httpd > +HTTPD_ROOT_PATH="$PWD"/httpd > +HTTPD_DOCUMENT_ROOT_PATH="$PWD"/httpd/www > + > +if ! test -x "$LIB_HTTPD_PATH" > +then > + say_color "" "skipping test, no web server found at $LIB_HTTPD_PATH"
Just use "say" to let "say" function pick the color.
Show 9 quoted lines
> + if test "$LIB_HTTPD_DAV" != "" -o "$LIB_HTTPD_SVN" != "" > + then > + HTTPD_PARA="$HTTPD_PARA -DDAV" > + > + if test "$LIB_HTTPD_SVN" != "" > + then > + HTTPD_PARA="$HTTPD_PARA -DSVN" > + rawsvnrepo="$HTTPD_ROOT_PATH/svnrepo" > + svnrepo="http://127.0.0.1:$LIB_HTTPD_PORT/svn"
Subversion??? Ah, you are preparing for enhancement of t91XX series?
Show 14 quoted lines
> + fi
> + fi
> +}
> +
> +start_httpd() {
> + prepare_httpd
> +
> + "$LIB_HTTPD_PATH" $HTTPD_PARA \
> + -c "Listen 127.0.0.1:$LIB_HTTPD_PORT" -k start
> +}
> +
> +stop_httpd() {
> + "$LIB_HTTPD_PATH" $HTTPD_PARA -k stop
> +}I have to wonder where it is arranged so that a test failure (including ^C out of it, or losing SSH connection to the terminal) would cause the server to be killed off.