summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/tests/samba3sam.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-02-03 17:35:54 +1100
committerAndrew Tridgell <tridge@samba.org>2011-02-07 13:22:01 +1100
commit677f28d8b2d7324817ced7eb5e03343208b6ac86 (patch)
treeec0e221e17c1e835e9b16d5ed5c326d9d476987f /source4/scripting/python/samba/tests/samba3sam.py
parent3bcb693e27559d8b4f15be05ef2e921f1bf8cdb2 (diff)
downloadsamba-677f28d8b2d7324817ced7eb5e03343208b6ac86.tar.gz
samba-677f28d8b2d7324817ced7eb5e03343208b6ac86.tar.xz
samba-677f28d8b2d7324817ced7eb5e03343208b6ac86.zip
s4-test: fixed setup/ assumption for top level build
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/python/samba/tests/samba3sam.py')
-rw-r--r--source4/scripting/python/samba/tests/samba3sam.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/tests/samba3sam.py b/source4/scripting/python/samba/tests/samba3sam.py
index 59b6e5517c8..a34f0f620c5 100644
--- a/source4/scripting/python/samba/tests/samba3sam.py
+++ b/source4/scripting/python/samba/tests/samba3sam.py
@@ -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):