Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Fix unit tests & build w/o ZeroEQ #30

Merged
merged 2 commits into from
Jun 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion livre/Eq/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ bool Config::init()
_impl->framedata.getRESTParameters()->port ) );
_impl->_restBridge->run( _impl->framedata.getRESTParameters()->zeqSchema );
}
#else
#elif LIVRE_USE_ZEQ
_impl->_vwsPublisher.reset( new zeq::Publisher( lunchbox::URI( "vwsresp://" ) ) );
#endif

Expand Down
5 changes: 0 additions & 5 deletions livre/core/Data/LODNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ class LODNode

const Vector3i& getBlockSize() const { return blockSize_; } //!< @internal

/**
* Sets node id.
*/
void setNodeId( const NodeId nodeId );

/**
* @return True if node is valid.
*/
Expand Down
4 changes: 4 additions & 0 deletions livre/remote/dataSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ lunchbox::URI _getSinkURI( const VolumeDataSourcePluginData& initData )

lunchbox::URI _getSourceURI( const VolumeDataSourcePluginData& initData )
{
if( initData.getURI().getHost().empty( ))
return lunchbox::URI( "livresource://" );
if( initData.getURI().getPort() == 0 )
return lunchbox::URI( "livresource://" + initData.getURI().getHost( ));
return lunchbox::URI( "livresource://" + initData.getURI().getHost() + ":" +
lexical_cast< std::string >( initData.getURI().getPort( )));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endforeach()
# Create and install all the tests
if(CMAKE_COMPILER_IS_GNUCXX_PURE)
set(Data_dataSource_LINK_LIBRARIES "-Wl,--no-as-needed")
set(remote_dataSource_LINK_LIBRARIES "-Wl,--no-as-needed")
set(perf_remoteDataSource_LINK_LIBRARIES "-Wl,--no-as-needed")
endif()
include(CommonCTest)
install_files(share/Livre/tests FILES ${TEST_FILES} COMPONENT examples)
4 changes: 2 additions & 2 deletions tests/Data/dataSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void _testDataSource( const std::string& uriStr )
BOOST_AUTO_TEST_CASE( memoryDataSource )
{
std::stringstream volumeName;
volumeName << "mem:///#" << VOXEL_SIZE_X << "," << VOXEL_SIZE_Y << ","
volumeName << "mem://#" << VOXEL_SIZE_X << "," << VOXEL_SIZE_Y << ","
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"men:///#" is valid , but even "mem:#whatever" is a valid URI. The // separator is needed when you are going to specify an authority, to distinguish it from an absolute path (a single /).

<< VOXEL_SIZE_Z << "," << BLOCK_SIZE;

_testDataSource( volumeName.str( ));
Expand All @@ -85,7 +85,7 @@ BOOST_AUTO_TEST_CASE( memoryDataSource )
BOOST_AUTO_TEST_CASE( remoteMemoryDataSource )
{
std::stringstream volumeName;
volumeName << "remotemem:///#" << VOXEL_SIZE_X << "," << VOXEL_SIZE_Y << ","
volumeName << "remotemem://#" << VOXEL_SIZE_X << "," << VOXEL_SIZE_Y << ","
<< VOXEL_SIZE_Z << "," << BLOCK_SIZE;
try
{
Expand Down
4 changes: 2 additions & 2 deletions tests/perf/remoteDataSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE( testRemote )

const livre::Vector3ui brickSize = livre::Vector3ui( i ) +
info.overlap * 2;
BOOST_CHECK( mem );
BOOST_REQUIRE( mem );
BOOST_CHECK_EQUAL( mem->getMemSize(), brickSize.product( ));

const uint8_t* bytes = mem->getData< uint8_t >();
Expand All @@ -110,7 +110,7 @@ BOOST_AUTO_TEST_CASE( testRemote )
mem = dataSource.getData( node );
++num;

BOOST_CHECK( mem );
BOOST_REQUIRE( mem );
BOOST_CHECK_EQUAL( mem->getMemSize(), brickSize.product( ));
}
const float bulk = clock.getTimef();
Expand Down