From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uri Lublin Subject: Re: kvm_autotest: dynamically load tests Date: Wed, 27 May 2009 14:46:34 +0300 Message-ID: <4A1D281A.7040401@redhat.com> References: <1240955328-23358-1-git-send-email-dhuff@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: David Huff Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44154 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755360AbZE0Lqk (ORCPT ); Wed, 27 May 2009 07:46:40 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4RBkgR8024743 for ; Wed, 27 May 2009 07:46:42 -0400 In-Reply-To: <1240955328-23358-1-git-send-email-dhuff@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: David Huff wrote: > looking for comments/feedback.... > > These relatively simple changes to kvm_runtest_2 will allow for the addition of new tests without having modifying kvm_runtest "code." > > One would just add a newtest.py file and update the config file. This will simplify test development and make it easier to deploying new tests in an existing environment. > > The patch looks for tests that are not statically defined in kvm_runtest_2.py in ./kvm-autotest/client/tests/kvm_runtest_2/kvm_tests/'testname'.py and dynamically loads a module with a corresponding method run_'testname' where testname is defined by the "type" parameter in the config file. Hi David, I'm not sure this patch-set makes development much easier, as it only saves adding one line (entry) in test_routines table, but is less flexible (e.g. force file-name and function-name of test routines). Moving the test to a separate kvm_tests directory can be done without dynamic load of the tests. I don't have strong feelings about it though. What others think ? Thanks, Uri.