diff --git a/Testing/Code/Common/CMakeLists.txt b/Testing/Code/Common/CMakeLists.txt index 386040f8ed242b189ed02ce5dc39a9d856419daa..a2a73dcb5e9eb85cb2c725bb98ed86867edbf8f8 100644 --- a/Testing/Code/Common/CMakeLists.txt +++ b/Testing/Code/Common/CMakeLists.txt @@ -951,11 +951,14 @@ ADD_TEST(coTuPipelineMemoryPrintCalculatorNew ${COMMON_TESTS13} ) ADD_TEST(coTvPipelineMemoryPrintCalculator ${COMMON_TESTS13} + --compare-ascii ${NOTOL} + ${BASELINE_FILES}//coTvPipelineMemoryPrintCalculatorOutput.txt + ${TEMP}/coTvPipelineMemoryPrintCalculatorOutput.txt otbPipelineMemoryPrintCalculatorTest ${INPUTDATA}/qb_RoadExtract.img + ${TEMP}/coTvPipelineMemoryPrintCalculatorOutput.txt ) - # ------- Fichiers sources CXX ----------------------------------- SET(BasicCommon_SRCS1 otbCommonTests1.cxx diff --git a/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx b/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx index e52dd61cbe5efd21430b4623ef7ad7b140ef3cf6..8817b115f2eb99a3354977ab578a670af6f2d5fd 100644 --- a/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx +++ b/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx @@ -49,8 +49,12 @@ int otbPipelineMemoryPrintCalculatorTest(int argc, char * argv[]) calculator->SetAvailableMemory(0.1); calculator->Compute(); - std::cout<<"Pipeline memory print: "<<calculator->GetMemoryPrint()<<" Mo"<<std::endl; - std::cout<<"Optimal stream division: "<<calculator->GetOptimalNumberOfStreamDivisions()<<" tiles"<<std::endl; + std::ofstream ofs(argv[2]); + ofs<<"Memory print of whole pipeline: "<<calculator->GetMemoryPrint()<<" Mo"<<std::endl; + ofs<<"Available memory: "<<calculator->GetAvailableMemory()<<" Mo"<<std::endl; + ofs<<"Optimal number of stream divisions: "<<calculator->GetOptimalNumberOfStreamDivisions()<<std::endl; + ofs<<"Bias correction factor applied: "<<calculator->GetBiasCorrectionFactor()<<std::endl; + ofs.close(); return EXIT_SUCCESS; }