summaryrefslogtreecommitdiff
path: root/t/lib-httpd.sh
AgeCommit message (Collapse)Author
2010-03-02t554[01]-http-push: refactor, add non-ff testsTay Ray Chuan
Move non-fast forward tests to lib-httpd.sh so that we don't have to duplicate the tests in both t5540 and t5541. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-06t/lib-http.sh: Restructure finding of default httpd locationTarmigan Casebolt
On CentOS 5, httpd is located at /usr/sbin/httpd, and the modules are located at /usr/lib64/httpd/modules. To enable easy testing of httpd, we would like those locations to be detected automatically. uname might not be the best way to determine the default location for httpd since different Linux distributions apparently put httpd in different places, so we test a couple different locations for httpd, and use the first one that we come across. We do the same for the modules directory. cc: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-02test-lib: fix http exit codesClemens Buchacher
Previously, die() would report the exit code of stop_httpd. Instead, save and reset the exit code before dying. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-05tests: remove exit after test_done callJeff King
test_done always exits, so this line is never executed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-26test scripts: refactor start_httpd helperJeff King
There are some redirects and some error checking that need to be done by the caller; let's move both into the start_httpd function so that all callers don't have to repeat them (there is only one caller now, but another will follow in this series). This doesn't violate any assumptions that aren't already being made by lib-httpd, which is happy to say "skipping" and call test_done for a number of other cases. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-25Allow HTTP tests to run on DarwinJay Soffian
This patch allows the HTTP tests to run on OS X 10.5. It is not sufficient to be able to pass in LIB_HTTPD_PATH and LIB_HTTPD_MODULE_PATH alone, as the apache.conf also needs a couple tweaks. These changes are put into an <IfDefine> to keep them Darwin specific, but this means lib-httpd.sh needs to be modified to pass -DDarwin to apache when running on Darwin. As long as we're making this change to lib-httpd.sh, we may as well set LIB_HTTPD_PATH and LIB_HTTPD_MODULE_PATH to appropriate default values for the platform. Note that we now pass HTTPD_PARA to apache at shutdown as well. Otherwise apache will emit a harmless, but noisy warning that LogFormat is an unknown directive. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-20use uppercase POSIX compliant signals for the 'trap' commandMarkus Heidelberg
In 'man 1p trap' there is written: "Implementations may permit names with the SIG prefix or ignore case in signal names as an extension." So change the lowercase signals to uppercase, which is POSIX compliant instead of being an extension. There wasn't anybody claiming that it doesn't work, but there was a bug with using a signal with the SIG prefix, which is an extension as well. So let's play it safe and change it, since it doesn't hurt anyone. While at it, also convert 8 indentation spaces to 1 tab character. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-17tests: use $TEST_DIRECTORY to refer to the t/ directoryJunio C Hamano
Many test scripts assumed that they will start in a 'trash' subdirectory that is a single level down from the t/ directory, and referred to their test vector files by asking for files like "../t9999/expect". This will break if we move the 'trash' subdirectory elsewhere. To solve this, we earlier introduced "$TEST_DIRECTORY" so that they can refer to t/ directory reliably. This finally makes all the tests use it to refer to the outside environment. With this patch, and a one-liner not included here (because it would contradict with what Dscho really wants to do): | diff --git a/t/test-lib.sh b/t/test-lib.sh | index 70ea7e0..60e69e4 100644 | --- a/t/test-lib.sh | +++ b/t/test-lib.sh | @@ -485,7 +485,7 @@ fi | . ../GIT-BUILD-OPTIONS | | # Test repository | -test="trash directory" | +test="trash directory/another level/yet another" | rm -fr "$test" || { | trap - exit | echo >&5 "FATAL: Cannot prepare test area" all the tests still pass, but we would want extra sets of eyeballs on this type of change to really make sure. [jc: with help from Stephan Beyer on http-push tests I do not run myself; credits for locating silly quoting errors go to Olivier Marin.] Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-09Fix http-push testMike Hommey
http-push test has been broken by 4a7aaccd adding a space character in the place where the test is being run. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-05Don't use the 'export NAME=value' in the test scripts.Bryan Donlan
This form is not portable across all shells, so replace instances of: export FOO=bar with: FOO=bar export FOO Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27http-push: add regression testsClemens Buchacher
http-push tests require a web server with WebDAV support. This commit introduces a HTTPD test library, which can be configured using the following environment variables. GIT_TEST_HTTPD enable HTTPD tests LIB_HTTPD_PATH web server path LIB_HTTPD_MODULE_PATH web server modules path LIB_HTTPD_PORT listening port LIB_HTTPD_DAV enable DAV LIB_HTTPD_SVN enable SVN LIB_HTTPD_SSL enable SSL Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>