mirror of
https://github.com/samba-team/samba.git
synced 2025-07-23 20:59:10 +03:00
s4-test: fixed setup/ assumption for top level build
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
@ -20,11 +20,11 @@
|
||||
"""Tests for samba.provision."""
|
||||
|
||||
import os
|
||||
from samba.provision import setup_secretsdb, findnss, ProvisionPaths
|
||||
from samba.provision import setup_secretsdb, findnss, ProvisionPaths, find_setup_dir
|
||||
import samba.tests
|
||||
from samba.tests import env_loadparm, TestCase
|
||||
|
||||
setup_dir = "setup"
|
||||
setup_dir = find_setup_dir()
|
||||
def setup_path(file):
|
||||
return os.path.join(setup_dir, file)
|
||||
|
||||
|
@ -26,8 +26,11 @@ from samba.samba3 import (WinsDatabase, SmbpasswdFile, ACB_NORMAL,
|
||||
from samba.tests import TestCase
|
||||
import os
|
||||
|
||||
DATADIR = os.path.join(os.path.dirname(__file__),
|
||||
"../../../../../testdata/samba3")
|
||||
for p in [ "../../../../../testdata/samba3", "../../../../testdata/samba3" ]:
|
||||
DATADIR = os.path.join(os.path.dirname(__file__), p)
|
||||
if os.path.exists(DATADIR):
|
||||
break
|
||||
|
||||
|
||||
class RegistryTestCase(TestCase):
|
||||
|
||||
|
@ -31,10 +31,14 @@ import samba.dcerpc.security
|
||||
import samba.ndr
|
||||
from samba.auth import system_session
|
||||
|
||||
datadir = os.path.join(os.path.dirname(__file__),
|
||||
"../../../../../testdata/samba3")
|
||||
|
||||
def read_datafile(filename):
|
||||
paths = [ "../../../../../testdata/samba3",
|
||||
"../../../../testdata/samba3" ]
|
||||
for p in paths:
|
||||
datadir = os.path.join(os.path.dirname(__file__), p)
|
||||
if os.path.exists(datadir):
|
||||
break
|
||||
return open(os.path.join(datadir, filename), 'r').read()
|
||||
|
||||
def ldb_debug(l, text):
|
||||
|
Reference in New Issue
Block a user