diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py index 5030e8b1b..02bc28a97 100644 --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -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): diff --git a/openbsc/tests/smpp_test_runner.py b/openbsc/tests/smpp_test_runner.py index 06fb7665b..2fd144b2b 100644 --- a/openbsc/tests/smpp_test_runner.py +++ b/openbsc/tests/smpp_test_runner.py @@ -18,6 +18,7 @@ # along with this program. If not, see . import os +import sys import time import unittest import socket @@ -25,7 +26,7 @@ import socket import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil -confpath = '.' +confpath = os.path.join(sys.path[0], '..') class TestVTYBase(unittest.TestCase): diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 87b9eba97..305c956d7 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -24,10 +24,13 @@ import subprocess import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil -sys.path.append("../contrib") +# add $top_srcdir/contrib to find ipa.py +sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) + from ipa import IPA -confpath = '.' +# to be able to find $top_srcdir/doc/... +confpath = os.path.join(sys.path[0], '..') class TestVTYBase(unittest.TestCase):