THRIFT-2578 Moving 'make cross' from test.sh to test.py
diff --git a/test/py/TestClient.py b/test/py/TestClient.py
index 53b3ad7..87fede6 100755
--- a/test/py/TestClient.py
+++ b/test/py/TestClient.py
@@ -53,7 +53,8 @@
parser.set_defaults(framed=False, http_path=None, verbose=1, host='localhost', port=9090, proto='binary')
options, args = parser.parse_args()
-sys.path.insert(0, options.genpydir)
+script_dir = os.path.dirname(__file__)
+sys.path.insert(0, os.path.join(script_dir, options.genpydir))
from ThriftTest import ThriftTest, SecondService
from ThriftTest.ttypes import *
diff --git a/test/py/TestServer.py b/test/py/TestServer.py
index 98446a5..820b816 100755
--- a/test/py/TestServer.py
+++ b/test/py/TestServer.py
@@ -46,7 +46,8 @@
parser.set_defaults(port=9090, verbose=1, proto='binary')
options, args = parser.parse_args()
-sys.path.insert(0, options.genpydir)
+script_dir = os.path.dirname(__file__) #<-- absolute dir the script is in
+sys.path.insert(0, os.path.join(script_dir, options.genpydir))
from ThriftTest import ThriftTest
from ThriftTest.ttypes import *
@@ -201,7 +202,6 @@
# set up server transport and transport factory
-script_dir = os.path.dirname(__file__) #<-- absolute dir the script is in
rel_path = "../keys/server.pem"
abs_key_path = os.path.join(script_dir, rel_path)