dumping ground for random patches and texts
 help / color / mirror / Atom feed
* [PATCH 1/3] t/lib-git-svn: check same httpd module dirs as lib-httpd
@ 2016-07-23  0:55 Eric Wong
  2016-07-23  0:55 ` [PATCH 2/3] t/t91*: do not say how to avoid the tests Eric Wong
  2016-07-23  0:55 ` [PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4 Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2016-07-23  0:55 UTC (permalink / raw)
  To: spew

From: Michael J Gruber <git@drmicha.warpmail.net>

Currently, lib-git-svn checks a proper subset of the paths that
lib-httpd checks for apache modules.

Make it check the same set so that apache is run by one when it is run
by the other (provided ports have been set and there are no other
configuration issues).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Eric Wong <e@80x24.org>
---
 t/lib-git-svn.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index fb88232..206f0d4 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -84,8 +84,10 @@ prepare_httpd () {
 	fi
 	for d in \
 		"$SVN_HTTPD_MODULE_PATH" \
-		/usr/lib/apache2/modules \
 		/usr/libexec/apache2 \
+		/usr/lib/apache2/modules \
+		/usr/lib64/httpd/modules \
+		/usr/lib/httpd/modules \
 	; do
 		if test -d "$d"
 		then
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/3] t/t91*: do not say how to avoid the tests
  2016-07-23  0:55 [PATCH 1/3] t/lib-git-svn: check same httpd module dirs as lib-httpd Eric Wong
@ 2016-07-23  0:55 ` Eric Wong
  2016-07-23  0:55 ` [PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4 Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-07-23  0:55 UTC (permalink / raw)
  To: spew

From: Michael J Gruber <git@drmicha.warpmail.net>

Some of the tests "say" how to stop the svn tests from running, some do
not.

The test suite is directed at people reading t/README where we keep all
information about running the test suite (partly, with options etc.).

Remove said "say" occurences.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Eric Wong <e@80x24.org>
---
 t/t9100-git-svn-basic.sh               | 2 --
 t/t9158-git-svn-mergeinfo.sh           | 2 --
 t/t9160-git-svn-preserve-empty-dirs.sh | 1 -
 3 files changed, 5 deletions(-)

diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 28082b1..c23b11f 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -8,8 +8,6 @@ GIT_SVN_LC_ALL=${LC_ALL:-$LANG}
 
 . ./lib-git-svn.sh
 
-say 'define NO_SVN_TESTS to skip git svn tests'
-
 case "$GIT_SVN_LC_ALL" in
 *.UTF-8)
 	test_set_prereq UTF8
diff --git a/t/t9158-git-svn-mergeinfo.sh b/t/t9158-git-svn-mergeinfo.sh
index 13f78f2..a875b45 100755
--- a/t/t9158-git-svn-mergeinfo.sh
+++ b/t/t9158-git-svn-mergeinfo.sh
@@ -7,8 +7,6 @@ test_description='git svn mergeinfo propagation'
 
 . ./lib-git-svn.sh
 
-say 'define NO_SVN_TESTS to skip git svn tests'
-
 test_expect_success 'initialize source svn repo' '
 	svn_cmd mkdir -m x "$svnrepo"/trunk &&
 	svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
diff --git a/t/t9160-git-svn-preserve-empty-dirs.sh b/t/t9160-git-svn-preserve-empty-dirs.sh
index b4a4434..0ede3cf 100755
--- a/t/t9160-git-svn-preserve-empty-dirs.sh
+++ b/t/t9160-git-svn-preserve-empty-dirs.sh
@@ -11,7 +11,6 @@ local Git repository with placeholder files.'
 
 . ./lib-git-svn.sh
 
-say 'define NO_SVN_TESTS to skip git svn tests'
 GIT_REPO=git-svn-repo
 
 test_expect_success 'initialize source svn repo containing empty dirs' '
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4
  2016-07-23  0:55 [PATCH 1/3] t/lib-git-svn: check same httpd module dirs as lib-httpd Eric Wong
  2016-07-23  0:55 ` [PATCH 2/3] t/t91*: do not say how to avoid the tests Eric Wong
@ 2016-07-23  0:55 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-07-23  0:55 UTC (permalink / raw)
  To: spew

From: Michael J Gruber <git@drmicha.warpmail.net>

Apache 2.4 requires several config changes and enabling
authentication to start.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Eric Wong <e@80x24.org>
---
 t/lib-git-svn.sh                      | 33 ++++++++++++++++++++++++++++++++-
 t/t9118-git-svn-funky-branch-names.sh | 11 ++++++-----
 2 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index 206f0d4..095957e 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -114,13 +114,35 @@ ServerName "git svn test"
 ServerRoot "$GIT_DIR"
 DocumentRoot "$GIT_DIR"
 PidFile "$GIT_DIR/httpd.pid"
-LockFile logs/accept.lock
 Listen 127.0.0.1:$SVN_HTTPD_PORT
 LoadModule dav_module $SVN_HTTPD_MODULE_PATH/mod_dav.so
 LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH/mod_dav_svn.so
+<IfModule !mod_version.c>
+	LoadModule version_module $SVN_HTTPD_MODULE_PATH/mod_version.so
+</IfModule>
+<IfVersion < 2.4>
+LockFile logs/accept.lock
+</IfVersion>
+<IfVersion >= 2.4>
+Mutex default
+<IfModule !mod_prefork_module.c>
+	LoadModule mpm_prefork_module $SVN_HTTPD_MODULE_PATH/mod_mpm_prefork.so
+</IfModule>
+<IfModule !authz_core_module.c>
+	LoadModule authz_core_module $SVN_HTTPD_MODULE_PATH/mod_authz_core.so
+</IfModule>
+<IfModule !authz_user_module.c>
+	LoadModule authz_user_module $SVN_HTTPD_MODULE_PATH/mod_authz_user.so
+</IfModule>
+</IfVersion>
 <Location /$repo_base_path>
 	DAV svn
 	SVNPath "$rawsvnrepo"
+	<IfVersion >= 2.4>
+		<Limit NEVER$$>
+			Require valid-user
+		</Limit>
+	</IfVersion>
 </Location>
 EOF
 }
@@ -141,7 +163,16 @@ start_httpd () {
 stop_httpd () {
 	test -z "$SVN_HTTPD_PORT" && return
 	test ! -f "$GIT_DIR/httpd.conf" && return
+	httpd_pid=$(cat "$GIT_DIR"/httpd.pid)
 	"$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k stop
+	if test -n "$httpd_pid" && test "$httpd_pid" -gt 0
+	then
+		while kill -0 $httpd_pid 2>/dev/null
+		do
+			say "# waiting for httpd PID:$httpd_pid to exit"
+			sleep 1
+		done
+	fi
 }
 
 convert_to_rev_db () {
diff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh
index ecb1fed..d5e236c 100755
--- a/t/t9118-git-svn-funky-branch-names.sh
+++ b/t/t9118-git-svn-funky-branch-names.sh
@@ -32,15 +32,16 @@ test_expect_success 'setup svnrepo' '
 			"$svnrepo/pr ject/branches/trailing_dotlock.lock" &&
 	svn_cmd cp -m "reflog" "$svnrepo/pr ject/trunk" \
 			"$svnrepo/pr ject/branches/not-a@{0}reflog@" &&
+	# SVN 1.7 will truncate "not-a%40{0]" to just "not-a".
+	# Look at what SVN wound up naming the branch and use that.
+	# Be sure to escape the @ if it shows up.
+	non_reflog=$(svn_cmd ls "$svnrepo/pr ject/branches" | \
+			grep not-a | sed "s/\///" | sed "s/@/%40/") &&
 	start_httpd
 	'
 
-# SVN 1.7 will truncate "not-a%40{0]" to just "not-a".
-# Look at what SVN wound up naming the branch and use that.
-# Be sure to escape the @ if it shows up.
-non_reflog=$(svn_cmd ls "$svnrepo/pr ject/branches" | grep not-a | sed 's/\///' | sed 's/@/%40/')
-
 test_expect_success 'test clone with funky branch names' '
+	test -n "$non_reflog" &&
 	git svn clone -s "$svnrepo/pr ject" project &&
 	(
 		cd project &&
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-23  0:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-23  0:55 [PATCH 1/3] t/lib-git-svn: check same httpd module dirs as lib-httpd Eric Wong
2016-07-23  0:55 ` [PATCH 2/3] t/t91*: do not say how to avoid the tests Eric Wong
2016-07-23  0:55 ` [PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4 Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).