diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index de384e6ac3a125e59156abbf897a3371f736bbfa..56549623430ca6bea2de35bbae7d2d211720da3b 100644 (file)
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
then
say 'skipping git svn tests, NO_SVN_TESTS defined'
test_done
- exit
+fi
+if ! test_have_prereq PERL; then
+ say 'skipping git svn tests, perl not available'
+ test_done
fi
GIT_DIR=$PWD/.git
then
say 'skipping git svn tests, svn not found'
test_done
- exit
fi
svnrepo=$PWD/svnrepo
export svnrepo
+svnconf=$PWD/svnconf
+export svnconf
perl -w -e "
use SVN::Core;
fi
say "$err"
test_done
- exit
fi
rawsvnrepo="$svnrepo"
test-chmtime +1 "$1"
}
+# We need this, because we should pass empty configuration directory to
+# the 'svn commit' to avoid automated property changes and other stuff
+# that could be set from user's configuration files in ~/.subversion.
+svn_cmd () {
+ [ -d "$svnconf" ] || mkdir "$svnconf"
+ orig_svncmd="$1"; shift
+ if [ -z "$orig_svncmd" ]; then
+ svn
+ return
+ fi
+ svn "$orig_svncmd" --config-dir "$svnconf" "$@"
+}
+
for d in \
"$SVN_HTTPD_PATH" \
/usr/sbin/apache2 \
then
say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
test_done
- exit
fi
}