On Monday 06 August 2012 13:58:58 you wrote: > On Mon, Aug 6, 2012 at 1:07 PM, Plamen Dimitrov > > <[email protected]> wrote: > > Dear Autotest team, > > > > What is the best way to deploy customized tests to a virtual machine using > > the autotest functionality of virt_test_utils? The run_autotest() > > function accepts only the control file and copies it into a special > > folder of the destination autotest directory, but what should we do with > > the actual test file? The guest autotest directory doesn't have the exact > > same structure like the host autotest directory, but it has folder tests > > which might seem to be appropriate. However, I am not sure how to make > > this more dynamically - what parameter should I change in the configs to > > make that happen? Or should I create a separate test just to copy files > > to a specific destination? > If you want to run an existing client autotest test, then you must > provide the test modules (that is, directories under client/tests/ > with the appropriate python files) and the control file. The mechanism > used to run autotest in a guest consists in creating a tarball of the > entire autotest client + tests and copying it to the VM using scp. So, > you probably want to: > > 1) Create a new branch > 2) Add the new tests as sub directories of client/tests/ > 3) Add the appropriate control files to client/virt/autotest_control/ > 4) Add the appropriate variants on client/virt/subtests.cfg.sample > > For other tests that do not require the execution of an autotest > client, you can get a living vm from the environment and then copying > the test files you want to the vm using the method vm.copy_files_to. > One example of it is the clock_getres test, you might look into it as > an example. > > I hope this was useful,
Thanks a lot! Perhaps it did not get clear that with the customized tests I actually meant separate directory of them. A part of the global config file which contains "test_dir" is copied to the global config of the guest autotest. However, this is a rather rigid solution since the original customized tests have to be reconstructed at the exact same location on the VM. On the other hand, copying to client/tests/ is the best solution for a temporary destination autotest which will be flushed on VM snapshot revert, etc. Both cases require additional test setup necessarily before or after the call of run_autotest(). Please correct me if I am wrong or if there is a best practice option that differs from these two. Best, _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
