Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Fix
itkXMLFileOutputWindowTest
regression
Fix `itkXMLFileOutputWindowTest` regression: delete the contents of the target file prior to writing new lines when no filename is given. When no filename is provided, the `itk::XMLFileOutputWindow` class uses a hard-coded filename to flush the buffer contents. If the CI builds do not clean the target folder, as the append flag is set to `On`, lines will be appended to the existing file, and the check on the written lines will fail. Removing the contents of the file is preferred over computing the difference of the existing line count with respect to the new line count, since the file will otherwise grow without bounds. Fixes: ``` Error in numLinesRead == numLinesExpected In ITK/Modules/Core/Common/test/itkXMLFileOutputWindowTest.cxx, line 86 lh: 47 rh: 7 Expression is not equal ``` raised for example in: https://open.cdash.org/test/669234154
- Loading branch information