Bug 488145

Summary: FEAT: HTS should provide a run-time dependency option for installation
Product: [Retired] Red Hat Hardware Certification Program Reporter: Greg Nichols <gnichols>
Component: Test Suite (harness)Assignee: Greg Nichols <gnichols>
Status: CLOSED ERRATA QA Contact: Lawrence Lim <llim>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: averma, rlandry, tools-bugs, yoyzhang
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-21 15:57:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
hardwaretest.py patch adding test-specified package installation
none
test.py patch defining a default getRequiredRPMs that returns an empy list.
none
fvtest.py patch with getRequiredRPMs implementation
none
hardwaretest.py patch on R22 adding --mode auto support none

Description Greg Nichols 2009-03-02 21:14:32 UTC
Description of problem:

The HTS package currently defines a full set of required packages for the whole test suite.   This approach means that it requires packages that are not allways needed to test a particular system.  For example, mt is required by the tape test, and the HTS package requires the mt package even if there's no tape drive in the system under test.

HTS should provide an alternative package with minimal required packages, and validate any required packages at run time according to scheduled tests.  This minimal rpm could be a separate package from the "full requires" version.

Comment 2 Greg Nichols 2010-01-11 11:52:48 UTC
Created attachment 382964 [details]
hardwaretest.py patch adding test-specified package installation

This patch adds test-specified package installation to the planning phase of the harness.   When a new test plan is created, the list of tests are checked for additional required packages.  If any are found that are not installed, the harness asks the user if they would like to isntall them.

If the user agrees, the hardness calls yum with the package list, then re-checks the required packages.   If the user does not agree, the harness prints a warning message.

Test-required packages are only checked when a new plan is created, not when the plan is changed via hardware detection, or user edits.

Comment 3 Greg Nichols 2010-01-11 11:53:59 UTC
Created attachment 382965 [details]
test.py patch defining a default getRequiredRPMs that returns an empy list.

Comment 4 Greg Nichols 2010-01-11 11:57:48 UTC
Created attachment 382966 [details]
fvtest.py patch with getRequiredRPMs implementation

+    def getRequiredRPMs(self):
+        rpms = ["qemu", "libvirt", "libvirt-python", "python-virtinst"]
+        return rpms
+    

Note that other tests may implement this function to do specific tests on hardware or RHEL configuration.

Comment 5 Greg Nichols 2010-01-11 15:43:49 UTC
Actually, there's no need to the qemu package under xen, so the function should be:

def getRequiredRPMs(self):
        rpms = ["libvirt", "libvirt-python", "python-virtinst"]
        if self.hypervisor == Constants.kvm:
            rpms.append('qemu')
        return rpms

Comment 6 Greg Nichols 2010-01-12 16:29:26 UTC
committed patches.

Comment 7 Greg Nichols 2010-01-13 00:53:18 UTC
Created attachment 383385 [details]
hardwaretest.py patch on R22 adding --mode auto support

In --mode auto, the required rpms are added automatically.

Comment 10 errata-xmlrpc 2010-04-21 15:57:46 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0365.html