mirror of
https://github.com/samba-team/samba.git
synced 2025-11-25 00:23:52 +03:00
r22575: move script/tests/ -> selftest/
as discussed with jelmer and abartlet metze
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
b5afec8b82
commit
e9fe3c40e1
@@ -283,7 +283,7 @@ realdistclean: distclean removebackup
|
||||
|
||||
check:: test
|
||||
|
||||
SELFTEST = $(PERL) $(srcdir)/script/tests/selftest.pl --prefix=${selftest_prefix} \
|
||||
SELFTEST = $(PERL) $(srcdir)/selftest/selftest.pl --prefix=${selftest_prefix} \
|
||||
--builddir=$(builddir) --srcdir=$(srcdir) \
|
||||
--expected-failures=$(srcdir)/samba4-knownfail \
|
||||
--skip=$(srcdir)/samba4-skip \
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# this runs tests that interact directly with the command-line tools rather than using the API
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
cat <<EOF
|
||||
Usage: test_blackbox.sh PREFIX [...]
|
||||
EOF
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
PREFIX=$1
|
||||
shift 1
|
||||
ADDARGS="$*"
|
||||
|
||||
incdir=`dirname $0`
|
||||
. $incdir/test_functions.sh
|
||||
|
||||
plantest "blackbox.smbclient" dc $incdir/../../../testprogs/blackbox/test_smbclient.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" "$ADDARGS"
|
||||
plantest "blackbox.kinit" dc $incdir/../../../testprogs/blackbox/test_kinit.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$REALM" "$PREFIX" "$ADDARGS"
|
||||
|
||||
plantest "blackbox.cifsdd" dc $incdir/../../../testprogs/blackbox/test_cifsdd.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$ADDARGS"
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
$SRCDIR/script/tests/test_ejs.sh $CONFIGURATION
|
||||
$SRCDIR/script/tests/test_ldap.sh
|
||||
$SRCDIR/script/tests/test_nbt.sh "dc"
|
||||
$SRCDIR/script/tests/test_rpc.sh
|
||||
$SRCDIR/script/tests/test_net.sh
|
||||
$SRCDIR/script/tests/test_session_key.sh
|
||||
$SRCDIR/script/tests/test_binding_string.sh
|
||||
$SRCDIR/script/tests/test_echo.sh
|
||||
$SRCDIR/script/tests/test_posix.sh
|
||||
$SRCDIR/script/tests/test_cifs.sh
|
||||
$SRCDIR/script/tests/test_local.sh
|
||||
$SRCDIR/script/tests/test_pidl.sh
|
||||
$SRCDIR/script/tests/test_blackbox.sh $PREFIX
|
||||
$SRCDIR/script/tests/test_simple.sh
|
||||
$SRCDIR/script/tests/test_s3upgrade.sh $PREFIX/upgrade
|
||||
$SRCDIR/script/tests/test_member.sh
|
||||
$SRCDIR/script/tests/test_nbt.sh "member"
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
TORTURE_QUICK="yes"
|
||||
export TORTURE_QUICK
|
||||
|
||||
$SRCDIR/script/tests/test_ejs.sh $CONFIGURATION
|
||||
$SRCDIR/script/tests/test_ldap.sh
|
||||
$SRCDIR/script/tests/test_nbt.sh
|
||||
$SRCDIR/script/tests/test_quick.sh
|
||||
$SRCDIR/script/tests/test_rpc_quick.sh
|
||||
@@ -27,4 +27,4 @@ clean::
|
||||
# Swig testing
|
||||
|
||||
swigtest: swig
|
||||
./script/tests/test_swig.sh
|
||||
./selftest/test_swig.sh
|
||||
|
||||
@@ -187,8 +187,8 @@ sub provision($$)
|
||||
my $username = `PATH=/usr/ucb:$ENV{PATH} whoami`;
|
||||
my $password = "test";
|
||||
|
||||
my $srcdir="$RealBin/../..";
|
||||
my $scriptdir="$srcdir/script/tests";
|
||||
my $srcdir="$RealBin/..";
|
||||
my $scriptdir="$srcdir/selftest";
|
||||
my $prefix_abs = abs_path($prefix);
|
||||
my $shrdir="$prefix_abs/tmp";
|
||||
my $libdir="$prefix_abs/lib";
|
||||
@@ -460,7 +460,7 @@ sub provision($$$$$$)
|
||||
my $dnsname = "samba.example.com";
|
||||
my $basedn = "dc=samba,dc=example,dc=com";
|
||||
my $root = ($ENV{USER} or $ENV{LOGNAME} or `whoami`);
|
||||
my $srcdir="$RealBin/../..";
|
||||
my $srcdir="$RealBin/..";
|
||||
-d $prefix or mkdir($prefix, 0777) or die("Unable to create $prefix");
|
||||
my $prefix_abs = abs_path($prefix);
|
||||
my $tmpdir = "$prefix_abs/tmp";
|
||||
@@ -29,7 +29,7 @@ sub provision($$$)
|
||||
|
||||
die ("$ENV{WINTESTCONF} could not be read.") if (! -r $ENV{WINTESTCONF});
|
||||
|
||||
$ENV{WINTEST_DIR}="$ENV{SRCDIR}/script/tests/win";
|
||||
$ENV{WINTEST_DIR}="$ENV{SRCDIR}/selftest/win";
|
||||
}
|
||||
|
||||
sub setup_env($$)
|
||||
@@ -470,7 +470,7 @@ unless (defined($ENV{VALGRIND})) {
|
||||
$ENV{MALLOC_CHECK_} = 2;
|
||||
}
|
||||
|
||||
my $old_pwd = "$RealBin/../..";
|
||||
my $old_pwd = "$RealBin/..";
|
||||
|
||||
# Backwards compatibility:
|
||||
if (defined($ENV{TEST_LDAP}) and $ENV{TEST_LDAP} eq "yes") {
|
||||
@@ -644,7 +644,7 @@ print "OPTIONS $ENV{TORTURE_OPTIONS}\n";
|
||||
|
||||
my @todo = ();
|
||||
|
||||
my $testsdir = "$srcdir/script/tests";
|
||||
my $testsdir = "$srcdir/selftest";
|
||||
$ENV{CONFIGURATION} = "--configfile=$conffile";
|
||||
|
||||
|
||||
22
source/selftest/test_blackbox.sh
Executable file
22
source/selftest/test_blackbox.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# this runs tests that interact directly with the command-line tools rather than using the API
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
cat <<EOF
|
||||
Usage: test_blackbox.sh PREFIX [...]
|
||||
EOF
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
PREFIX=$1
|
||||
shift 1
|
||||
ADDARGS="$*"
|
||||
|
||||
incdir=`dirname $0`
|
||||
. $incdir/test_functions.sh
|
||||
|
||||
plantest "blackbox.smbclient" dc $incdir/../../testprogs/blackbox/test_smbclient.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" "$ADDARGS"
|
||||
plantest "blackbox.kinit" dc $incdir/../../testprogs/blackbox/test_kinit.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$REALM" "$PREFIX" "$ADDARGS"
|
||||
|
||||
plantest "blackbox.cifsdd" dc $incdir/../../testprogs/blackbox/test_cifsdd.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$ADDARGS"
|
||||
@@ -16,7 +16,7 @@ export PATH
|
||||
mkdir -p $PREFIX
|
||||
rm -f $PREFIX/*
|
||||
|
||||
. script/tests/test_functions.sh
|
||||
. selftest/test_functions.sh
|
||||
|
||||
plantest "parse samba3" none bin/smbscript ../testdata/samba3/verify $CONFIGURATION ../testdata/samba3
|
||||
#plantest "upgrade" none bin/smbscript setup/upgrade $CONFIGURATION --verify --targetdir=$PREFIX ../testdata/samba3 ../testdata/samba3/smb.conf
|
||||
@@ -5,12 +5,11 @@ use FindBin qw($RealBin);
|
||||
use lib $RealBin;
|
||||
use Samba4;
|
||||
|
||||
my $s = new Samba4($RealBin."/../../bin", undef, $RealBin."/../../setup");
|
||||
my $s = new Samba4($RealBin."/../bin", undef, $RealBin."/../setup");
|
||||
|
||||
ok($s);
|
||||
|
||||
is($RealBin."/../../bin", $s->{bindir});
|
||||
|
||||
is($RealBin."/../bin", $s->{bindir});
|
||||
|
||||
ok($s->write_ldb_file("tmpldb", "
|
||||
dn: a=b
|
||||
@@ -7,7 +7,7 @@
|
||||
# Copyright Brad Henry <brad@samba.org> 2006
|
||||
# Released under the GNU GPL v2 or later.
|
||||
|
||||
. script/tests/test_functions.sh
|
||||
. selftest/test_functions.sh
|
||||
|
||||
export SMBTORTURE_REMOTE_HOST=`perl -I$WINTEST_DIR $WINTEST_DIR/vm_get_ip.pl VM_CFG_PATH`
|
||||
if [ -z $SMBTORTURE_REMOTE_HOST ]; then
|
||||
18
source/selftest/tests_all.sh
Executable file
18
source/selftest/tests_all.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
$SRCDIR/selftest/test_ejs.sh $CONFIGURATION
|
||||
$SRCDIR/selftest/test_ldap.sh
|
||||
$SRCDIR/selftest/test_nbt.sh "dc"
|
||||
$SRCDIR/selftest/test_rpc.sh
|
||||
$SRCDIR/selftest/test_net.sh
|
||||
$SRCDIR/selftest/test_session_key.sh
|
||||
$SRCDIR/selftest/test_binding_string.sh
|
||||
$SRCDIR/selftest/test_echo.sh
|
||||
$SRCDIR/selftest/test_posix.sh
|
||||
$SRCDIR/selftest/test_cifs.sh
|
||||
$SRCDIR/selftest/test_local.sh
|
||||
$SRCDIR/selftest/test_pidl.sh
|
||||
$SRCDIR/selftest/test_blackbox.sh $PREFIX
|
||||
$SRCDIR/selftest/test_simple.sh
|
||||
$SRCDIR/selftest/test_s3upgrade.sh $PREFIX/upgrade
|
||||
$SRCDIR/selftest/test_member.sh
|
||||
$SRCDIR/selftest/test_nbt.sh "member"
|
||||
9
source/selftest/tests_quick.sh
Executable file
9
source/selftest/tests_quick.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
TORTURE_QUICK="yes"
|
||||
export TORTURE_QUICK
|
||||
|
||||
$SRCDIR/selftest/test_ejs.sh $CONFIGURATION
|
||||
$SRCDIR/selftest/test_ldap.sh
|
||||
$SRCDIR/selftest/test_nbt.sh
|
||||
$SRCDIR/selftest/test_quick.sh
|
||||
$SRCDIR/selftest/test_rpc_quick.sh
|
||||
@@ -21,10 +21,10 @@
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export WINTEST_DIR=$SRCDIR/script/tests/win
|
||||
export WINTEST_DIR=$SRCDIR/selftest/win
|
||||
export TMPDIR=$TMPDIR
|
||||
export NETBIOSNAME=$NETBIOSNAME
|
||||
|
||||
. $WINTESTCONF
|
||||
|
||||
$SRCDIR/script/tests/test_win.sh
|
||||
$SRCDIR/selftest/test_win.sh
|
||||
@@ -11,12 +11,12 @@ if [ ! -r $WINTESTCONF ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. script/tests/test_functions.sh
|
||||
. selftest/test_functions.sh
|
||||
|
||||
export SRCDIR=$SRCDIR
|
||||
|
||||
tests="RPC-DRSUAPI RPC-SPOOLSS ncacn_np ncacn_ip_tcp"
|
||||
|
||||
for name in $tests; do
|
||||
testit $name rpc $SRCDIR/script/tests/win/wintest_2k3_dc.sh $name
|
||||
testit $name rpc $SRCDIR/selftest/win/wintest_2k3_dc.sh $name
|
||||
done
|
||||
@@ -77,7 +77,7 @@ difference is that we will need to run these tests as root. To run the
|
||||
Windows tests in the build farm, a .fns file will need to be created for
|
||||
your new host that exports a WINTESTCONF environment variable pointing to a
|
||||
config file used by 'make wintest'. An example of this config file can be
|
||||
found at source/script/tests/win/test_win.conf in the Samba 4 source tree.
|
||||
found at source/selftest/win/test_win.conf in the Samba 4 source tree.
|
||||
|
||||
I've also included the bnhtest.fns file that I'm using for my build farm host
|
||||
below, as an example. It was modified from generic.fns.
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
. script/tests/test_functions.sh
|
||||
. selftest/test_functions.sh
|
||||
|
||||
. script/tests/win/wintest_functions.sh
|
||||
. selftest/win/wintest_functions.sh
|
||||
|
||||
# This variable is defined in the per-hosts .fns file.
|
||||
. $WINTESTCONF
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
. script/tests/test_functions.sh
|
||||
. selftest/test_functions.sh
|
||||
|
||||
. script/tests/win/wintest_functions.sh
|
||||
. selftest/win/wintest_functions.sh
|
||||
|
||||
# This variable is defined in the per-hosts .fns file.
|
||||
. $WINTESTCONF
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
. script/tests/test_functions.sh
|
||||
. selftest/test_functions.sh
|
||||
|
||||
. script/tests/win/wintest_functions.sh
|
||||
. selftest/win/wintest_functions.sh
|
||||
|
||||
# This variable is defined in the per-hosts .fns file.
|
||||
. $WINTESTCONF
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
. script/tests/test_functions.sh
|
||||
. selftest/test_functions.sh
|
||||
|
||||
. script/tests/win/wintest_functions.sh
|
||||
. selftest/win/wintest_functions.sh
|
||||
|
||||
# This variable is defined in the per-hosts .fns file.
|
||||
. $WINTESTCONF
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
. script/tests/test_functions.sh
|
||||
. selftest/test_functions.sh
|
||||
|
||||
. script/tests/win/wintest_functions.sh
|
||||
. selftest/win/wintest_functions.sh
|
||||
|
||||
# This variable is defined in the per-hosts .fns file.
|
||||
. $WINTESTCONF
|
||||
Reference in New Issue
Block a user