1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

selftest: Remove duplication between BUILDIR and BINDIR

Just have BINDIR, and have it default to ./bin

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2011-04-15 12:41:22 +10:00
parent cfb44f63a4
commit 4fd6ebf544
21 changed files with 29 additions and 32 deletions

View File

@ -14,7 +14,7 @@ TARGET=$4
shift 4
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
wbinfo="$VALGRIND $samba4bindir/wbinfo$EXEEXT"
. `dirname $0`/../../testprogs/blackbox/subunit.sh

View File

@ -26,7 +26,7 @@ selftest - Samba test runner
selftest --help
selftest [--srcdir=DIR] [--builddir=DIR] [--exeext=EXT][--target=samba4|samba3|win|kvm] [--socket-wrapper] [--quick] [--exclude=FILE] [--include=FILE] [--one] [--prefix=prefix] [--testlist=FILE] [TESTS]
selftest [--srcdir=DIR] [--bindir=DIR] [--exeext=EXT][--target=samba4|samba3|win|kvm] [--socket-wrapper] [--quick] [--exclude=FILE] [--include=FILE] [--one] [--prefix=prefix] [--testlist=FILE] [TESTS]
=head1 DESCRIPTION
@ -44,9 +44,9 @@ Show list of available options.
Source directory.
=item I<--builddir=DIR>
=item I<--bindir=DIR>
Build directory.
Built binaries directory.
=item I<--exeext=EXT>
@ -161,7 +161,7 @@ my $opt_load_list = undef;
my @testlists = ();
my $srcdir = ".";
my $builddir = ".";
my $bindir = "./bin";
my $exeext = "";
my $prefix = "./st";
@ -306,7 +306,7 @@ Generic options:
Paths:
--prefix=DIR prefix to run tests in [st]
--srcdir=DIR source directory [.]
--builddir=DIR output directory [.]
--bindir=DIR binaries directory [./bin]
--exeext=EXT executable extention []
Target Specific:
@ -343,7 +343,7 @@ my $result = GetOptions (
'exclude=s' => \@opt_exclude,
'include=s' => \@opt_include,
'srcdir=s' => \$srcdir,
'builddir=s' => \$builddir,
'bindir=s' => \$bindir,
'exeext=s' => \$exeext,
'verbose' => \$opt_verbose,
'testenv' => \$opt_testenv,
@ -376,7 +376,6 @@ unless (defined($ENV{VALGRIND})) {
# make all our python scripts unbuffered
$ENV{PYTHONUNBUFFERED} = 1;
my $bindir = "$builddir/bin";
my $bindir_abs = abs_path($bindir);
# Backwards compatibility:
@ -408,7 +407,6 @@ my $tmpdir_abs = abs_path("$prefix/tmp");
mkdir($tmpdir_abs, 0777) unless -d $tmpdir_abs;
my $srcdir_abs = abs_path($srcdir);
my $builddir_abs = abs_path($builddir);
die("using an empty absolute prefix isn't allowed") unless $prefix_abs ne "";
die("using '/' as absolute prefix isn't allowed") unless $prefix_abs ne "/";
@ -418,7 +416,6 @@ $ENV{KRB5CCNAME} = "$prefix/krb5ticket";
$ENV{PREFIX_ABS} = $prefix_abs;
$ENV{SRCDIR} = $srcdir;
$ENV{SRCDIR_ABS} = $srcdir_abs;
$ENV{BUILDDIR} = $builddir;
$ENV{BINDIR} = $bindir_abs;
$ENV{EXEEXT} = $exeext;

View File

@ -28,7 +28,7 @@ def source4dir():
return os.path.normpath(os.path.join(srcdir(), "source4"))
def bindir():
return os.path.normpath(os.path.join(os.getenv("BUILDDIR", "."), "bin"))
return os.path.normpath(os.getenv("BINDIR", "./bin"))
def binpath(name):
return os.path.join(bindir(), "%s%s" % (name, os.getenv("EXEEXT", "")))

View File

@ -20,7 +20,7 @@ st_test_done() {
if [ "x${RUN_FROM_BUILD_FARM}" = "xyes" ]; then
( rm -f ${SELFTESTPREFIX}/st_done && \
${PERL} ${SELFTESTDIR}/selftest.pl \
--builddir=. --prefix=${SELFTESTPREFIX} --target=samba3 \
--prefix=${SELFTESTPREFIX} --target=samba3 \
--testlist="${PYTHON} ${SOURCEDIR}/selftest/tests.py|" \
--exclude=${SOURCEDIR}/selftest/skip \
--srcdir="${SOURCEDIR}/.." \
@ -33,7 +33,7 @@ if [ "x${RUN_FROM_BUILD_FARM}" = "xyes" ]; then
else
( rm -f ${SELFTESTPREFIX}/st_done && \
${PERL} ${SELFTESTDIR}/selftest.pl \
--builddir=. --prefix=${SELFTESTPREFIX} --target=samba3 \
--prefix=${SELFTESTPREFIX} --target=samba3 \
--testlist="${PYTHON} ${SOURCEDIR}/selftest/tests.py|" \
--exclude=${SOURCEDIR}/selftest/skip \
--srcdir="${SOURCEDIR}/.." \

View File

@ -166,7 +166,7 @@ def cmd_testonly(opt):
os.makedirs(env.SELFTEST_PREFIX, int('755', 8))
# We use the full path rather than relative path because it cause problems on some plateforms (ie. solaris 8).
cmd = '(${PERL} ${srcdir}/selftest/selftest.pl --target=samba3 --prefix=${SELFTEST_PREFIX} --builddir=. --srcdir=${srcdir} --exclude=${srcdir}/source3/selftest/skip --testlist="${srcdir}/source3/selftest/tests.py|" ${OPTIONS} --socket-wrapper ${TESTS} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS} | tee ${SELFTEST_PREFIX}/subunit'
cmd = '(${PERL} ${srcdir}/selftest/selftest.pl --target=samba3 --prefix=${SELFTEST_PREFIX} --srcdir=${srcdir} --exclude=${srcdir}/source3/selftest/skip --testlist="${srcdir}/source3/selftest/tests.py|" ${OPTIONS} --socket-wrapper ${TESTS} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS} | tee ${SELFTEST_PREFIX}/subunit'
if os.environ.get('RUN_FROM_BUILD_FARM') is None and not Options.options.FILTERED_SUBUNIT:
cmd += ' | ${FORMAT_TEST_OUTPUT}'
else:

View File

@ -16,7 +16,7 @@ DOMAIN=$4
. `dirname $0`/../../../testprogs/blackbox/subunit.sh
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
DD="$samba4bindir/cifsdd$EXEEXT"
SHARE=tmp

View File

@ -18,7 +18,7 @@ PREFIX=$5
shift 5
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
smbclient="$samba4bindir/smbclient$EXEEXT"
. `dirname $0`/../../../testprogs/blackbox/subunit.sh

View File

@ -22,7 +22,7 @@ export SERVER=localdc1
export WINBINDD_SOCKET_DIR=$PWD/st/dc/winbindd_socket
export SELFTEST_PREFIX=$PWD/st
export DOMAIN=SAMBADOMAIN
export BUILDDIR=.
export BINDIR=./bin
export DC_SERVER_IP=127.0.0.1
export SELFTEST_INTERFACES=127.0.0.6/8,127.0.0.7/8,127.0.0.8/8,127.0.0.9/8,127.0.0.10/8,127.0.0.11/8
export SOCKET_WRAPPER_DIR=$PWD/st/w

View File

@ -169,7 +169,7 @@ def cmd_testonly(opt):
os.makedirs(env.SELFTEST_PREFIX, int('755', 8))
# We use the full path rather than relative path because it cause problems on some plateforms (ie. solaris 8).
cmd = '(${PERL} ${srcdir}/selftest/selftest.pl --prefix=${SELFTEST_PREFIX} --builddir=. --srcdir=${srcdir} --exclude=${srcdir}/source4/selftest/skip --testlist="${PYTHON} ${srcdir}/source4/selftest/tests.py|" ${OPTIONS} --socket-wrapper ${TESTS} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS} | tee ${SELFTEST_PREFIX}/subunit'
cmd = '(${PERL} ${srcdir}/selftest/selftest.pl --prefix=${SELFTEST_PREFIX} --srcdir=${srcdir} --exclude=${srcdir}/source4/selftest/skip --testlist="${PYTHON} ${srcdir}/source4/selftest/tests.py|" ${OPTIONS} --socket-wrapper ${TESTS} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS} | tee ${SELFTEST_PREFIX}/subunit'
if os.environ.get('RUN_FROM_BUILD_FARM') is None and not Options.options.FILTERED_SUBUNIT:
cmd += ' | ${FORMAT_TEST_OUTPUT}'
else:

View File

@ -18,7 +18,7 @@ PREFIX=$5
shift 5
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
gentest="$samba4bindir/gentest$EXEEXT"
. `dirname $0`/../../../testprogs/blackbox/subunit.sh

View File

@ -18,7 +18,7 @@ PREFIX=$5
shift 5
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
locktest="$samba4bindir/locktest$EXEEXT"
. `dirname $0`/../../../testprogs/blackbox/subunit.sh

View File

@ -18,7 +18,7 @@ PREFIX=$5
shift 5
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
masktest="$samba4bindir/masktest$EXEEXT"
. `dirname $0`/../../../testprogs/blackbox/subunit.sh

View File

@ -26,7 +26,7 @@ testit() {
return $status
}
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
nmblookup="$samba4bindir/nmblookup$EXEEXT"
testit "nmblookup -U \$SERVER_IP \$SERVER" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $SERVER

View File

@ -9,7 +9,7 @@ shift 4
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
smbclient="$samba4bindir/smbclient$EXEEXT"
samba_tool="$samba4bindir/samba-tool$EXEEXT"

View File

@ -20,7 +20,7 @@ PROVDIR=$7
shift 7
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
samba4srcdir="$SRCDIR/source4"
smbclient="$samba4bindir/smbclient$EXEEXT"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"

View File

@ -18,7 +18,7 @@ PREFIX=$5
shift 5
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
smbclient="$samba4bindir/smbclient$EXEEXT"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
samba_tool="$samba4bindir/samba-tool$EXEEXT"

View File

@ -20,7 +20,7 @@ ENCTYPE=$7
shift 7
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
samba4srcdir="$SRCDIR/source4"
smbclient="$samba4bindir/smbclient$EXEEXT"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"

View File

@ -13,8 +13,8 @@ shift 1
. `dirname $0`/subunit.sh
samba_tool="$BUILDDIR/bin/samba-tool"
samba4bindir="$BUILDDIR/bin"
samba_tool="$BINDIR/samba-tool"
samba4bindir="$BINDIR"
samba4srcdir="$SRCDIR/source4"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
@ -27,7 +27,7 @@ KRB5CCNAME="$PREFIX/tmpccache"
export KRB5CCNAME
echo "testp@ssw0Rd" >$PREFIX/tmppassfile
testit "kinit with passwd" $samba4kinit -e arcfour-hmac-md5 --password-file=$PREFIX/tmppassfile $TESTUSER@SAMBA.EXAMPLE.COM || failed=`expr $failed + 1`
testit "ktpass" $samba4srcdir/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BUILDDIR/bin|| failed=`expr $failed + 1`
testit "ktpass" $samba4srcdir/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BINDIR/bin|| failed=`expr $failed + 1`
rm -f $KRB5CCNAME

View File

@ -32,7 +32,7 @@ check() {
return $status
}
export PATH="$BUILDDIR/bin:$PATH"
export PATH="$BINDIR:$PATH"
ldbsearch="$VALGRIND ldbsearch$EXEEXT"

View File

@ -19,7 +19,7 @@ PREFIX=$6
shift 6
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
smbclient="$samba4bindir/smbclient$EXEEXT"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
samba_tool="$samba4bindir/samba-tool$EXEEXT"

View File

@ -20,7 +20,7 @@ ENCTYPE=$7
shift 7
failed=0
samba4bindir="$BUILDDIR/bin"
samba4bindir="$BINDIR"
samba4srcdir="$SRCDIR/source4"
smbclient="$samba4bindir/smbclient$EXEEXT"
samba4kinit="$samba4bindir/samba4kinit$EXEEXT"