From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Huff Subject: kvm_autotest: dynamically load tests Date: Tue, 28 Apr 2009 17:48:45 -0400 Message-ID: <1240955328-23358-1-git-send-email-dhuff@redhat.com> To: kvm@vger.kernel.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:58865 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753103AbZD1VtX (ORCPT ); Tue, 28 Apr 2009 17:49:23 -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 n3SLnNE3004194 for ; Tue, 28 Apr 2009 17:49:24 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3SLnNSF022270 for ; Tue, 28 Apr 2009 17:49:23 -0400 Received: from localhost.localdomain (dhcp231-89.rdu.redhat.com [10.11.231.89]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3SLnMrR014937 for ; Tue, 28 Apr 2009 17:49:22 -0400 Sender: kvm-owner@vger.kernel.org List-ID: 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.