From 48f8b9bb2c5b50fa4a393be9d8bf8f8ea672cd96 Mon Sep 17 00:00:00 2001 From: Julien Malik <julien.malik@c-s.fr> Date: Tue, 20 Sep 2011 10:41:12 +0200 Subject: [PATCH] TEST: run the applications test through both otbTestDriver and otbApplicationLauncherCommandLine --- Testing/Applications/CMakeLists.txt | 3 +++ Testing/Applications/Util/CMakeLists.txt | 23 ++++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Testing/Applications/CMakeLists.txt b/Testing/Applications/CMakeLists.txt index 1517300c8a..2cf36e4563 100644 --- a/Testing/Applications/CMakeLists.txt +++ b/Testing/Applications/CMakeLists.txt @@ -1,4 +1,7 @@ set(INPUTDATA ${OTB_DATA_ROOT}/Input) set(TEMP ${OTB_BINARY_DIR}/Testing/Temporary) +SET(TOL 0.0) +SET(EPSILON 0.000000000001) + add_subdirectory(Util) diff --git a/Testing/Applications/Util/CMakeLists.txt b/Testing/Applications/Util/CMakeLists.txt index 0a9a5c60bd..aa220125d4 100644 --- a/Testing/Applications/Util/CMakeLists.txt +++ b/Testing/Applications/Util/CMakeLists.txt @@ -1,6 +1,11 @@ +set(TEST_DRIVER otbTestDriver + --add-before-env ITK_AUTOLOAD_PATH $<TARGET_FILE_DIR:otbapp_Smoothing> ) + + add_test(NAME exTvRescaleTest - COMMAND otbApplicationLauncherCommandLine + COMMAND otbTestDriver + Execute $<TARGET_FILE:otbApplicationLauncherCommandLine> Rescale --modulePath $<TARGET_FILE_DIR:otbapp_Rescale> --in ${INPUTDATA}/poupees.tif @@ -9,7 +14,8 @@ add_test(NAME exTvRescaleTest --outmax 150 ) add_test(NAME exTvSmoothingTest - COMMAND otbApplicationLauncherCommandLine + COMMAND otbTestDriver + Execute $<TARGET_FILE:otbApplicationLauncherCommandLine> Smoothing --modulePath $<TARGET_FILE_DIR:otbapp_Smoothing> --in ${INPUTDATA}/poupees.tif @@ -17,7 +23,18 @@ add_test(NAME exTvSmoothingTest --type mean) add_test(NAME exTvReadImageInfoTest - COMMAND otbApplicationLauncherCommandLine + COMMAND otbTestDriver + Execute $<TARGET_FILE:otbApplicationLauncherCommandLine> ReadImageInfo --modulePath $<TARGET_FILE_DIR:otbapp_ReadImageInfo> --in ${INPUTDATA}/poupees.tif ) + +add_test(NAME exTvExtractROIRightInputFile + COMMAND otbTestDriver --compare-image ${TOL} + ${INPUTDATA}/couleurs_extrait.png + ${TEMP}/utExtractROIRightInputFile.tif + Execute $<TARGET_FILE:otbApplicationLauncherCommandLine> + ExtractROI + --modulePath $<TARGET_FILE_DIR:otbapp_ExtractROI> + --in ${INPUTDATA}/couleurs_extrait.png + --out ${TEMP}/utExtractROIRightInputFile.tif ) -- GitLab