Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
env_process: Refactor version info logging step
After checking all test-relevant package versions, the dict carrying the information must be logged into the test data. That was done in the preprocess and postprocess functions in virttest.env_process. Write a Setuper subclass that implements that in the setup method and register the setuper in the env_process setup_manager. While on it, remove the version_info dict from virttest.env_process as it was the last element using it. Move it to the virttest.test_setup.requirement_checks submodule instead, where a bunch of classes that we just refactored use it. Now, if we compare the API of virttest.env_process to the one existing in 753d3f5, it remains the same. This is a patch from a larger patch series refactoring the env_process preprocess and postprocess functions. In each of these patches, a pre/post process step is identified and replaced with a Setuper subclass so the following can finally be met: - Only cleanup steps of successful setup steps are run to avoid possible environment corruption or hard to read errors. - Running setup/cleanup steps symmetrically during env pre/post process. - Reduce explicit pre/post process function code length. Signed-off-by: Beñat Gartzia Arruabarrena <bgartzia@redhat.com>
- Loading branch information