CMakeLists.txt 5.25 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
otb_module_test()

set(OTBApplicationEngineTests
otbApplicationEngineTestDriver.cxx
otbWrapperApplicationTest.cxx
otbWrapperParameterTest.cxx
otbWrapperInputImageParameterTest.cxx
otbWrapperNumericalParameterTest.cxx
otbWrapperStringParameterTest.cxx
otbWrapperChoiceParameterTest.cxx
otbWrapperApplicationRegistryTest.cxx
otbWrapperStringListParameterTest.cxx
otbWrapperRAMParameterTest.cxx
otbWrapperDocExampleStructureTest.cxx
otbWrapperParameterKeyTest.cxx
otbWrapperParameterListTest.cxx
otbWrapperEmptyParameterTest.cxx
otbWrapperInputImageListParameterTest.cxx
otbWrapperInputVectorDataListParameterTest.cxx
otbWrapperApplicationDocTests.cxx
otbWrapperApplicationHtmlDocGeneratorTest.cxx
otbWrapperInputVectorDataParameterTest.cxx
otbWrapperOutputImageParameterTest.cxx
24
otbApplicationMemoryConnectTest.cxx
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
)

add_executable(otbApplicationEngineTestDriver ${OTBApplicationEngineTests})
target_link_libraries(otbApplicationEngineTestDriver ${OTBApplicationEngine-Test_LIBRARIES})
otb_module_target_label(otbApplicationEngineTestDriver)

# Tests Declaration

otb_add_test(NAME owTuApplication COMMAND otbApplicationEngineTestDriver
  otbWrapperApplicationNew
  )

otb_add_test(NAME owTvParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperParameterTest1
  "param1"
  )

otb_add_test(NAME owTuParameterNew COMMAND otbApplicationEngineTestDriver
  otbWrapperParameterNew
  )

otb_add_test(NAME owTvInputImageParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperInputImageParameterTest1
  ${INPUTDATA}/poupees.tif
  "mykey"
  "my description"
  )

otb_add_test(NAME owTuInputImageParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperInputImageParameterNew
  )

otb_add_test(NAME owTuNumericalParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperNumericalParameterNew
  )

otb_add_test(NAME owTvNumericalParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperNumericalParameterTest1
  42.42
  "mykey"
  "my description"
  )

otb_add_test(NAME owTuStringParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperStringParameterNew
  )

otb_add_test(NAME owTvStringParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperStringParameterTest1
  "value1"
  "mykey"
  "my description"
  )

otb_add_test(NAME owTvApplicationRegistry COMMAND otbApplicationEngineTestDriver
  otbWrapperApplicationRegistry
  )

otb_add_test(NAME owTuStringListParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperStringListParameterNew
  )

otb_add_test(NAME owTvStringListParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperStringListParameterTest1
  "value1"
  "value2"
  "value3"
  "mykey"
  "my description"
  )

otb_add_test(NAME owTvParameterRAM COMMAND otbApplicationEngineTestDriver
  otbWrapperRAMParameterNew
  )

otb_add_test(NAME owTvParameterKey COMMAND otbApplicationEngineTestDriver
  otbWrapperParameterKey
  )

otb_add_test(NAME owTuEmptyParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperEmptyParameterNew
  )

otb_add_test(NAME owTuInputImageListParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperInputImageListParameterNew
  )

otb_add_test(NAME owTvInputImageListParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperInputImageListParameterTest1
  ${INPUTDATA}/poupees_c1.hdr
  ${INPUTDATA}/poupees.tif
  "mykey"
  "my description"
  )

otb_add_test(NAME owTuInputVectorDataListParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperInputVectorDataListParameterNew
  )

otb_add_test(NAME owTvInputVectorDataListParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperInputVectorDataListParameterTest1
  ${INPUTDATA}/ToulousePoints-examples.shp
  ${INPUTDATA}/ToulouseRoads-examples.shp
  "mykey"
  "my description"
  )

otb_add_test(NAME owTvApplicationHtmlDocGeneratorTest
  COMMAND otbApplicationEngineTestDriver
  --compare-ascii ${NOTOL}
  ${BASELINE}/owTvOReadImageInfoDoc.html
  ${TEMP}/owTvOReadImageInfoDoc.html
  otbWrapperApplicationHtmlDocGeneratorTest1
  ReadImageInfo
  $<TARGET_FILE_DIR:otbapp_ReadImageInfo>
  ${TEMP}/owTvOReadImageInfoDoc.html
  0 # don't show key in the parameterdescription
  )

otb_add_test(NAME owTvApplicationHtmlDocGeneratorNew COMMAND otbApplicationEngineTestDriver
  otbWrapperApplicationHtmlDocGeneratorNew
  )

otb_add_test(NAME owTuInputVectorDataParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperInputVectorDataParameterNew
  )

otb_add_test(NAME owTuOutputImageParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperOutputImageParameterNew
  )

otb_add_test(NAME owTvOutputImageParameter COMMAND otbApplicationEngineTestDriver
  otbWrapperOutputImageParameterTest1
  ${INPUTDATA}/poupees.tif
  ${TEMP}/owTvOutputImageParameter2.tif
  "mykey"
  "my description"
  )

164
otb_add_test(NAME owTvDocExampleStructureTest COMMAND otbApplicationEngineTestDriver
165 166 167 168 169 170 171 172 173 174 175
  --compare-ascii ${NOTOL}
  ${BASELINE}/owTuDocExampleStructureTest.txt
  ${TEMP}/owTuDocExampleStructureTest.txt
  otbWrapperDocExampleStructureTest
  ${TEMP}/owTuDocExampleStructureTest.txt
  )

otb_add_test(NAME owTuDocExampleStructureNew COMMAND otbApplicationEngineTestDriver
  otbWrapperDocExampleStructureNew
  )

176
otb_add_test(NAME owTvApplicationMemoryConnectTest COMMAND otbApplicationEngineTestDriver otbApplicationMemoryConnectTest
177
  $<TARGET_FILE_DIR:otbapp_Smoothing>
178 179
  ${INPUTDATA}/poupees.tif
  ${TEMP}/owTvApplicationMemoryConnectTestOutput.tif)