CMakeLists.txt 3.84 KB
Newer Older
1
set(TEST_DRIVER otbTestDriver
2
    --add-before-env PYTHONPATH        "${OTBSWIGWrapper_BINARY_DIR}/src"
3
    --add-before-env PYTHONPATH        $<TARGET_FILE_DIR:_otbApplication>
4
    --add-before-env OTB_APPLICATION_PATH $<TARGET_FILE_DIR:otbapp_Smoothing> )
Julien Malik's avatar
Julien Malik committed
5

6 7
if(WIN32)
  # on windows, loading the module _otbApplication requires the otbossimplugins*.dll
8
  # which is in the 'bin/<CMAKE_BUILD_TYPE>' folder
9
  set(TEST_DRIVER ${TEST_DRIVER}
10
    --add-before-env PATH $<TARGET_FILE_DIR:OTBCommon>)
11 12
endif(WIN32)

13
add_test( NAME pyTvSmoothing
14 15 16 17 18
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  PythonSmoothingTest
  ${OTB_DATA_ROOT}/Input/ToulouseExtract_WithGeom.tif
  ${TEMP}/pyTvSmoothing_ )
19 20

add_test( NAME pyTvRescale
21 22 23 24 25
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  PythonRescaleTest
  ${OTB_DATA_ROOT}/Input/ToulouseExtract_WithGeom.tif
  ${TEMP}/pyTvRescale)
26

27
add_test( NAME pyTvHyperspectralUnmixingUCLS
28 29 30 31 32 33 34 35
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  PythonHyperspectralUnmixing1
  ${OTB_DATA_ROOT}/Input/Hyperspectral/synthetic/hsi_cube.tif
  ${TEMP}/pyTvHyperspectralUnmixing_ucls.tif
  ${OTB_DATA_ROOT}/Input/Hyperspectral/synthetic/endmembers.tif
  ucls
  )
36

37
add_test( NAME pyTvBug440
38 39 40 41 42 43
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  Bug440
  ${OTB_DATA_ROOT}/Input/scene.png
  ${TEMP}/pyTvBug440Output.tif
  )
44

Julien Malik's avatar
Julien Malik committed
45
add_test( NAME pyTvBug804
46 47 48 49
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  Bug804
  )
Julien Malik's avatar
Julien Malik committed
50

Julien Malik's avatar
Julien Malik committed
51
add_test( NAME pyTvBug823
52 53 54 55
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  Bug823
  )
Julien Malik's avatar
Julien Malik committed
56

57
add_test( NAME pyTvBug736
58 59 60 61 62 63 64 65 66 67
  COMMAND ${TEST_DRIVER}
  --compare-image ${NOTOL}
  ${BASELINE}/apTvRIRadiometricVegetationIndices.tif
  ${TEMP}/pyTvBug736Output.tif
  Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  Bug736
  ${OTB_DATA_ROOT}/Input/veryverySmallFSATSW.tif
  ${TEMP}/pyTvBug736Output.tif
  )
68

69
add_test( NAME pyTvBandMathOutXML
70 71 72 73 74 75 76 77 78
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  PythonOutXMLTest
  ${OTB_DATA_ROOT}/Input/verySmallFSATSW_r.tif
  ${OTB_DATA_ROOT}/Input/verySmallFSATSW_nir.tif
  ${OTB_DATA_ROOT}/Input/verySmallFSATSW.tif
  ${TEMP}/pyTvBandMathOutXML.tif
  ${TEMP}/pyTvBandMathOutXML.xml
  )
79 80

add_test( NAME pyTvBandMathInXML
81 82 83 84 85 86 87 88 89
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  PythonInXMLTest
  ${INPUTDATA}/pyTvBandMathInXML.xml
  ${OTB_DATA_ROOT}/Input/verySmallFSATSW_r.tif
  ${OTB_DATA_ROOT}/Input/verySmallFSATSW_nir.tif
  ${OTB_DATA_ROOT}/Input/verySmallFSATSW.tif
  ${TEMP}/pyTvBandMathInXML.tif
  )
90

Rashad Kanavath's avatar
Rashad Kanavath committed
91
add_test( NAME pyTvNumpyIO
92 93 94 95 96
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  PythonNumpyTest
  ${OTB_DATA_ROOT}/Examples/ROI_QB_MUL_1_SVN_CLASS_MULTI.png
  ${TEMP}/pyTvNumpyIO_SmoothingOut.png )
97 98

add_test( NAME pyTvNewStyleParameters
99 100 101 102 103 104
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  PythonNewStyleParametersTest
  ${OTB_DATA_ROOT}/Input/poupees.tif
  ${TEMP}/pyTvNewStyleParametersTest.tif
  ${OTB_DATA_ROOT}/Input/apTvUtSmoothingTest_OutXML.xml)
105 106

add_test( NAME pyTvNewStyleParametersInstanciateAll
107 108 109 110
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  PythonNewStyleParametersInstanciateAllTest
  )
111

112 113 114 115 116 117
add_test( NAME pyTvConnectApplications
  COMMAND ${TEST_DRIVER} Execute
  ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
  PythonConnectApplications
  ${OTB_DATA_ROOT}/Input/poupees.tif
  ${TEMP}/pyTvConnectApplicationsOutput.tif)