r22575: move script/tests/ -> selftest/
authorStefan Metzmacher <metze@samba.org>
Sun, 29 Apr 2007 20:37:59 +0000 (20:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:51:46 +0000 (14:51 -0500)
as discussed with jelmer and abartlet

metze
(This used to be commit e9fe3c40e10accb63d7a2124d3a7e77e499c4209)

57 files changed:
source4/main.mk
source4/script/tests/test_blackbox.sh [deleted file]
source4/script/tests/tests_all.sh [deleted file]
source4/script/tests/tests_quick.sh [deleted file]
source4/scripting/swig/config.mk
source4/selftest/README [moved from source4/script/tests/README with 100% similarity]
source4/selftest/Samba3.pm [moved from source4/script/tests/Samba3.pm with 99% similarity]
source4/selftest/Samba4.pm [moved from source4/script/tests/Samba4.pm with 99% similarity]
source4/selftest/SocketWrapper.pm [moved from source4/script/tests/SocketWrapper.pm with 100% similarity]
source4/selftest/TODO [moved from source4/script/tests/TODO with 100% similarity]
source4/selftest/Windows.pm [moved from source4/script/tests/Windows.pm with 93% similarity]
source4/selftest/mk-keyblobs.sh [moved from source4/script/tests/mk-keyblobs.sh with 100% similarity]
source4/selftest/selftest.pl [moved from source4/script/tests/selftest.pl with 99% similarity]
source4/selftest/test_binding_string.sh [moved from source4/script/tests/test_binding_string.sh with 100% similarity]
source4/selftest/test_blackbox.sh [new file with mode: 0755]
source4/selftest/test_cifs.sh [moved from source4/script/tests/test_cifs.sh with 100% similarity]
source4/selftest/test_echo.sh [moved from source4/script/tests/test_echo.sh with 100% similarity]
source4/selftest/test_ejs.sh [moved from source4/script/tests/test_ejs.sh with 100% similarity]
source4/selftest/test_functions.sh [moved from source4/script/tests/test_functions.sh with 100% similarity]
source4/selftest/test_ldap.sh [moved from source4/script/tests/test_ldap.sh with 100% similarity]
source4/selftest/test_local.sh [moved from source4/script/tests/test_local.sh with 100% similarity]
source4/selftest/test_member.sh [moved from source4/script/tests/test_member.sh with 100% similarity]
source4/selftest/test_nbt.sh [moved from source4/script/tests/test_nbt.sh with 100% similarity]
source4/selftest/test_net.sh [moved from source4/script/tests/test_net.sh with 100% similarity]
source4/selftest/test_pidl.sh [moved from source4/script/tests/test_pidl.sh with 100% similarity]
source4/selftest/test_posix.sh [moved from source4/script/tests/test_posix.sh with 100% similarity]
source4/selftest/test_quick.sh [moved from source4/script/tests/test_quick.sh with 100% similarity]
source4/selftest/test_rpc.sh [moved from source4/script/tests/test_rpc.sh with 100% similarity]
source4/selftest/test_rpc_quick.sh [moved from source4/script/tests/test_rpc_quick.sh with 100% similarity]
source4/selftest/test_s3upgrade.sh [moved from source4/script/tests/test_s3upgrade.sh with 93% similarity]
source4/selftest/test_samba4.pl [moved from source4/script/tests/test_samba4.pl with 61% similarity]
source4/selftest/test_session_key.sh [moved from source4/script/tests/test_session_key.sh with 100% similarity]
source4/selftest/test_simple.sh [moved from source4/script/tests/test_simple.sh with 100% similarity]
source4/selftest/test_swig.sh [moved from source4/script/tests/test_swig.sh with 100% similarity]
source4/selftest/test_w2k3.sh [moved from source4/script/tests/test_w2k3.sh with 100% similarity]
source4/selftest/test_w2k3_file.sh [moved from source4/script/tests/test_w2k3_file.sh with 100% similarity]
source4/selftest/test_win.sh [moved from source4/script/tests/test_win.sh with 97% similarity]
source4/selftest/tests_all.sh [new file with mode: 0755]
source4/selftest/tests_quick.sh [new file with mode: 0755]
source4/selftest/tests_win.sh [moved from source4/script/tests/tests_win.sh with 88% similarity]
source4/selftest/tests_win2k3_dc.sh [moved from source4/script/tests/tests_win2k3_dc.sh with 77% similarity]
source4/selftest/win/README [moved from source4/script/tests/win/README with 98% similarity]
source4/selftest/win/VMHost.pm [moved from source4/script/tests/win/VMHost.pm with 100% similarity]
source4/selftest/win/common.exp [moved from source4/script/tests/win/common.exp with 100% similarity]
source4/selftest/win/test_win.conf [moved from source4/script/tests/win/test_win.conf with 100% similarity]
source4/selftest/win/vm_get_ip.pl [moved from source4/script/tests/win/vm_get_ip.pl with 100% similarity]
source4/selftest/win/vm_load_snapshot.pl [moved from source4/script/tests/win/vm_load_snapshot.pl with 100% similarity]
source4/selftest/win/wintest_2k3_dc.sh [moved from source4/script/tests/win/wintest_2k3_dc.sh with 100% similarity]
source4/selftest/win/wintest_base.sh [moved from source4/script/tests/win/wintest_base.sh with 94% similarity]
source4/selftest/win/wintest_client.exp [moved from source4/script/tests/win/wintest_client.exp with 100% similarity]
source4/selftest/win/wintest_client.sh [moved from source4/script/tests/win/wintest_client.sh with 88% similarity]
source4/selftest/win/wintest_functions.sh [moved from source4/script/tests/win/wintest_functions.sh with 100% similarity]
source4/selftest/win/wintest_net.sh [moved from source4/script/tests/win/wintest_net.sh with 95% similarity]
source4/selftest/win/wintest_raw.sh [moved from source4/script/tests/win/wintest_raw.sh with 94% similarity]
source4/selftest/win/wintest_remove.exp [moved from source4/script/tests/win/wintest_remove.exp with 100% similarity]
source4/selftest/win/wintest_rpc.sh [moved from source4/script/tests/win/wintest_rpc.sh with 95% similarity]
source4/selftest/win/wintest_setup.exp [moved from source4/script/tests/win/wintest_setup.exp with 100% similarity]

index 36a18060dff33abdda8ec21d73f0d40819cfd6af..8d1f0467aef637be84709f326eae4400cb404b51 100644 (file)
@@ -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 \
diff --git a/source4/script/tests/test_blackbox.sh b/source4/script/tests/test_blackbox.sh
deleted file mode 100755 (executable)
index 1cab39c..0000000
+++ /dev/null
@@ -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"
diff --git a/source4/script/tests/tests_all.sh b/source4/script/tests/tests_all.sh
deleted file mode 100755 (executable)
index 7fb6efc..0000000
+++ /dev/null
@@ -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"
diff --git a/source4/script/tests/tests_quick.sh b/source4/script/tests/tests_quick.sh
deleted file mode 100755 (executable)
index 9c57f8b..0000000
+++ /dev/null
@@ -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
index 38c7afadd534d41d1da24b02f3ff5db12f5100bd..61e808126868e1834c6bdc1026575b3b12be57c1 100644 (file)
@@ -27,4 +27,4 @@ clean::
 # Swig testing
 
 swigtest: swig
-       ./script/tests/test_swig.sh
+       ./selftest/test_swig.sh
similarity index 99%
rename from source4/script/tests/Samba3.pm
rename to source4/selftest/Samba3.pm
index 8e11f4cee9f19a29057002490eef38e01030b36f..b12208bd9f72f754b79b8df8a077141e7f36fc1e 100644 (file)
@@ -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";
similarity index 99%
rename from source4/script/tests/Samba4.pm
rename to source4/selftest/Samba4.pm
index 36550e35f3ee6f8a53494369380e2702b34a14d5..acf5ceef3e5f130aabaef45ae2f1e0a71c57f806 100644 (file)
@@ -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";
similarity index 93%
rename from source4/script/tests/Windows.pm
rename to source4/selftest/Windows.pm
index 710ffeda1491d756b82981c083e56d823cfc1167..d0c90d7f7b5212316b2f681efb250456547b0ff2 100644 (file)
@@ -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($$)
similarity index 99%
rename from source4/script/tests/selftest.pl
rename to source4/selftest/selftest.pl
index 1d70a4fa52636bc73487ef2f47071cbaedbd7f2c..104fc7d15fad78f1791316cb2db1840fc8af7681 100755 (executable)
@@ -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";
 
 
diff --git a/source4/selftest/test_blackbox.sh b/source4/selftest/test_blackbox.sh
new file mode 100755 (executable)
index 0000000..6397918
--- /dev/null
@@ -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"
similarity index 93%
rename from source4/script/tests/test_s3upgrade.sh
rename to source4/selftest/test_s3upgrade.sh
index df7ae43c2aa58ebb10ded00db7c922db1954fac7..1ed43cb8ebee365cfbc92b674803b069ae4bc4ba 100755 (executable)
@@ -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
similarity index 61%
rename from source4/script/tests/test_samba4.pl
rename to source4/selftest/test_samba4.pl
index 8476e6e38f70d5ca0c828085991953b73ffd9e1b..f2935be66bcd85d349cdcdb218cba54d0a173b74 100755 (executable)
@@ -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
similarity index 97%
rename from source4/script/tests/test_win.sh
rename to source4/selftest/test_win.sh
index 56d96c041c9506279f2c828fb132ee38840e8402..4e5558c20661c21529a95bc1136970d43e928fa5 100755 (executable)
@@ -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
diff --git a/source4/selftest/tests_all.sh b/source4/selftest/tests_all.sh
new file mode 100755 (executable)
index 0000000..7a1167e
--- /dev/null
@@ -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"
diff --git a/source4/selftest/tests_quick.sh b/source4/selftest/tests_quick.sh
new file mode 100755 (executable)
index 0000000..bb3065b
--- /dev/null
@@ -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
similarity index 88%
rename from source4/script/tests/tests_win.sh
rename to source4/selftest/tests_win.sh
index e25c29d4c9bf3d73fe5d8710064d592310765409..19460eee0ed092a5c735eff98c246362f2d27e30 100755 (executable)
        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
similarity index 77%
rename from source4/script/tests/tests_win2k3_dc.sh
rename to source4/selftest/tests_win2k3_dc.sh
index 5e22c37e97052da9baf1759ebf1054613fd69b13..290a4ef66676b926d22c91f3b704d7d1449ab58c 100755 (executable)
@@ -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
similarity index 98%
rename from source4/script/tests/win/README
rename to source4/selftest/win/README
index 06b64e5b025068c4bd41e98f5d62179e7473e882..fc934385c4d849745aa95fc3963efb084d684e7d 100644 (file)
@@ -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.
similarity index 94%
rename from source4/script/tests/win/wintest_base.sh
rename to source4/selftest/win/wintest_base.sh
index b12d2923f73323c091fc859bf61ca636fea920d9..b78da4f7c9592929bcddee3b13489904447a1491 100755 (executable)
@@ -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
similarity index 88%
rename from source4/script/tests/win/wintest_client.sh
rename to source4/selftest/win/wintest_client.sh
index 42fbc5c8052b59d30d49776166275c1e68fb835b..6b76ae36f7ff56874941e61ffd5062d65c16c92a 100755 (executable)
@@ -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
similarity index 95%
rename from source4/script/tests/win/wintest_net.sh
rename to source4/selftest/win/wintest_net.sh
index 9cd10ad2e0cef49abb82ee5c19afbf99bedf7023..88cec1f3a79abbf3072fcb3ebbe5f4ec34c1f56f 100755 (executable)
@@ -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
similarity index 94%
rename from source4/script/tests/win/wintest_raw.sh
rename to source4/selftest/win/wintest_raw.sh
index 919434315320e5314d5786143cf277ca9e5546d9..541e19829ab37dc0059a200c869eeebaf0d89f19 100755 (executable)
@@ -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
similarity index 95%
rename from source4/script/tests/win/wintest_rpc.sh
rename to source4/selftest/win/wintest_rpc.sh
index f026602a6c335af9dceeb6f74f152b2a94dba1c0..d0a0783c2ee0cd2c8ffe4aadcdd8ed785973ba7b 100755 (executable)
@@ -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