On Thu, Mar 14, 2013 at 1:26 PM, Yiqiao Pu <[email protected]> wrote: > Hi guys, > > This is a rfc patchset to introduce a new method for tests enviroment > cleanup. > It will makes the tests setup and cleanup the enviroment inside the tests > scripts > more easily. > > Here we will have a global list to handle the clean up functions which is > defined > and registed to the global list by the tests theirselves. And the clean up > functions > will be executed after the tests. > > This will help to some complex set up cases for the complex clean up check > steps. > > And if you guys like this idea, there are some further works can be done > with > this solution: > - Improve the postprocess and preprocess with this method, and make the > run_once > with less try blocks > - Make a utils_cleanup.py module for some commen use clean up operates > like > umount, delete files and so on. And makes the clean up in tests more > easier. >
I did like your idea a lot, Yiqiao. I've fixed some small mistakes and pushed it to next. I'm happy to take more patches to do the cleanups you've mentioned. Cheers! Lucas > Yiqiao Pu (2): > virttest: Add a module for cleaning up enviroment > qemu.tests: Use funcatexit to handle the clean up in transparent > hugepage test > > tests/trans_hugepage.py | 115 > ++++++++++++++++++++++++---------------------- > virt.py | 8 +++- > virttest/funcatexit.py | 68 ++++++++++++++++++++++++++++ > 3 files changed, 135 insertions(+), 56 deletions(-) > create mode 100644 virttest/funcatexit.py > > -- > 1.7.7.6 > > _______________________________________________ > Virt-test-devel mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/virt-test-devel > -- Lucas
_______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
