def configureTestPaths():
# Point to the testing SDR folder
testdir = os.path.abspath(os.path.dirname(__file__))
os.environ['SDRROOT'] = os.path.join(testdir, "sdr")
# The top source directory is one levels up from this file
topdir = os.path.abspath(os.path.join(testdir, '..'))
# Bring in the Python OSSIE stuff for things running in this process
prependPythonPath(os.path.join(topdir, 'base/framework/python'))
# Add Java libraries to CLASSPATH so that test components can find them
# regardless of where they run.
jarfiles = [ 'CFInterfaces.jar', 'apache-commons-lang-2.4.jar',
'log4j-1.2.15.jar', 'ossie/ossie.jar' ]
for jarfile in jarfiles:
appendClassPath(os.path.join(topdir, 'base/framework/java', jarfile))
# Add path to libomnijni.so to LD_LIBRARY_PATH for Java components
prependPath('LD_LIBRARY_PATH', os.path.join(topdir, 'base/framework/idl/.libs'))
prependPath('LD_LIBRARY_PATH', os.path.join(topdir, 'base/framework/.libs'))
appendPath('LD_LIBRARY_PATH', os.path.join(topdir, 'omnijni/src/cpp/.libs'))
appendPath('LD_LIBRARY_PATH', os.path.join(topdir, 'base/plugin/logcfg/.libs'))
# Set the model IDL paths to point to the (uninstalled) REDHAWK IDLs.
from ossie.utils import model
from ossie.utils.idllib import IDLLibrary
model._idllib = IDLLibrary()
model._idllib.addSearchPath(os.path.join(topdir, 'idl'))
model._idllib.addSearchPath(os.path.join(topdir, '../../bulkioInterfaces/idl'))
# Set up the system paths (LD_LIBRARY_PATH, PYTHONPATH, CLASSPATH), IDL paths
# and SDRROOT to allow testing against an uninstalled framework.
评论列表
文章目录