Improve non-regression testing methods
OTBTestDriver is used to compare results (images, vector files, ascii files, ..) in OTB unit tests. For ogr data, this driver compares different features (ie : nb of fields, nb of features, geometry, etc.) and then compares each feature by dropping content to an ASCII file and comparing reference and result.
=> There are a lot of temporary files written in temporary/testing folder and it may not be very efficient.
Here are some ideas to improve this behavior (thanks @gpasero for the explanations !) :
- the better solution would be to delegate this comparison to a specific OGR API (see GDAL API ?)
- we could compare md5 of result and reference file, and if there is a difference, compare the features : in most cases, it would save some time writing the temporary files.. But we need to get a MD5 sum API that we could call from the C++ test driver
- instead of writing ASCII files for each feature, we could drop content in two Strings and compare them. If there is a difference, the two Strings could be written to a file, as we do now.
=> This subject should be discussed to find the best solution !