Skip to content
Snippets Groups Projects
Commit 807a0468 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

TEST: add simple test which open/close mvd application

parent c5534d89
No related branches found
No related tags found
No related merge requests found
#
# Note that the ITK/CMakeLists.txt file configures this file
#
# CMake/CTestCustom.cmake.in
#
# to this file
#
# ${ITK_BINARY_DIR}/CTestCustom.cmake
#
#----------------------------------------------------------------------
#
# For further details regarding this file,
# see http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
#
# and
# http://www.kitware.com/blog/home/post/27
#
#----------------------------------------------------------------------
SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1000000)
SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 300)
SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 50)
SET(CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
"vcl_deprecated_header"
"backward_warning"
"Utilities"
"warning LNK4221.*no public symbols found"
"ranlib:.*file:.*has no symbols"
"ranlib: file: .+ has no symbols"
"libtool:.*file:.*has no symbols"
"Fl_Image.H:.*warning:.*dereferencing type-punned pointer will break strict-aliasing rules.*"
"warning -.: directory name .* does not exist"
"ld.*warning.*duplicate dylib.*"
)
......@@ -165,6 +165,7 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Monteverdi2_BINARY_DIR}/bin )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Monteverdi2_BINARY_DIR}/lib )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Monteverdi2_BINARY_DIR}/lib )
SET(CXX_TEST_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
#----------------------------------------------------------------------------
# Code location
add_subdirectory( Code )
......@@ -173,17 +174,17 @@ add_subdirectory( i18n )
#----------------------------------------------------------------------------
# Enable / Disable testing
#option(BUILD_TESTING "Build testing." OFF)
#INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
#CONFIGURE_FILE(CMake/CTestCustom.cmake.in CTestCustom.cmake)
#MARK_AS_ADVANCED(TCL_TCLSH DART_ROOT)
#IF(BUILD_TESTING)
# ENABLE_TESTING()
# SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard.")
# MARK_AS_ADVANCED(BUILDNAME)
# ADD_SUBDIRECTORY(Testing)
#ENDIF(BUILD_TESTING)
option(BUILD_TESTING "Build testing." OFF)
INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
CONFIGURE_FILE(CMake/CTestCustom.cmake.in CTestCustom.cmake)
MARK_AS_ADVANCED(TCL_TCLSH DART_ROOT)
IF(BUILD_TESTING)
ENABLE_TESTING()
SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard.")
MARK_AS_ADVANCED(BUILDNAME)
ADD_SUBDIRECTORY(Testing)
ENDIF(BUILD_TESTING)
#----------------------------------------------------------------------------
# Generate Monteverdi2Config.cmake
......
......@@ -15,7 +15,7 @@ qt4_add_resources( Application_RESOURCES_RCC ${Application_RESOURCES} )
# Qt4 translations.
# Sources files to translate.
add_to_qt4_i18n_sources(
add_to_qt4_i18n_sources(
${Application_SOURCES}
${Application_HEADERS}
${Application_FORMS}
......@@ -32,6 +32,17 @@ add_executable(monteverdi2
${Application_QM_TRANSLATIONS}
)
add_library(Monteverdi2_Application
${Application_SOURCES}
${Application_FORMS_HEADERS}
${Application_HEADERS_MOC}
${Application_RESOURCES_RCC}
)
target_link_libraries(Monteverdi2_Application
Monteverdi2_Common
${QT_LIBRARIES}
)
#############################################################################
target_link_libraries(monteverdi2 Monteverdi2_Common
${QT_LIBRARIES}
......
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/OTB/Images)
SET(BASELINE_FILES ${OTB_DATA_ROOT}/Baseline/OTB/Files)
SET(INPUTDATA ${OTB_DATA_ROOT}/Input)
SET(TEMP ${Monteverdi_BINARY_DIR}/Testing/Temporary)
# Large Input
IF(OTB_DATA_USE_LARGEINPUT)
SET(LARGEINPUT ${OTB_DATA_LARGEINPUT_ROOT} )
ENDIF(OTB_DATA_USE_LARGEINPUT)
SET(Application_TESTS ${CXX_TEST_PATH}/otbApplicationTests)
#-------------- Monteverdi Application Tests ---------------------------------
ADD_TEST(apTvMonteverdi2Application ${Application_TESTS} otbMonteverdi2ApplicationTest)
SET(Application_SRCS
otbMonteverdi2ApplicationTest.cxx
)
ADD_EXECUTABLE(otbApplicationTests otbApplicationTests.cxx ${Application_SRCS})
TARGET_LINK_LIBRARIES(otbApplicationTests Monteverdi2_Application OTBTesting)
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
// this file defines the otbCommonTest for the test driver
// and all it expects is that you have a function called RegisterTests
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include <iostream>
#include "otbTestMain.h"
void RegisterTests()
{
REGISTER_TEST(otbMonteverdi2ApplicationTest);
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
//
// Configuration include.
//// Included at first position before any other ones.
#include "ConfigureMonteverdi2.h"
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
//
// System includes (sorted by alphabetic order)
// Monteverdi includes (sorted by alphabetic order)
#include "mvdApplication.h"
#include "mvdMainWindow.h"
int otbMonteverdi2ApplicationTest(int argc, char* argv[])
{
mvd::Application application( argc, argv );
mvd::MainWindow main_window;
main_window.show();
QTimer::singleShot(1000, &application, SLOT(quit()));
return application.exec();
}
ADD_SUBDIRECTORY(Application)
MAKE_DIRECTORY(${Monteverdi_BINARY_DIR}/Temporary)
ADD_SUBDIRECTORY(Application)
ADD_SUBDIRECTORY(Common)
ADD_SUBDIRECTORY(Modules)
ADD_SUBDIRECTORY(TestSystem)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment