Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(runtest): clean up after unit test
`parse_test` didn't clean up when the test finished and it left some files in `/tmp` (about 1.3GB in total). Because the filenames used by the test are deterministically generated a new test run would find a file created by a previous run and fail. E.g. the RO test would 'chmod' a file to be read-only, and would thus fail to be 'created' by a subsequent test that attempts to create a VHD by opening and closing it in RW mode. This doesn't fail on the CI or Koji because they always run the tests in a clean env, but it does fail locally when running the test multiple times. (Most of the time 'dune cache' will prevent rerunning the test, but not always, e.g. if you've just trimmed the cache because you were low on disk space). Register an `at_exit` handler that cleans up the files (we cannot clean up at the end of each function because some tests rely on files created by earlier steps). Signed-off-by: Edwin Török <[email protected]>
- Loading branch information