diff --git a/Testing/Applications/CMakeLists.txt b/Testing/Applications/CMakeLists.txt index 27a862d784bc6555972d40850d06a6224af2fffd..ebdf1128454aa4869ebe40f2161ff7186111eef3 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 0000000000000000000000000000000000000000..0a9a5c60bd28d56dff67aadc2aeda81a8588e4c2 --- /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 )