diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-10-01 01:31:06 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-10-01 01:31:06 +0000 |
commit | fbee3586fdd6f04db6321646df54c147c843a5e3 (patch) | |
tree | ed14f8c3aa9bad4702b8e044bcf385707f33e76c | |
parent | dc65824065fea3e6ca9ddedd4b118d26d338ee6e (diff) | |
download | samba-fbee3586fdd6f04db6321646df54c147c843a5e3.tar.gz samba-fbee3586fdd6f04db6321646df54c147c843a5e3.tar.bz2 samba-fbee3586fdd6f04db6321646df54c147c843a5e3.zip |
selftest: Let selftest provide the tempdir, rather than creating it as sideeffect of tests.py.
-rwxr-xr-x | selftest/selftest.pl | 4 | ||||
-rwxr-xr-x | source4/selftest/tests.py | 7 | ||||
-rwxr-xr-x | source4/setup/upgrade_from_s3 | 1 |
3 files changed, 6 insertions, 6 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 33af5e29b7..d102d43779 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -399,6 +399,9 @@ die("using an empty prefix isn't allowed") unless $prefix ne ""; mkdir($prefix, 0777) unless -d $prefix; my $prefix_abs = abs_path($prefix); +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); @@ -658,6 +661,7 @@ if ($#testlists == -1) { } $ENV{SELFTEST_PREFIX} = "$prefix_abs"; +$ENV{SELFTEST_TMPDIR} = "$tmpdir_abs"; if ($opt_socket_wrapper) { $ENV{SELFTEST_INTERFACES} = $interfaces; } else { diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 63a4bcfd85..1913c40c28 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -152,7 +152,7 @@ bbdir = "../testprogs/blackbox" configuration = "--configfile=$SMB_CONF_PATH" -torture_options = [configuration, "--maximum-runtime=$SELFTEST_MAXTIME", "--target=$SELFTEST_TARGET", "--basedir=$SELFTEST_PREFIX/s4client"] +torture_options = [configuration, "--maximum-runtime=$SELFTEST_MAXTIME", "--target=$SELFTEST_TARGET", "--basedir=$SELFTEST_TMPDIR"] if not os.getenv("SELFTEST_VERBOSE"): torture_options.append("--option=torture:progress=no") torture_options.append("--format=subunit") @@ -485,10 +485,7 @@ planpythontestsuite("none", "samba.tests.ntacls") plantestsuite("samba4.deletetest.python(dc)", "dc", ['PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools', python, os.path.join(samba4srcdir, "dsdb/tests/python/deletetest.py"), '$SERVER', '-U"$USERNAME%$PASSWORD','-W', '$DOMAIN']) plantestsuite("samba4.policy.python", "none", ['PYTHONPATH="$PYTHONPATH:lib/policy/tests/python"', subunitrun, 'bindings']) plantestsuite("samba4.blackbox.samba3dump", "none", [python, os.path.join(samba4srcdir, "scripting/bin/samba3dump"), os.path.join(samba4srcdir, "../testdata/samba3")]) -os.system("rm -rf $PREFIX/upgrade") -plantestsuite("samba4.blackbox.upgrade", "none", [python, os.path.join(samba4srcdir, "setup/upgrade_from_s3"), "--targetdir=$PREFIX/upgrade", os.path.normpath(os.path.join(samba4srcdir, "../testdata/samba3")), os.path.normpath(os.path.join(samba4srcdir, "../testdata/samba3/smb.conf"))]) -os.system("rm -rf $PREFIX/provision") # FIXME -os.system("mkdir $PREFIX/provision") # FIXME +plantestsuite("samba4.blackbox.upgrade", "none", ["rm -rf $PREFIX/upgrade;", python, os.path.join(samba4srcdir, "setup/upgrade_from_s3"), "--targetdir=$PREFIX/upgrade", os.path.normpath(os.path.join(samba4srcdir, "../testdata/samba3")), os.path.normpath(os.path.join(samba4srcdir, "../testdata/samba3/smb.conf"))]) plantestsuite("samba4.blackbox.provision.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_provision.sh"), '$PREFIX/provision']) plantestsuite("samba4.blackbox.provision-backend.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_provision-backend.sh"), '$PREFIX/provision']) plantestsuite("samba4.blackbox.upgradeprovision.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_upgradeprovision.sh"), '$PREFIX/provision']) diff --git a/source4/setup/upgrade_from_s3 b/source4/setup/upgrade_from_s3 index cdc59dc9eb..a7bc6f0abd 100755 --- a/source4/setup/upgrade_from_s3 +++ b/source4/setup/upgrade_from_s3 @@ -46,7 +46,6 @@ parser.add_option("--targetdir", type="string", metavar="DIR", opts, args = parser.parse_args() - logger = logging.getLogger("upgrade") logger.addHandler(logging.StreamHandler(sys.stdout)) if opts.quiet: |