repack: repack promisor objects if -a or -A is set
[gitweb.git] / t / lib-httpd.sh
index b6788fea5742e7728a5c39078b78193a75f41498..a8729f82325ee7fb9350c42553e11205e6720928 100644 (file)
@@ -132,6 +132,7 @@ prepare_httpd() {
        cp "$TEST_PATH"/passwd "$HTTPD_ROOT_PATH"
        install_script broken-smart-http.sh
        install_script error.sh
+       install_script apply-one-time-sed.sh
 
        ln -s "$LIB_HTTPD_MODULE_PATH" "$HTTPD_ROOT_PATH/modules"
 
@@ -296,3 +297,15 @@ strip_access_log() {
                s/^GET /GET  /
        " "$HTTPD_ROOT_PATH"/access.log
 }
+
+# Requires one argument: the name of a file containing the expected stripped
+# access log entries.
+check_access_log() {
+       sort "$1" >"$1".sorted &&
+       strip_access_log >access.log.stripped &&
+       sort access.log.stripped >access.log.sorted &&
+       if ! test_cmp "$1".sorted access.log.sorted
+       then
+               test_cmp "$1" access.log.stripped
+       fi
+}