4
# Root of the test tree
6
TEST_ROOT="/home/brane/svn"
8
# Installation path, everything under that is considered
10
INST_DIR="$TEST_ROOT/inst"
13
# Repository paths and projects name
15
# installation paths are expected to be:
16
# '$INST_DIR/<proj_name>, so take care of your
17
# $CONFIG_PREFIX.<proj_name> files.
18
# Everything in those directories will be wiped out
19
# by installation procedure. See svntest-rebuild-generic.sh
21
SVN_NAME=${SVN_NAME:="svn"}
22
SVN_REPO=${SVN_REPO:="$TEST_ROOT/$SVN_NAME"}
24
APR_NAME=${APR_NAME:="apr-0.9"}
25
APR_REPO=${ARP_REPO:="$TEST_ROOT/$APR_NAME"}
27
APU_NAME=${APU_NAME:="apr-util-0.9"}
28
APU_REPO=${APU_REPO:="$TEST_ROOT/$APU_NAME"}
30
HTTPD_NAME=${HTTPD_NAME:="httpd-2.0"}
31
HTTPD_REPO=${HTTPD_REPO:="$TEST_ROOT/$HTTPD_NAME"}
40
# Whether to test the BDB backend, TEST_FSFS=<yes|no>
42
TEST_BDB=${TEST_BDB:="yes"}
45
# Whether to test the FSFS backend, TEST_FSFS=<yes|no>
47
TEST_FSFS=${TEST_FSFS:="yes"}
50
# Whether to test various bindings
52
TEST_BINDINGS_SWIG_PERL=${TEST_BINDINGS_SWIG_PERL:="no"}
53
TEST_BINDINGS_JAVAHL=${TEST_BINDINGS_JAVAHL:="no"}
54
TEST_BINDINGS_SWIG_PYTHON=${TEST_BINDINGS_SWIG_PYTHON:="no"}
56
# This should correspond with your httpd Listen directive
57
RA_DAV_CHECK_ARGS="BASE_URL=http://localhost:42024"
60
# Log file name prefix
62
LOG_FILE_DIR="$TEST_ROOT/logs/$SVN_NAME"
63
LOG_FILE_PREFIX="$LOG_FILE_DIR/LOG_svntest"
66
# Configure script prefix and object directory names
68
CONFIG_PREFIX="config"
73
# E-mail addresses for reporting
76
TO="svn-breakage@subversion.tigris.org"
77
ERROR_TO="brane@hermes.si"
78
REPLY_TO="dev@subversion.tigris.org"
85
LOCALBIN="/usr/local/bin"
89
# Statically linked svn binary (used for repository updates)
90
SVN="$TEST_ROOT/static/bin/svn"
92
# CVS binary (used for updating APR & friends)
95
# Path to config.guess (used for generating the mail subject line)
96
GUESS="/usr/share/libtool/config.guess"
99
SENDMAIL="/usr/sbin/sendmail"
101
# A program used to base64 encode standard input. Two choices are
102
# 1) The encode-base64 script that comes with the Perl MIME::Base64
104
# ftp://ftp.funet.fi/pub/CPAN/modules/by-module/MIME/
106
# To install, get the latest MIME-Base64-X.YY.tar.gz and run
110
# make install UNINST=1
112
# Uncomment here if you use this base64 encoder:
114
# BASE64="$PERLBIN/encode-base64"
117
# 2) A pre-compiled Windows base64.exe binary for Windows users. C
118
# source code for other OSes. Available at
119
# http://www.fourmilab.ch/webtools/base64/
121
# No instructions needed. If you can compile and test Subversion,
122
# then you can compile this :)
124
# Uncomment here if you use this base64 encoder:
126
# BASE64="$USRBIN/base64"
127
# BASE64_E="$BASE64 -e - -"
153
TAIL_100="$TAIL -n 100"
154
TOUCH="$USRBIN/touch"
158
# Branch prefix for the e-mail subject
160
REVPREFIX=`$SVN info $SVN_REPO | $SED -ne 's@^URL:.*/repos/svn/\(branches/\)*\(.*\)$@\2 r@p'`
163
# Revision number for the e-mail subject
165
REVISION=`$SVN info $SVN_REPO | $SED -ne 's@^Revision: \(.*\)$@\1@p'`
180
echo "FAIL: $TST" >> $LOG_FILE
181
test -n "$1" && eval "$1" "$@" # Run cleanup code
182
umount_ramdisk "$TEST_ROOT/$OBJ_STATIC/subversion/tests"
183
umount_ramdisk "$TEST_ROOT/$OBJ_SHARED/subversion/tests"
189
echo "PASS: $TST" >> $LOG_FILE
192
# Copy a partial log to the main log file
195
echo "Last 100 lines of the log file follow:" >> $LOG_FILE
196
$TAIL_100 "$1" >> $LOG_FILE 2>&1
199
SAVED_LOG="$1.failed"
201
SAVED_LOG="$1.$REV.failed"
203
$CP "$1" "$SAVED_LOG" >> $LOG_FILE 2>&1
204
echo "Complete log saved in $SAVED_LOG" >> $LOG_FILE
207
# Mount ramdisk conditionally
209
# i) RAMDISK is defined
210
# ii) Ramdisk isn't already mounted
213
if test "xyes" = "x$RAMDISK";
215
test -z "$mount_dir" && return 1
217
test -f "$mount_dir/.ramdisk" && {
218
echo "Warning: ramdisk exists"
222
$MOUNT "$mount_dir" || return 1
223
$TOUCH "$mount_dir/.ramdisk" || return 1
230
if test "xyes" = "x$RAMDISK";
232
test -z "$mount_dir" && return 1
234
test -f "$mount_dir/.ramdisk" && {
235
$UMOUNT "$mount_dir" >> /dev/null 2>&1 || return 1
242
# Re-initialize ramdisk if it is currently unmounted.
244
reinitialize_ramdisk () {
245
test -x "$TEST_ROOT/$OBJ/subversion/tests/clients" || {
246
START "re-initializing ramdisk" "Re-initializing ramdisk"
247
mount_ramdisk "$TEST_ROOT/$OBJ/subversion/tests" \
248
>> "$LOG_FILE" 2>&1 || FAIL
250
$MAKE mkdir-init > "$LOG_FILE.ramdisk" 2>&1
252
FAIL_LOG "$LOG_FILE.ramdisk"
255
$MAKE $MAKE_OPTS > "$LOG_FILE.ramdisk" 2>&1
257
FAIL_LOG "$LOG_FILE.ramdisk"