Fix tests writing to current work dir#24343
Conversation
| char const * filenames[] = { | ||
| "core_io_base64_other_test.yml", | ||
| "core_io_base64_other_test.xml", | ||
| "core_io_base64_other_test.json", | ||
| "core_io_base64_other_test.yml?base64", | ||
| "core_io_base64_other_test.xml?base64", | ||
| "core_io_base64_other_test.json?base64", | ||
| 0 | ||
| }; | ||
| char const * real_name[] = { | ||
| "core_io_base64_other_test.yml", | ||
| "core_io_base64_other_test.xml", | ||
| "core_io_base64_other_test.json", | ||
| "core_io_base64_other_test.yml", | ||
| "core_io_base64_other_test.xml", | ||
| "core_io_base64_other_test.json", |
There was a problem hiding this comment.
In this test we iterate over 3 formats (yml, xml,json) and 2 modes (default, base64). These two arrays contained 6 items each for actual file name and accessed file name (with base64 suffix). I've replaced these arrays with calculated values: name = filename[n/2], suffix = n%2 ? '' : 'base64'.
Detailsi tried every thing even that change file location D drive to C Drive . Usage questions should go to Users OpenCV Q/A forum: https://forum.opencv.org/ |
Fix tests writing to current work dir opencv#24343 Several tests were writing files in the current work directory and did not clean up after test. Moved all temporary files to the `/tmp` dir and added a cleanup code.
Fix tests writing to current work dir opencv#24343 Several tests were writing files in the current work directory and did not clean up after test. Moved all temporary files to the `/tmp` dir and added a cleanup code.
Fix tests writing to current work dir opencv#24343 Several tests were writing files in the current work directory and did not clean up after test. Moved all temporary files to the `/tmp` dir and added a cleanup code.
Several tests were writing files in the current work directory and did not clean up after test. Moved all temporary files to the
/tmpdir and added a cleanup code.