path: root/openbsc/tests/
diff options
authorNeels Hofmeyr <>2017-02-24 17:55:11 +0100
committerNeels Hofmeyr <>2017-03-20 13:33:15 +0000
commit476c4bb7d13b0c092f78da76e858f882a4bacf76 (patch)
tree9a636c78ee19389900324fb223467ea4b2163e0c /openbsc/tests/
parentca06e040cc115689fb10394cc566052576a638fc (diff)
python tests: allow running from separate build dir
The VTY tests assume that $top_builddir == $top_srcdir. Use the script's location from sys.path[0] to find the correct locations of example configs even when building in another directory. Change-Id: I2731f361e3b72d0980968e6cf83594ea450db7c2
Diffstat (limited to 'openbsc/tests/')
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/tests/ b/openbsc/tests/
index 5030e8b1b..02bc28a97 100644
--- a/openbsc/tests/
+++ b/openbsc/tests/
@@ -30,7 +30,8 @@ import struct
import osmopy.obscvty as obscvty
import osmopy.osmoutil as osmoutil
-confpath = '.'
+# to be able to find $top_srcdir/doc/...
+confpath = os.path.join(sys.path[0], '..')
verbose = False
class TestCtrlBase(unittest.TestCase):