Commit 0d3ded0b authored by Manuel Grizonnet's avatar Manuel Grizonnet

TEST: restore tests in foreach loops

parent 327d9729
......@@ -598,85 +598,6 @@ otb_add_test(NAME uaTvRPCSolverAdapterValidationTest COMMAND otbOSSIMAdaptersTes
)
# --------------------------------------------------------------------------------
# Manage PHR data input
if(OTB_DATA_USE_LARGEINPUT)
set(GenericTestPHR_DATA_INPUTS
${GenericTestPHR_DATA_INPUTS}
${OTB_DATA_LARGEINPUT_ROOT}/PLEIADES-PRE/TLSE_JP2_ORTHO_DIMAPv2_PMS-N_lossy_12bits/IMG_PHR1Z_PMS_N_001/IMG_PHR1A_PMS-N_201006181052297_ORT_IPU_20111011_0619-001_R1C1.JP2
${OTB_DATA_LARGEINPUT_ROOT}/PLEIADES-PRE/TLSE_TIFF_ORTHO_DIMAPv2_MS_lossless_8bits/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201006181052297_ORT_IPU_20111109_7807-004_R1C1.TIF
${OTB_DATA_LARGEINPUT_ROOT}/PLEIADES-PRE/TLSE_TIFF_PRIMARY_DIMAPv2_MS_lossly_12bits/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201006181052297_SEN_IPU_20111025_3077-004_R1C1.TIF
${OTB_DATA_LARGEINPUT_ROOT}/PLEIADES/TLSE_JP2_DIMAPv2_PRIMARY_PMS_lossless_12bits/IMGPHR_201222215194743808/IMG_PHR1A_PMS_201201151100183_SEN_IPU_20120222_0901-001_R2C1.JP2
${OTB_DATA_LARGEINPUT_ROOT}/PLEIADES/LASVEGAS_JP2_DIMAPv1_PRIMARY_PMS_lossless_12bits/IMGPHR_PHR1A_SENSOR_20120217_IPU_20120217_5374-001_V1/IMG_R1C1.JP2
${OTB_DATA_LARGEINPUT_ROOT}/PLEIADES/PARIS_JP2_DIMAPv1_ORTHO_PMS_lossless_12bits/IMGPHR_PHR1A_ORTHO_20120502_IPU_20120430_6347-003_V1/IMG_R1C1.JP2
)
set(GenericTestPHR_DATA_TYPES
${GenericTestPHR_DATA_TYPES}
SIMUL_PHR_JP2_ORTHO_DIMAPv2_PMS-N_lossy_12bits
SIMUL_PHR_TIFF_ORTHO_DIMAPv2_MS_lossless_8bits
SIMUL_PHR_TIFF_PRIMARY_DIMAPv2_MS_lossy_12bits
PHR_JP2_DIMAPv2_PRIMARY_PMS_lossless_12bits
PHR_JP2_DIMAPv1_PRIMARY_PMS_lossless_12bits
PHR_JP2_DIMAPv1_ORTHO_PMS_lossless_12bits
)
set(GenericTestSPOT6_DATA_INPUTS
${GenericTestSPOT6_DATA_INPUTS}
${OTB_DATA_LARGEINPUT_ROOT}/SPOT6/SPOT6_Ortho_Bundle_12_bits/PROD_SPOT6_001/VOL_SPOT6_001_A/IMG_SPOT6_MS_001_A/IMG_SPOT6_MS_201306031242000_ORT_816005101_R1C1.JP2
${OTB_DATA_LARGEINPUT_ROOT}/SPOT6/SPOT6_Ortho_Pan-sharpened_12_bits/PROD_SPOT6_001/VOL_SPOT6_001_A/IMG_SPOT6_PMS_001_A/IMG_SPOT6_PMS_201305251604372_ORT_816009101_R1C1.JP2
${OTB_DATA_LARGEINPUT_ROOT}/SPOT6/SPOT6_Primary_Bundle_12_bits/PROD_SPOT6_001/VOL_SPOT6_001_A/IMG_SPOT6_MS_001_A/IMG_SPOT6_MS_201211100138085_SEN_816007101_R1C1.JP2
)
set(GenericTestSPOT6_DATA_TYPES
${GenericTestSPOT6_DATA_TYPES}
SPOT6_Ortho_Bundle_12_bits
SPOT6_Ortho_Pan-sharpened_12_bits
SPOT6_Primary_Bundle_12_bits
)
endif()
if(OTB_DATA_USE_SPOTPHRINPUT)
set(GenericTestPHR_SPOT_DATA_INPUTS
${SPOTPHRINPUT}/ORTHO_UTM_BUNDLE/IMG_PHR1A_P_001/IMG_PHR1A_P_201006181052297_ORT_IPU_20120221_8798-001_R1C1.JP2
${SPOTPHRINPUT}/ORTHO_UTM_BUNDLE/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201006181052297_ORT_IPU_20120221_8798-002_R1C1.JP2
${SPOTPHRINPUT}/PRIMARY_BUNDLE/IMG_PHR1A_P_001/IMG_PHR1A_P_201006181052297_SEN_IPU_20120221_8686-001_R1C1.JP2
${SPOTPHRINPUT}/PRIMARY_BUNDLE/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201006181052297_SEN_IPU_20120221_8686-002_R1C1.JP2
${SPOTPHRINPUT}/ORTHO_GEOGRAPHIC_BUNDLE/IMG_PHR1A_P_001/IMG_PHR1A_P_201006181052297_ORT_IPU_20120221_8718-001_R1C1.JP2
${SPOTPHRINPUT}/ORTHO_GEOGRAPHIC_BUNDLE/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201006181052297_ORT_IPU_20120221_8718-002_R1C1.JP2
)
set(GenericTestPHR_SPOT_DATA_TYPES
SPOT_PHR_ORTHO_UTM_P
SPOT_PHR_ORTHO_UTM_MS
SPOT_PHR_ORTHO_GEO_P
SPOT_PHR_ORTHO_GEO_MS
SPOT_PHR_PRIMARY_MS
SPOT_PHR_PRIMARY_P
)
set(GenericTestPHR_DATA_INPUTS ${GenericTestPHR_DATA_INPUTS} ${GenericTestPHR_SPOT_DATA_INPUTS})
set(GenericTestPHR_DATA_TYPES ${GenericTestPHR_DATA_TYPES} ${GenericTestPHR_SPOT_DATA_TYPES})
endif()
if(OTB_DATA_USE_CNESPHRINPUT)
set(GenericTestPHR_CNES_DATA_INPUTS
${CNESPHRINPUT}/PRIMARY_PMS/IMGPHR_201212716417737721/IMG_PHR1A_PMS_201201151100183_SEN_IPU_20120127_5579-001_R1C1.JP2
${CNESPHRINPUT}/PRIMARY_PMS/IMGPHR_201222215194743808/IMG_PHR1A_PMS_201201151100183_SEN_IPU_20120222_0901-001_R1C1.JP2
${CNESPHRINPUT}/PRIMARY_PMS/IMGPHR_201222215194743808/IMG_PHR1A_PMS_201201151100183_SEN_IPU_20120222_0901-001_R3C1.JP2
)
set(GenericTestPHR_CNES_DATA_TYPES
CNES_PHR_PRIMARY_PMS_R1C1_2012-01-27
CNES_PHR_PRIMARY_PMS_R1C1_2012-02-22
CNES_PHR_PRIMARY_PMS_R3C1_2012-02-22
)
set(GenericTestPHR_DATA_INPUTS ${GenericTestPHR_DATA_INPUTS} ${GenericTestPHR_CNES_DATA_INPUTS})
set(GenericTestPHR_DATA_TYPES ${GenericTestPHR_DATA_TYPES} ${GenericTestPHR_CNES_DATA_TYPES})
endif()
if(OTB_DATA_USE_LARGEINPUT OR OTB_DATA_USE_SPOTPHRINPUT OR OTB_DATA_USE_CNESPHRINPUT)
set( GenericTestPHR_TESTNB 0)
......
......@@ -389,3 +389,72 @@ otb_add_test(NAME feTvMetaImageFunction COMMAND otbImageBaseTestDriver
otb_add_test(NAME feTuMetaImageFunctionNew COMMAND otbImageBaseTestDriver
otbMetaImageFunctionNew
)
if(OTB_DATA_USE_LARGEINPUT OR OTB_DATA_USE_SPOTPHRINPUT OR OTB_DATA_USE_CNESPHRINPUT)
set( GenericTestPHR_TESTNB 0)
foreach( current_file ${GenericTestPHR_DATA_INPUTS} )
list(GET GenericTestPHR_DATA_TYPES ${GenericTestPHR_TESTNB} current_type )
math(EXPR GenericTestPHR_TESTNB "${GenericTestPHR_TESTNB} + 1")
string(REGEX MATCH "TIFF" PHR_TIFF_FILE ${current_type})
# Read info from the input file
otb_add_test(NAME ioTvVectorImageReadingInfo_${current_type} COMMAND otbImageBaseTestDriver
--ignore-order --compare-ascii ${EPSILON_9} ${BASELINE_FILES}/ioTvMultiResolutionReading_${current_type}.txt
${TEMP}/ioTvMultiResolutionReading_${current_type}_OUT.txt
--ignore-lines-with 3 CacheSizeInBytes Driver Corner
otbVectorImageTest
${current_file}?&resol=0
${TEMP}/ioTvMultiResolutionReading_${current_type}_OUT.txt
)
if(NOT PHR_TIFF_FILE)
# Read info from the input file (res=5)
otb_add_test(NAME ioTvVectorImageReadingInfo_${current_type}_res5 COMMAND otbImageBaseTestDriver
--ignore-order --compare-ascii ${EPSILON_9} ${BASELINE_FILES}/ioTvMultiResolutionReading_${current_type}_res5.txt
${TEMP}/ioTvMultiResolutionReading_${current_type}_res5_OUT.txt
--ignore-lines-with 3 CacheSizeInBytes Driver Corner
otbVectorImageTest
${current_file}?&resol=5
${TEMP}/ioTvMultiResolutionReading_${current_type}_res5_OUT.txt
)
# Decode an area inside one tile
otb_add_test(NAME ioTvReaderWriterJP22TIF_${current_type}_1 COMMAND otbImageBaseTestDriver
--compare-image ${EPSILON_9} ${BASELINE}/ioTvJP22TIF_Extract_${current_type}_1.tif
${TEMP}/ioTvJP22TIF_Extract_${current_type}_1_OUT.tif
otbMultiChannelExtractROI
-ushort ${current_file}
-ushort ${TEMP}/ioTvJP22TIF_Extract_${current_type}_1_OUT.tif
-startX 256 -startY 512 -sizeX 256 -sizeY 128
-time
)
# Decode an area which need 4 tiles
otb_add_test(NAME ioTvReaderWriterJP22TIF_${current_type}_2 COMMAND otbImageBaseTestDriver
--compare-image ${EPSILON_9} ${BASELINE}/ioTvJP22TIF_Extract_${current_type}_2.tif
${TEMP}/ioTvJP22TIF_Extract_${current_type}_2_OUT.tif
otbMultiChannelExtractROI
-ushort ${current_file}
-ushort ${TEMP}/ioTvJP22TIF_Extract_${current_type}_2_OUT.tif
-startX 2000 -startY 2000 -sizeX 256 -sizeY 128
-time
)
# Decode the whole image with the lowest resolution (res=5)
# (take only one channel to put the file in baseline repository)
#write only a subpart of the output image using the extended parameter "box"
otb_add_test(NAME ioTvReaderWriterJP22TIF_${current_type}_res5 COMMAND otbImageBaseTestDriver
--compare-image ${EPSILON_9} ${BASELINE}/ioTvJP22TIF_Extract_${current_type}_res5.tif
${TEMP}/ioTvJP22TIF_Extract_${current_type}_res5_OUT.tif
otbMultiChannelExtractROI
-ushort ${current_file}?resol=5
-ushort ${TEMP}/ioTvJP22TIF_Extract_${current_type}_res5_OUT.tif?&box=0:0:128:128
-channels 1
-time
)
endif()
endforeach()
endif()
......@@ -58,3 +58,23 @@ otb_add_test(NAME ioTvJPEG2000ImageIO_CacheSize_25000 COMMAND otbIOJPEG2000TestD
${INPUTDATA}/bretagne.j2k
${TEMP}/ioClassicalQLJPEG2K_bretagne_OUT.tif)
if(OTB_DATA_USE_LARGEINPUT OR OTB_DATA_USE_SPOTPHRINPUT OR OTB_DATA_USE_CNESPHRINPUT)
set( GenericTestPHR_TESTNB 0)
foreach( current_file ${GenericTestPHR_DATA_INPUTS} )
list(GET GenericTestPHR_DATA_TYPES ${GenericTestPHR_TESTNB} current_type )
math(EXPR GenericTestPHR_TESTNB "${GenericTestPHR_TESTNB} + 1")
string(REGEX MATCH "TIFF" PHR_TIFF_FILE ${current_type})
if(NOT PHR_TIFF_FILE)
# CanRead
otb_add_test(NAME ioTuJ2KImageIOCanRead_${current_type} COMMAND otbIOJPEG2000TestDriver
otbJPEG2000ImageIOTestCanRead
${current_file}
)
endif()
endforeach()
endif()
......@@ -918,3 +918,27 @@ otb_add_test(NAME ioTvCompareWritingComplexImage_HDR COMMAND otbImageIOTestDrive
${TEMP}/ioTvImageFileReaderCompareComplexPixelWithFloatPixel_PALSAR.hdr
0 0 100 100)
if(OTB_DATA_USE_LARGEINPUT OR OTB_DATA_USE_SPOTPHRINPUT OR OTB_DATA_USE_CNESPHRINPUT)
set( GenericTestPHR_TESTNB 0)
foreach( current_file ${GenericTestPHR_DATA_INPUTS} )
list(GET GenericTestPHR_DATA_TYPES ${GenericTestPHR_TESTNB} current_type )
math(EXPR GenericTestPHR_TESTNB "${GenericTestPHR_TESTNB} + 1")
string(REGEX MATCH "TIFF" PHR_TIFF_FILE ${current_type})
if(NOT PHR_TIFF_FILE)
# Extract resolution of input file
otb_add_test(NAME ioTvMultiResolutionReadingInfo_${current_type} COMMAND otbImageIOTestDriver
--compare-ascii ${EPSILON_9} ${BASELINE_FILES}/ioTvMultiResolutionReadingInfo_${current_type}.txt
${TEMP}/ioTvMultiResolutionReadingInfo_${current_type}_OUT.txt
otbMultiResolutionReadingInfo
${current_file}
${TEMP}/ioTvMultiResolutionReadingInfo_${current_type}_OUT.txt
)
endif()
endforeach()
endif()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment