tests: Avoid hardcoding relative filepath
authorTim Beale <timbeale@catalyst.net.nz>
Mon, 29 Jul 2019 01:35:08 +0000 (13:35 +1200)
committerTim Beale <timbeale@catalyst.net.nz>
Mon, 19 Aug 2019 22:04:32 +0000 (10:04 +1200)
If we move the test file, the test will break.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
python/samba/tests/blackbox/downgradedatabase.py

index a5e540c13541287f149752e6c6a9e8cd83432aa1..4a8411b1f1a2d6ccfc554f3961d3b06600e4c6de 100644 (file)
@@ -23,8 +23,8 @@ import shutil
 from subprocess import check_output
 from samba.samdb import SamDB
 
-COMMAND = os.path.join(os.path.dirname(__file__),
-               "../../../../../source4/scripting/bin/sambadowngradedatabase")
+COMMAND = os.path.join(os.environ.get("SRCDIR_ABS"),
+               "source4/scripting/bin/sambadowngradedatabase")
 
 
 class DowngradeTestBase(BlackboxTestCase):