Hi Lucas, Jiri, Lukas, On (Thu) Nov 25 2010 [17:28:57], Lucas Meneghel Rodrigues wrote: > From: Jiri Zupka <jzupka@xxxxxxxxxx> > > This patch changes structure of the virtio_console test and > prepares this test for simpler porting of another required tests. > > It creates a new layer for running the elementary tests allowing > them to non-critically fail and let the test to finish the whole test loop. > > Tests are divided into parts but their behavior is preserved. > The patch also includes some code correction. > > Class which makes statistic and start subtest is named SubTest. > Usage: > def test_func(parma1, param2): > if somethink: > raise error.TestFail("Somethink") You mean 'something' ;-) > > def clean_func(param1, param2, param3): > clean > > test = SubTest() > > #set cleanup function when subtest crash. > test.set_cleanup_func(clean_func, [param1, param2, ..]) > > #start test > test.do_test(test_func,[params..]) > test.do_test(test_func,[params..],true) > ^^^^ - test is critical. > > #return statistic > print test.get_text_result() > > if any non-critical subtests fails the particular test finishes and calls > the clean-up function. Then the test-loop continues with the next > elementary subtest. Although SubTest class displays information > about the subtest problem. If the clean-up function also failed or > subtest was critical, then the whole test will be interrupted. > > At the end of the test-loop it summarizes the passed/failed tests and > print out the possible subtest trace-backs. Excellent, I'm very happy to see this. I think with this, the infrastructure will be on par with the test-virtserial tests. Just a few tests are remaining now, but I can finally dump test-virtserial once this goes in. Thanks a lot! > diff --git a/client/tests/kvm/scripts/virtio_guest.py b/client/tests/kvm/scripts/virtio_guest.py > index 4862ef2..87727c7 100755 > --- a/client/tests/kvm/scripts/virtio_guest.py > +++ b/client/tests/kvm/scripts/virtio_guest.py > @@ -3,35 +3,23 @@ > """ > Auxiliary script used to send data between ports on guests. > > -@copyright: 2008-2009 Red Hat Inc. > +@copyright: 2010 Red Hat, Inc. You can have 2008-2010. Amit -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html