s4-test: fixed ndrdump test for top level build
authorAndrew Tridgell <tridge@samba.org>
Thu, 3 Feb 2011 22:48:35 +0000 (09:48 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 7 Feb 2011 02:22:01 +0000 (13:22 +1100)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/scripting/python/samba/tests/blackbox/ndrdump.py

index 5a56afdbfb74063405a536ce7862e44e704a2527..c07e32a24f8abe1bcefa9cfbca0cec9dc426b19c 100755 (executable)
 import os
 from samba.tests import BlackboxTestCase
 
-data_path_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../../../librpc/tests"))
+for p in [ "../../../../../source4/librpc/tests", "../../../../../librpc/tests"]:
+    data_path_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), p))
+    print data_path_dir
+    if os.path.exists(data_path_dir):
+        break
+
 
 class NdrDumpTests(BlackboxTestCase):
     """Blackbox tests for ndrdump."""