aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdomino_cli.py7
-rwxr-xr-xtests/run_multinode.sh13
2 files changed, 13 insertions, 7 deletions
diff --git a/domino_cli.py b/domino_cli.py
index 5cb0b1c..e1bbfbb 100755
--- a/domino_cli.py
+++ b/domino_cli.py
@@ -13,8 +13,13 @@
import sys, glob, getopt
import getopt
+import pkg_resources
-sys.path.insert(0, glob.glob('./lib')[0])
+try:
+ dir = pkg_resources.resource_filename('lib','.')
+except ImportError:
+ dir = './lib'
+sys.path.insert(0, glob.glob(dir)[0])
from dominoCLI import DominoClientCLI
from dominoCLI.ttypes import *
diff --git a/tests/run_multinode.sh b/tests/run_multinode.sh
index 5ccdf65..235eaf1 100755
--- a/tests/run_multinode.sh
+++ b/tests/run_multinode.sh
@@ -17,12 +17,13 @@ CLIENT1_CLIPORT=9100
CLIENT2_CLIPORT=9200
LOGLEVEL=DEBUG
-toscafile_test1=./tosca-templates/tosca_helloworld_nfv.yaml
-test1_reffile1=./tests/refdata/test1_client1.ref
-test1_reffile2=./tests/refdata/test1_client2.ref
-client1_log=./tests/logdata/client1.log
-client2_log=./tests/logdata/client2.log
-server_log=./tests/logdata/server.log
+dir=$(python -c "import sysconfig; print sysconfig.get_path('platlib')")
+toscafile_test1=${dir}/tosca-templates/tosca_helloworld_nfv.yaml
+test1_reffile1=${dir}/tests/refdata/test1_client1.ref
+test1_reffile2=${dir}/tests/refdata/test1_client2.ref
+client1_log=${dir}/tests/logdata/client1.log
+client2_log=${dir}/tests/logdata/client2.log
+server_log=${dir}/tests/logdata/server.log
start_server() {