Red Hat Bugzilla – Bug 468918
FEAT: HTS should check for hardware changes before running tests
Last modified: 2014-03-25 20:55:44 EDT
Description of problem:
HTS should check if the current hardware matches that from any previous test runs.
If differences in hardware are found, HTS should offer the user the option of either aborting the test run. If the user elects to continue, HTS will add or remove tests as appropriate for the hardware changes. Results from previous runs will not be affected.
Created attachment 322316 [details]
hardwaretest.py patch adding planning checks
This patch adds a function to check any existing test plan against the current hardware and test library. Test planning is now performed on every invocation of the "plan", "certify" and "run" commands. If there are differences found, the user is notified and asked if they would like to continue.
If the user elects to continue, the test plan is updated in the database, and the command continues.
Created attachment 322317 [details]
certificationtest.py patch to revise status attributes
This patch revises status attributes for tests stored in the database. The XML records for tests had storaged whether a test was enabled or disabled in a boolean attribute "disabled". For the new plan/hardware checks, a third state was needed to represent tests that had been deleted from the plan. So the "disabled" attribute was replaced with a "status" attribute that has the states, "disabled", "enabled", or "deleted".
Created attachment 322318 [details]
planner.py patch to add checkPlan funtion
This patch adds the checkPlan function to the Planner class. This function compares the test plan from the database to a new plan. Test instances are
matched by generating keys of the form <test name>-<udi>-<logical device name>.
The function returns three collections to the caller (hardwaretest.py's UI code) so that the plan may be updated depending on the user's response.
Created attachment 322321 [details]
report.py patch adding format function
Added a formatting function.
Created attachment 322322 [details]
tags.py patch to add status attribute and values
Created attachment 322338 [details]
test.py patch for tracking test planning source
This patch adds code to track the source of a scheduled test: HAL, Kudzu, or if the test was manually scheduled via "hts plan --add".
Verified in hts-5.3-12, it showed "Warning: The hardware devices have changes. Additional tests are required: ... Would you like to continue? (y|n)" if the hardware changed.
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.