From 0425638f898bfc65fc06fb00784e4ee2b281725f Mon Sep 17 00:00:00 2001 From: Julien Malik <julien.malik@c-s.fr> Date: Tue, 20 Sep 2011 10:26:22 +0200 Subject: [PATCH] ENH: use the CommandLineLauncher for the application tests --- Testing/Applications/CMakeLists.txt | 30 ++++++------------------ Testing/Applications/Util/CMakeLists.txt | 23 ++++++++++++++++++ 2 files changed, 30 insertions(+), 23 deletions(-) create mode 100644 Testing/Applications/Util/CMakeLists.txt diff --git a/Testing/Applications/CMakeLists.txt b/Testing/Applications/CMakeLists.txt index 27a862d784..ebdf112845 100644 --- a/Testing/Applications/CMakeLists.txt +++ b/Testing/Applications/CMakeLists.txt @@ -1,14 +1,7 @@ -set(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) - set(INPUTDATA ${OTB_DATA_ROOT}/Input) set(TEMP ${OTB_BINARY_DIR}/Testing/Temporary) -if(WIN32) - add_definitions(-DWIN32) -endif(WIN32) - -# ---------------- Smoothing example test -set(APPLICATIONS_TESTS ${CXX_TEST_PATH}/otbWrapperExampleTests_Smoothing) +add_subdirectory(Util) add_test(NAME exTvRescaleTest COMMAND otbApplicationLauncherCommandLine @@ -20,24 +13,15 @@ add_test(NAME exTvRescaleTest --outmax 150 ) add_test(NAME exTvSmoothingTest - COMMAND otbWrapperExampleTests - otbSmoothingTest - $<TARGET_FILE_DIR:otbapp_Smoothing> - ${INPUTDATA}/poupees.tif - ${TEMP}/owTvSmoothingTest2.tif ) - + COMMAND otbApplicationLauncherCommandLine + Smoothing + --modulePath $<TARGET_FILE_DIR:otbapp_Smoothing> + --in ${INPUTDATA}/poupees.tif + --out ${TEMP}/owTvSmoothingTest2.tif + --type mean) add_test(NAME exTvReadImageInfoTest COMMAND otbApplicationLauncherCommandLine ReadImageInfo --modulePath $<TARGET_FILE_DIR:otbapp_ReadImageInfo> --in ${INPUTDATA}/poupees.tif ) - - -add_executable(otbWrapperExampleTests - otbWrapperExampleTests.cxx - otbRescaleTest.cxx - otbSmoothingTest.cxx - otbReadImageInfoTest.cxx ) - -target_link_libraries(otbWrapperExampleTests OTBApplicationEngine OTBTesting) diff --git a/Testing/Applications/Util/CMakeLists.txt b/Testing/Applications/Util/CMakeLists.txt new file mode 100644 index 0000000000..0a9a5c60bd --- /dev/null +++ b/Testing/Applications/Util/CMakeLists.txt @@ -0,0 +1,23 @@ + +add_test(NAME exTvRescaleTest + COMMAND otbApplicationLauncherCommandLine + Rescale + --modulePath $<TARGET_FILE_DIR:otbapp_Rescale> + --in ${INPUTDATA}/poupees.tif + --out ${TEMP}/owTvRescaleTest.tif + --outmin 20 + --outmax 150 ) + +add_test(NAME exTvSmoothingTest + COMMAND otbApplicationLauncherCommandLine + Smoothing + --modulePath $<TARGET_FILE_DIR:otbapp_Smoothing> + --in ${INPUTDATA}/poupees.tif + --out ${TEMP}/owTvSmoothingTest2.tif + --type mean) + +add_test(NAME exTvReadImageInfoTest + COMMAND otbApplicationLauncherCommandLine + ReadImageInfo + --modulePath $<TARGET_FILE_DIR:otbapp_ReadImageInfo> + --in ${INPUTDATA}/poupees.tif ) -- GitLab