Further, added a fix of the ResoureContainerTest to be compatible with gcc 4.6. Removed virtual override usage.
More uniform API for whole resource-encapsulation module (using const string refererences).
Use test helper class to avoid gcc version problems.
Change-Id: I338ee7a7305a83f70babb7b07f9a542644f0c111
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1838
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
* @param name - Id of the bundle in string form
*
*/
- virtual void setID(std::string name) = 0;
+ virtual void setID(const std::string &name) = 0;
/**
* API for getting the Id of the bundle
* @return string - Id of the bundle
*
*/
- virtual std::string getID() = 0;
+ virtual const std::string &getID() = 0;
/**
* API for setting the path of the bundle
* @param path - path of the bundle in string form
*
*/
- virtual void setPath(std::string path) = 0;
+ virtual void setPath(const std::string &path) = 0;
/**
* API for getting the path of the bundle
* @return path - path of the bundle
*
*/
- virtual std::string getPath() = 0;
+ virtual const std::string &getPath() = 0;
/**
* API for setting the Activator name for the bundle
* @param activator - Activator name in string form
*
*/
- virtual void setActivatorName(std::string activator) = 0;
+ virtual void setActivatorName(const std::string &activator) = 0;
/**
* API for setting the Activator name for the bundle
* @return string - Name of the activator
*
*/
- virtual std::string getActivatorName() = 0;
+ virtual const std::string &getActivatorName() = 0;
/**
* API for setting the library path for the bundle
* @param libpath - Library path in string form
*
*/
- virtual void setLibraryPath(std::string libpath) = 0;
+ virtual void setLibraryPath(const std::string &libpath) = 0;
/**
* API for getting the library path for the bundle
* @return string - Library path in string form
*
*/
- virtual std::string getLibraryPath() = 0;
+ virtual const std::string& getLibraryPath() = 0;
/**
* API for setting the version of the bundle
* @param version - version of the bundle in string form
*
*/
- virtual void setVersion(std::string version) = 0;
+ virtual void setVersion(const std::string &version) = 0;
/**
* API for getting the version of the bundle
* @return string - version of the bundle
*
*/
- virtual std::string getVersion() = 0;
+ virtual const std::string &getVersion() = 0;
/**
* API for creating new bundle information
* @param configFile - configuration File that contains the Bundle/Bundles information.
*
*/
- virtual void startContainer(std::string configFile) = 0;
+ virtual void startContainer(const std::string &configFile) = 0;
/**
* API for stopping the Container
*/
* @param bundleId - Id of the Bundle
*
*/
- virtual void startBundle(std::string bundleId) = 0;
+ virtual void startBundle(const std::string &bundleId) = 0;
/**
* API for Stopping the bundle
*
* @param bundleId - Id of the Bundle
*
*/
- virtual void stopBundle(std::string bundleId) = 0;
+ virtual void stopBundle(const std::string &bundleId) = 0;
// dynamic configuration
/**
* @param params - key-value pairs in string form for other Bundle parameters
*
*/
- virtual void addBundle(std::string bundleId, std::string bundleUri, std::string bundlePath,
+ virtual void addBundle(const std::string &bundleId, const std::string &bundleUri, const std::string &bundlePath,
std::map<std::string, std::string> params) = 0;
/**
* API for removing the bundle from the container
* @param bundleId - Id of the Bundle
*
*/
- virtual void removeBundle(std::string bundleId) = 0;
+ virtual void removeBundle(const std::string &bundleId) = 0;
/**
* API for adding the Resource configuration information to the bundle
* @param params - key-value pairs in string form for other Bundle parameters
*
*/
- virtual void addResourceConfig(std::string bundleId, std::string resourceUri,
+ virtual void addResourceConfig(const std::string &bundleId, const std::string &esourceUri,
std::map<std::string, std::string> params) = 0;
/**
* API for removing the Resource configuration information from the bundle
* @param resourceUri - URI of the resource
*
*/
- virtual void removeResourceConfig(std::string bundleId, std::string resourceUri) = 0;
+ virtual void removeResourceConfig(const std::string &bundleId, const std::string &resourceUri) = 0;
/**
* API for getting the list of Bundle Resources
* @param bundleId - Id of the Bundle
*
*/
- virtual std::list<std::string> listBundleResources(std::string bundleId) = 0;
+ virtual std::list<std::string> listBundleResources(const std::string &bundleId) = 0;
/**
* API for getting the Instance of ResourceContainer class
Import('env')
import os.path
+containerJavaSupport = ARGUMENTS.get('containerJavaSupport',0)
+
def filtered_glob(env, pattern, omit=[],
ondisk=True, source=False, strings=False):
return filter(
# Build flags
######################################################################
-try:
- print 'Java Home: ', os.environ['JAVA_HOME']
- print 'Java Lib: ', os.environ['JAVA_LIB']
- resource_container_env.Append(CPPDEFINES={'JAVA_SUPPORT':1})
-except KeyError:
- print '''
-*********************************** Error *************************************
-* Building resource container without Java support. JAVA_HOME or JAVA_LIB are not set properly
-* Please configure JAVA_HOME to point to your Java 7 JDK and
-* JAVA_LIB to your folder containing libjvm
-* Example: export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
-* export JAVA_LIB=/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server
-*******************************************************************************
- '''
- resource_container_env.Append(CPPDEFINES={'JAVA_SUPPORT':0})
+if int(containerJavaSupport):
+ try:
+ print 'Java Home: ', os.environ['JAVA_HOME']
+ print 'Java Lib: ', os.environ['JAVA_LIB']
+ resource_container_env.Append(CPPDEFINES={'JAVA_SUPPORT':1})
+ except KeyError:
+ print '''
+ *********************************** Error *************************************
+ * Building resource container without Java support. JAVA_HOME or JAVA_LIB are not set properly
+ * Please configure JAVA_HOME to point to your Java 7 JDK and
+ * JAVA_LIB to your folder containing libjvm
+ * Example: export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
+ * export JAVA_LIB=/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server
+ *******************************************************************************
+ '''
+ resource_container_env.Append(CPPDEFINES={'JAVA_SUPPORT':0})
resource_container_env.AppendUnique(
'src'
])
-try:
- resource_container_env.AppendUnique(
- CPPPATH = [
- os.environ['JAVA_HOME']+'/include',
- os.environ['JAVA_HOME']+'/include/linux'
- ])
-except KeyError:
- print ''
-
-
+if int(containerJavaSupport):
+ try:
+ resource_container_env.AppendUnique(
+ CPPPATH = [
+ os.environ['JAVA_HOME']+'/include',
+ os.environ['JAVA_HOME']+'/include/linux'
+ ])
+ except KeyError:
+ print ''
+
if target_os not in ['windows', 'winrt']:
resource_container_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
resource_container_env.PrependUnique(LIBS = ['rcs_server', 'rcs_common', 'oc','octbstack', 'oc_logger', 'oc_logger_core', 'connectivity_abstraction'])
resource_container_env.AppendUnique(LIBS = ['dl'])
-try:
- print 'Java Lib: ', os.environ['JAVA_LIB']
- resource_container_env.AppendUnique(LIBS = ['jvm'])
-except KeyError:
- print ''
+if int(containerJavaSupport):
+ try:
+ print 'Java Lib: ', os.environ['JAVA_LIB']
+ resource_container_env.AppendUnique(LIBS = ['jvm'])
+ except KeyError:
+ print ''
######################################################################
# Source files and Targets
*
* @return void
*/
- virtual void onNotificationReceived(std::string strResourceUri) = 0;
+ virtual void onNotificationReceived(const std::string &strResourceUri) = 0;
};
}
}
*
* @return void
*/
- virtual void getBundleConfiguration(std::string bundleId, configInfo *configOutput) = 0;
+ virtual void getBundleConfiguration(const std::string &bundleId, configInfo *configOutput) = 0;
/**
* Get the list of Configuration data of resources that certain bundle has
*
* @return void
*/
- virtual void getResourceConfiguration(std::string bundleId,
+ virtual void getResourceConfiguration(const std::string &bundleId,
std::vector< resourceInfo > *configOutput) = 0;
/**
BundleInfoInternal();
BundleInfoInternal(BundleInfo *info);
virtual ~BundleInfoInternal();
- void setID(string id);
- string getID();
- void setPath(string path);
- string getPath();
- void setVersion(string version);
- string getVersion();
+ void setID(const std::string &id);
+ const std::string &getID();
+ void setPath(const std::string &path);
+ const std::string &getPath();
+ void setVersion(const std::string &version);
+ const std::string &getVersion();
void setLoaded(bool loaded);
bool isLoaded();
void setActivated(bool activated);
bool isActivated();
- virtual void setLibraryPath(string libpath);
- virtual string getLibraryPath();
+ virtual void setLibraryPath(const std::string &libpath);
+ virtual const std::string &getLibraryPath();
- void setActivatorName(string activatorName);
- string getActivatorName();
+ void setActivatorName(const std::string &activatorName);
+ const std::string &getActivatorName();
void setBundleActivator(activator_t *);
activator_t *getBundleActivator();
virtual ~ResourceContainerImpl();
// methods from ResourceContainer
- void startContainer(string configFile);
+ void startContainer(const std::string &configFile);
void stopContainer();
void activateBundle(BundleInfo *bundleInfo);
void deactivateBundle(BundleInfo *bundleInfo);
- void activateBundle(string bundleId);
- void deactivateBundle(string bundleId);
+ void activateBundle(const std::string &bundleId);
+ void deactivateBundle(const std::string &bundleId);
void registerBundle(BundleInfo *bundleinfo);
void unregisterBundle(BundleInfo *bundleinfo);
- void unregisterBundleSo(string id);
+ void unregisterBundleSo(const std::string &id);
// methods from ResourceContainerBundleAPI
void registerResource(BundleResource *resource);
void unregisterResource(BundleResource *resource);
- void getBundleConfiguration(std::string bundleId, configInfo *configOutput);
- void getResourceConfiguration(std::string bundleId,
+ void getBundleConfiguration(const std::string &bundleId, configInfo *configOutput);
+ void getResourceConfiguration(const std::string &bundleId,
std::vector< resourceInfo > *configOutput);
RCSGetResponse getRequestHandler(const RCSRequest &request,
RCSSetResponse setRequestHandler(const RCSRequest &request,
const ResourceAttributes &attributes);
- void onNotificationReceived(std::string strResourceUri);
+ void onNotificationReceived(const std::string &strResourceUri);
static ResourceContainerImpl *getImplInstance();
- static ResourceObject::Ptr buildResourceObject(string strUri, string strResourceType);
+ static ResourceObject::Ptr buildResourceObject(const std::string &strUri, const std::string &strResourceType);
- void startBundle(string bundleId);
- void stopBundle(string bundleId);
+ void startBundle(const std::string &bundleId);
+ void stopBundle(const std::string &bundleId);
- void addBundle(string bundleId, string bundleUri, string bundlePath,
+ void addBundle(const std::string &bundleId, const std::string &bundleUri, const std::string &bundlePath,
std::map<string, string> params);
- void removeBundle(string bundleId);
+ void removeBundle(const std::string &bundleId);
std::list<BundleInfo *> listBundles();
- void addResourceConfig(string bundleId, string resourceUri, std::map<string, string> params);
- void removeResourceConfig(string bundleId, string resourceUri);
+ void addResourceConfig(const std::string &bundleId, const std::string &resourceUri, std::map<string, string> params);
+ void removeResourceConfig(const std::string &bundleId, const std::string &resourceUri);
- std::list<string> listBundleResources(string bundleId);
+ std::list<string> listBundleResources(const std::string &bundleId);
#if(JAVA_SUPPORT)
JavaVM *getJavaVM(string bundleId);
Configuration *m_config;
- void activateSoBundle(string bundleId);
- void deactivateSoBundle(string bundleId);
- void addSoBundleResource(string bundleId, resourceInfo newResourceInfo);
- void removeSoBundleResource(string bundleId, string resourceUri);
+ void activateSoBundle(const std::string &bundleId);
+ void deactivateSoBundle(const std::string &bundleId);
+ void addSoBundleResource(const std::string &bundleId, resourceInfo newResourceInfo);
+ void removeSoBundleResource(const std::string &bundleId, const std::string &resourceUri);
void registerSoBundle(BundleInfo *bundleInfo);
#if(JAVA_SUPPORT)
m_bundleHandle = nullptr;
}
- void BundleInfoInternal::setID(string id)
+ void BundleInfoInternal::setID(const std::string &id)
{
m_ID = id;
}
- string BundleInfoInternal::getID()
+ const std::string &BundleInfoInternal::getID()
{
return m_ID;
}
- void BundleInfoInternal::setPath(string path)
+ void BundleInfoInternal::setPath( const std::string &path)
{
m_path = path;
}
- string BundleInfoInternal::getPath()
+ const std::string &BundleInfoInternal::getPath()
{
return m_path;
}
- void BundleInfoInternal::setVersion(string version)
+ void BundleInfoInternal::setVersion( const std::string &version)
{
m_version = version;
}
- string BundleInfoInternal::getVersion()
+ const std::string &BundleInfoInternal::getVersion()
{
return m_version;
}
return m_java_bundle;
}
- void BundleInfoInternal::setActivatorName(string activatorName)
+ void BundleInfoInternal::setActivatorName( const std::string &activatorName)
{
m_activator_name = activatorName;
}
- string BundleInfoInternal::getActivatorName()
+ const std::string &BundleInfoInternal::getActivatorName()
{
return m_activator_name;
}
- void BundleInfoInternal::setLibraryPath(string libpath)
+ void BundleInfoInternal::setLibraryPath( const std::string &libpath)
{
m_library_path = libpath;
}
- string BundleInfoInternal::getLibraryPath()
+ const std::string &BundleInfoInternal::getLibraryPath()
{
return m_library_path;
}
&& str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
}
- void ResourceContainerImpl::startContainer(string configFile)
+ void ResourceContainerImpl::startContainer(const std::string &configFile)
{
info_logger() << "Starting resource container " << endl;
#if (JAVA_SUPPORT)
}
}
- void ResourceContainerImpl::activateBundle(string id)
+ void ResourceContainerImpl::activateBundle(const std::string &id)
{
info_logger() << "Activating bundle: " << m_bundles[id]->getID() << endl;
}
- void ResourceContainerImpl::deactivateBundle(string id)
+ void ResourceContainerImpl::deactivateBundle(const std::string &id)
{
if (m_bundles[id]->getJavaBundle())
}
}
- void ResourceContainerImpl::unregisterBundleSo(string id)
+ void ResourceContainerImpl::unregisterBundleSo(const std::string &id)
{
void *bundleHandle = m_bundles[id]->getBundleHandle();
info_logger() << "Unregister bundle: " << m_bundles[id]->getID() << ", "
}
}
- void ResourceContainerImpl::getBundleConfiguration(std::string bundleId,
+ void ResourceContainerImpl::getBundleConfiguration(const std::string &bundleId,
configInfo *configOutput)
{
if (m_config)
}
}
- void ResourceContainerImpl::getResourceConfiguration(std::string bundleId,
+ void ResourceContainerImpl::getResourceConfiguration(const std::string &bundleId,
std::vector< resourceInfo > *configOutput)
{
if (m_config)
return RCSSetResponse::create(attr);
}
- void ResourceContainerImpl::onNotificationReceived(std::string strResourceUri)
+ void ResourceContainerImpl::onNotificationReceived(const std::string &strResourceUri)
{
info_logger() << "ResourceContainerImpl::onNotificationReceived\n\tnotification from "
<< strResourceUri << ".\n";
return &m_instance;
}
- ResourceObject::Ptr ResourceContainerImpl::buildResourceObject(string strUri,
- string strResourceType)
+ ResourceObject::Ptr ResourceContainerImpl::buildResourceObject(const std::string & strUri,
+ const std::string & strResourceType)
{
return ResourceObject::Builder(strUri, strResourceType, "DEFAULT_INTERFACE").setObservable(
true).setDiscoverable(true).build();
}
- void ResourceContainerImpl::startBundle(string bundleId)
+ void ResourceContainerImpl::startBundle(const std::string &bundleId)
{
if (m_bundles.find(bundleId) != m_bundles.end())
{
}
}
- void ResourceContainerImpl::stopBundle(string bundleId)
+ void ResourceContainerImpl::stopBundle(const std::string &bundleId)
{
if (m_bundles.find(bundleId) != m_bundles.end())
{
}
}
- void ResourceContainerImpl::addBundle(string bundleId, string bundleUri, string bundlePath,
+ void ResourceContainerImpl::addBundle(const std::string &bundleId, const std::string &bundleUri, const std::string &bundlePath,
std::map< string, string > params)
{
if (m_bundles.find(bundleId) != m_bundles.end())
}
}
- void ResourceContainerImpl::removeBundle(string bundleId)
+ void ResourceContainerImpl::removeBundle(const std::string &bundleId)
{
if (m_bundles.find(bundleId) != m_bundles.end())
{
return ret;
}
- void ResourceContainerImpl::addResourceConfig(string bundleId, string resourceUri,
+ void ResourceContainerImpl::addResourceConfig(const std::string &bundleId, const std::string &resourceUri,
std::map< string, string > params)
{
if (m_bundles.find(bundleId) != m_bundles.end())
}
}
- void ResourceContainerImpl::removeResourceConfig(string bundleId, string resourceUri)
+ void ResourceContainerImpl::removeResourceConfig(const std::string &bundleId, const std::string &resourceUri)
{
if (m_bundles.find(bundleId) != m_bundles.end())
{
}
}
- std::list< string > ResourceContainerImpl::listBundleResources(string bundleId)
+ std::list< string > ResourceContainerImpl::listBundleResources(const std::string &bundleId)
{
std::list< string > ret;
}
}
- void ResourceContainerImpl::activateSoBundle(string bundleId)
+ void ResourceContainerImpl::activateSoBundle(const std::string &bundleId)
{
activator_t *bundleActivator = m_bundles[bundleId]->getBundleActivator();
bundleInfoInternal->setActivated(true);
}
- void ResourceContainerImpl::deactivateSoBundle(string id)
+ void ResourceContainerImpl::deactivateSoBundle(const std::string &id)
{
deactivator_t *bundleDeactivator = m_bundles[id]->getBundleDeactivator();
info_logger() << "De-activating bundle: " << m_bundles[id]->getID() << endl;
}
}
- void ResourceContainerImpl::addSoBundleResource(string bundleId,
+ void ResourceContainerImpl::addSoBundleResource(const std::string &bundleId,
resourceInfo newResourceInfo)
{
resourceCreator_t *resourceCreator;
}
}
- void ResourceContainerImpl::removeSoBundleResource(string bundleId, string resourceUri)
+ void ResourceContainerImpl::removeSoBundleResource(const std::string &bundleId, const std::string &resourceUri)
{
if (m_mapResources.find(resourceUri) != m_mapResources.end())
{
#include <map>
#include <vector>
+#include <UnitTestHelper.h>
+
#include <gtest/gtest.h>
#include <HippoMocks/hippomocks.h>
string CONFIG_FILE = "ResourceContainerTestConfig.xml";
+
/*Fake bundle resource class for testing*/
class TestBundleResource: public BundleResource
{
;
};
-class ResourceContainerTest: public Test
+class ResourceContainerTest: public TestWithMock
{
+
public:
~ResourceContainerTest() noexcept(true)
{
}
-
public:
MockRepository mocks;
ResourceContainer *m_pResourceContainer;
protected:
- void SetUp() override
+ void SetUp()
{
+ TestWithMock::SetUp();
m_pResourceContainer = ResourceContainer::getInstance();
}
};
m_pResourceContainer->addResourceConfig("unvalidBundleId", "", resourceParams);
}
-class ResourceContainerBundleAPITest: public Test
+class ResourceContainerBundleAPITest: public TestWithMock
{
-
public:
~ResourceContainerBundleAPITest() noexcept(true)
{
}
+
public:
MockRepository mocks;
ResourceObject *m_pResourceObject;
TestBundleResource *m_pBundleResource;
protected:
- void SetUp() override
+ void SetUp()
{
+ TestWithMock::SetUp();
m_pResourceObject = mocks.Mock<ResourceObject>();
m_pResourceContainer = ResourceContainerBundleAPI::getInstance();
((ResourceContainerImpl *)m_pResourceContainer)->stopContainer();
}
-class ResourceContainerImplTest: public Test
+class ResourceContainerImplTest: public TestWithMock
{
+
public:
~ResourceContainerImplTest() noexcept(true)
{
BundleInfo *m_pBundleInfo;
protected:
- void SetUp() override
+ void SetUp()
{
+ TestWithMock::SetUp();
m_pResourceContainer = ResourceContainerImpl::getImplInstance();
m_pBundleInfo = BundleInfo::build();
}
config->getResourceConfiguration("test", &resourceConfig);
EXPECT_TRUE(bundles.empty());
-}
\ No newline at end of file
+}
import os.path
+containerJavaSupport = ARGUMENTS.get('containerJavaSupport',0)
+
def filtered_glob(env, pattern, omit=[],
ondisk=True, source=False, strings=False):
return filter(
container_gtest_env = lib_env.Clone()
-try:
- print 'Java Home: ', os.environ['JAVA_HOME']
- print 'Java Lib: ', os.environ['JAVA_LIB']
- container_gtest_env.Append(CPPDEFINES={'JAVA_SUPPORT_TEST':1})
-except KeyError:
- print '''
-*********************************** Error *************************************
-* Building resource container without Java support. JAVA_HOME or JAVA_LIB are not set properly
-* Please configure JAVA_HOME to point to your Java 7 JDK and
-* JAVA_LIB to your folder containing libjvm
-* Example: export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
-* export JAVA_LIB=/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server/
-*******************************************************************************
- '''
- container_gtest_env.Append(CPPDEFINES={'JAVA_SUPPORT_TEST':0})
+if int(containerJavaSupport):
+ try:
+ print 'Java Home: ', os.environ['JAVA_HOME']
+ print 'Java Lib: ', os.environ['JAVA_LIB']
+ container_gtest_env.Append(CPPDEFINES={'JAVA_SUPPORT_TEST':1})
+ except KeyError:
+ print '''
+ *********************************** Error *************************************
+ * Building resource container without Java support. JAVA_HOME or JAVA_LIB are not set properly
+ * Please configure JAVA_HOME to point to your Java 7 JDK and
+ * JAVA_LIB to your folder containing libjvm
+ * Example: export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
+ * export JAVA_LIB=/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server/
+ *******************************************************************************
+ '''
+ container_gtest_env.Append(CPPDEFINES={'JAVA_SUPPORT_TEST':0})
target_os = env.get('TARGET_OS')
'../include',
'../../../include',
'../include/internal',
+ '../../common/utils/include',
'../bundle-api/include'
])
-
-try:
- container_gtest_env.AppendUnique(
- CPPPATH = [
- os.environ['JAVA_HOME']+'/include',
- os.environ['JAVA_HOME']+'/include/linux'
- ])
-except KeyError:
- print ''
+
+if int(containerJavaSupport):
+ try:
+ container_gtest_env.AppendUnique(
+ CPPPATH = [
+ os.environ['JAVA_HOME']+'/include',
+ os.environ['JAVA_HOME']+'/include/linux'
+ ])
+ except KeyError:
+ print ''
if target_os not in ['windows', 'winrt']:
container_gtest_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
container_gtest_env.PrependUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs/hippomocks-master',
gtest_dir + '/include'])
-
-try:
- container_gtest_env.AppendUnique(LIBPATH = [os.environ['JAVA_LIB']])
-except KeyError:
- print ''
+
+if int(containerJavaSupport):
+ try:
+ container_gtest_env.AppendUnique(LIBPATH = [os.environ['JAVA_LIB']])
+ except KeyError:
+ print ''
container_gtest_env.AppendUnique(CCFLAGS = ['-Wnoexcept'])
container_gtest_env.AppendUnique(LIBS = ['dl'])
-
-try:
- print 'Java Lib: ', os.environ['JAVA_LIB']
- container_gtest_env.AppendUnique(LIBS = ['jvm'])
-except KeyError:
- print ''
+if int(containerJavaSupport):
+ try:
+ print 'Java Lib: ', os.environ['JAVA_LIB']
+ container_gtest_env.AppendUnique(LIBS = ['jvm'])
+ except KeyError:
+ print ''
######################################################################
# build test bundle
Command("./ResourceContainerInvalidConfig.xml","./ResourceContainerInvalidConfig.xml", Copy("$TARGET", "$SOURCE"))
Ignore("./ResourceContainerInvalidConfig.xml", "./ResourceContainerInvalidConfig.xml")
Command("./TestBundleJava/hue-0.1-jar-with-dependencies.jar","./TestBundleJava/hue-0.1-jar-with-dependencies.jar", Copy("$TARGET", "$SOURCE"))
-Ignore("./TestBundleJava/hue-0.1-jar-with-dependencies.jar", "./TestBundleJava/hue-0.1-jar-with-dependencies.jar")
\ No newline at end of file
+Ignore("./TestBundleJava/hue-0.1-jar-with-dependencies.jar", "./TestBundleJava/hue-0.1-jar-with-dependencies.jar")