selftest: allow tests.py scripts to run independently
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 28 Jul 2016 22:57:52 +0000 (10:57 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Wed, 31 Aug 2016 05:09:26 +0000 (07:09 +0200)
These generate lists of test commands. Usually they are run in special
environments, but they should work from the command line. This
restores the intended behaviour.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
selftest/tests.py
source3/selftest/tests.py

index e02f049fb97c1f604daf9c14824ebab7ecadb5c6..62dadab4974ccc7c1678240273765f76c70c3b63 100644 (file)
@@ -23,6 +23,7 @@ from selftesthelpers import *
 try:
     config_h = os.environ["CONFIG_H"]
 except KeyError:
+    samba4bindir = bindir()
     config_h = os.path.join(samba4bindir, "default/include/config.h")
 
 # define here var to check what we support
index e4c31c6dd9d6c777287b92e8bf543627a0619e1c..c75b7ae39e941a97722ba7c28ecec68de8a4a43d 100755 (executable)
@@ -206,6 +206,7 @@ for env in ["fileserver"]:
     try:
         config_h = os.environ["CONFIG_H"]
     except KeyError:
+        samba4bindir = bindir()
         config_h = os.path.join(samba4bindir, "default/include/config.h")
 
     # see if libarchive is supported