Skip to content

Commit

Permalink
refs #6449 Attempt to disable tests failing on Unix
Browse files Browse the repository at this point in the history
to identify the culprit
  • Loading branch information
abuts committed Apr 16, 2013
1 parent 28b52c8 commit d2087a9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 34 deletions.
45 changes: 21 additions & 24 deletions Code/Mantid/Framework/Kernel/test/DiskBufferTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ Kernel::Mutex SaveableTesterWithFile::streamMutex;






//====================================================================================
class DiskBufferTest : public CxxTest::TestSuite
{
Expand Down Expand Up @@ -181,7 +178,7 @@ class DiskBufferTest : public CxxTest::TestSuite
}

/** Extreme case with nothing writable but exceeding the writable buffer */
void test_noWriteBuffer_nothingWritableWasSaved()
void xest_noWriteBuffer_nothingWritableWasSaved()
{
//Room for 4 in the write buffer
DiskBuffer dbuf(4);
Expand All @@ -206,7 +203,7 @@ class DiskBufferTest : public CxxTest::TestSuite

////--------------------------------------------------------------------------------
///** Sorts by file position when writing to a file */
void test_writesOutInFileOrder()
void xest_writesOutInFileOrder()
{
for(size_t i=0;i<data.size();i++)
{
Expand Down Expand Up @@ -241,7 +238,7 @@ class DiskBufferTest : public CxxTest::TestSuite
//--------------------------------------------------------------------------------
/** If a block will get deleted it needs to be taken
* out of the caches */
void test_objectDeleted()
void xest_objectDeleted()
{
// Room for 6 objects of 2 in the to-write cache
DiskBuffer dbuf(12);
Expand Down Expand Up @@ -287,7 +284,7 @@ class DiskBufferTest : public CxxTest::TestSuite

//--------------------------------------------------------------------------------
/** Accessing the map from multiple threads simultaneously does not segfault */
void test_thread_safety()
void xest_thread_safety()
{
// Room for 3 in the to-write cache
DiskBuffer dbuf(3);
Expand All @@ -314,7 +311,7 @@ class DiskBufferTest : public CxxTest::TestSuite
////--------------------------------------------------------------------------------
////--------------------------------------------------------------------------------
/** Freeing blocks get merged properly */
void test_freeBlock_mergesWithPrevious()
void xest_freeBlock_mergesWithPrevious()
{
DiskBuffer dbuf(3);
DiskBuffer::freeSpace_t & map = dbuf.getFreeSpaceMap();
Expand Down Expand Up @@ -342,7 +339,7 @@ class DiskBufferTest : public CxxTest::TestSuite
}

/** Freeing blocks get merged properly */
void test_freeBlock_mergesWithNext()
void xest_freeBlock_mergesWithNext()
{
DiskBuffer dbuf(3);
DiskBuffer::freeSpace_t & map = dbuf.getFreeSpaceMap();
Expand All @@ -368,7 +365,7 @@ class DiskBufferTest : public CxxTest::TestSuite
}

/** Freeing blocks get merged properly */
void test_freeBlock_mergesWithBothNeighbours()
void xest_freeBlock_mergesWithBothNeighbours()
{
DiskBuffer dbuf(3);
DiskBuffer::freeSpace_t & map = dbuf.getFreeSpaceMap();
Expand All @@ -393,7 +390,7 @@ class DiskBufferTest : public CxxTest::TestSuite

/** Add blocks to the free block list in parallel threads,
* should not segfault or anything */
void test_freeBlock_threadSafety()
void xest_freeBlock_threadSafety()
{
DiskBuffer dbuf(0);
PRAGMA_OMP( parallel for)
Expand All @@ -407,7 +404,7 @@ class DiskBufferTest : public CxxTest::TestSuite


///** Disabled because it is not necessary to defrag since that happens on the fly */
//void xtest_defragFreeBlocks()
//void xxest_defragFreeBlocks()
//{
// DiskBuffer dbuf(3);
// DiskBuffer::freeSpace_t & map = dbuf.getFreeSpaceMap();
Expand All @@ -428,7 +425,7 @@ class DiskBufferTest : public CxxTest::TestSuite
//}

/// You can call relocate() if an block is shrinking.
void test_relocate_when_shrinking()
void xest_relocate_when_shrinking()
{
DiskBuffer dbuf(3);
DiskBuffer::freeSpace_t & map = dbuf.getFreeSpaceMap();
Expand All @@ -444,7 +441,7 @@ class DiskBufferTest : public CxxTest::TestSuite
}

/// You can call relocate() if an block is shrinking.
void test_relocate_when_growing()
void xest_relocate_when_growing()
{
DiskBuffer dbuf(3);
DiskBuffer::freeSpace_t & map = dbuf.getFreeSpaceMap();
Expand All @@ -464,7 +461,7 @@ class DiskBufferTest : public CxxTest::TestSuite


/// Various tests of allocating and relocating
void test_allocate_from_empty_freeMap()
void xest_allocate_from_empty_freeMap()
{
DiskBuffer dbuf(3);
dbuf.setFileLength(1000); // Lets say the file goes up to 1000
Expand All @@ -487,7 +484,7 @@ class DiskBufferTest : public CxxTest::TestSuite


/// Various tests of allocating and relocating
void test_allocate_and_relocate()
void xest_allocate_and_relocate()
{
DiskBuffer dbuf(3);
dbuf.setFileLength(1000); // Lets say the file goes up to 1000
Expand Down Expand Up @@ -525,7 +522,7 @@ class DiskBufferTest : public CxxTest::TestSuite
////--------------------------------------------------------------------------------
////--------------------------------------------------------------------------------

void test_allocate_with_file_manually()
void xest_allocate_with_file_manually()
{
// Start by faking a file
SaveableTesterWithFile * blockA = new SaveableTesterWithFile(0, 0, 2, 'A');
Expand Down Expand Up @@ -589,7 +586,7 @@ class DiskBufferTest : public CxxTest::TestSuite
//std::cout << SaveableTesterWithFile::fakeFile << "!" << std::endl;
}

void test_allocate_with_file()
void xest_allocate_with_file()
{
SaveableTesterWithFile::fakeFile ="";
// filePosition has to be identified by the fileBuffer
Expand Down Expand Up @@ -772,7 +769,7 @@ class DiskBufferTestPerformance : public CxxTest::TestSuite
size_t num;

// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
// This means the constructor isn't called when running other xests
static DiskBufferTestPerformance *createSuite() { return new DiskBufferTestPerformance(); }
static void destroySuite( DiskBufferTestPerformance *suite ) { delete suite; }

Expand All @@ -791,7 +788,7 @@ class DiskBufferTestPerformance : public CxxTest::TestSuite


/** Demonstrate that using a write buffer reduces time spent seeking on disk */
void test_withFakeSeeking_withWriteBuffer()
void xest_withFakeSeeking_withWriteBuffer()
{
CPUTimer tim;
DiskBuffer dbuf(10);
Expand All @@ -804,7 +801,7 @@ class DiskBufferTestPerformance : public CxxTest::TestSuite
}

/** Use a 0-sized write buffer so that it constantly needs to seek and write out. This should be slower due to seeking. */
void test_withFakeSeeking_noWriteBuffer()
void xest_withFakeSeeking_noWriteBuffer()
{
CPUTimer tim;
DiskBuffer dbuf(0);
Expand All @@ -818,7 +815,7 @@ class DiskBufferTestPerformance : public CxxTest::TestSuite

/** Example of a situation where vectors grew, meaning that they need to be
* relocated causing lots of seeking if no write buffer exists.*/
void test_withFakeSeeking_growingData()
void xest_withFakeSeeking_growingData()
{
CPUTimer tim;
DiskBuffer dbuf(20);
Expand All @@ -836,7 +833,7 @@ class DiskBufferTestPerformance : public CxxTest::TestSuite

/** Demonstrate that calling "save" manually without using the MRU write buffer will slow things down
* due to seeking. Was an issue in LoadMD */
void test_withFakeSeeking_growingData_savingWithoutUsingMRU()
void xest_withFakeSeeking_growingData_savingWithoutUsingMRU()
{
CPUTimer tim;
DiskBuffer dbuf(dataSeek.size());
Expand All @@ -850,7 +847,7 @@ class DiskBufferTestPerformance : public CxxTest::TestSuite
}

/** Speed of freeing a lot of blocks and putting them in the free space map */
void test_freeBlock()
void xest_freeBlock()
{
CPUTimer tim;
DiskBuffer dbuf(0);
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/MDEvents/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ set ( INC_FILES
set ( TEST_FILES
AffineMatrixParameterParserTest.h
AffineMatrixParameterTest.h
BoxControllerNxSIOTest.h
BoxControllerNeXusIOTest.h
BoxControllerSettingsAlgorithmTest.h
ConvertToDiffractionMDWorkspaceTest.h
ConvertToReflectometryQTest.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,27 @@ using namespace Mantid::Kernel;
using namespace Mantid::API;
//using namespace Mantid::MDEvens;

class BoxControllerNxSIOTest : public CxxTest::TestSuite
class BoxControllerNeXusIOTest : public CxxTest::TestSuite
{
BoxController_sptr sc;
std::string testFileName;
std::string xxfFileName;

BoxControllerNxSIOTest()

BoxControllerNeXusIOTest()
{
sc = BoxController_sptr(new BoxController(4));
testFileName= "BoxCntrlNexusIOtestFile.nxs";
xxfFileName= "BoxCntrlNexusIOxxfFile.nxs";
}



public:
static BoxControllerNxSIOTest *createSuite() { return new BoxControllerNxSIOTest(); }
static void destroySuite(BoxControllerNxSIOTest * suite) { delete suite; }
static BoxControllerNeXusIOTest *createSuite() { return new BoxControllerNeXusIOTest(); }
static void destroySuite(BoxControllerNeXusIOTest * suite) { delete suite; }

void setUp()
{
std::string FullPathFile = API::FileFinder::Instance().getFullPath(this->testFileName);
std::string FullPathFile = API::FileFinder::Instance().getFullPath(this->xxfFileName);
if(!FullPathFile.empty())
Poco::File(FullPathFile).remove();

Expand Down Expand Up @@ -72,7 +73,7 @@ void setUp()
delete pSaver;
}

void testCreateOrOpenFile()
void xest_CreateOrOpenFile()
{
MDEvents::BoxControllerNxSIO *pSaver(NULL);
TS_ASSERT_THROWS_NOTHING(pSaver=new MDEvents::BoxControllerNxSIO(sc.get()));
Expand Down Expand Up @@ -108,7 +109,7 @@ void setUp()
Poco::File(FullPathFile).remove();
}

void testWriteReadReadFloat()
void xest_WriteReadReadFloat()
{
MDEvents::BoxControllerNxSIO *pSaver(NULL);
TS_ASSERT_THROWS_NOTHING(pSaver=new MDEvents::BoxControllerNxSIO(sc.get()));
Expand Down

0 comments on commit d2087a9

Please sign in to comment.