r697 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-04 15:26:27 +0000 (Tue, 04 Jan 2011)
New Revision: 697
Modified:
trunk/v7/certificationtest.py
Log:
659789 - Enhance command set for better usability and control of testing
Modified: trunk/v7/certificationtest.py
===================================================================
--- trunk/v7/certificationtest.py 2011-01-04 15:23:23 UTC (rev 696)
+++ trunk/v7/certificationtest.py 2011-01-04 15:26:27 UTC (rev 697)
@@ -210,14 +210,17 @@
tests = filteredTests
if options.tag:
- filteredTests = list()
- for test in tests:
- for tag in options.tag:
- if tag in test.getTags():
- filteredTests.append(test)
- tests = filteredTests
+ tests = self.getTaggedTests(tests, options.tag)
return tests
+
+ def getTaggedTests(self, tests, tags):
+ filteredTests = list()
+ for test in tests:
+ if test.getTags() and set(tags) & set(test.getTags()):
+ filteredTests.append(test)
+ return filteredTests
+
def getIncompleteTestsFromLastRun(self):
lastRunNumber = self.getNumberOfTestRuns()
13 years, 4 months
r696 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-04 15:23:23 +0000 (Tue, 04 Jan 2011)
New Revision: 696
Modified:
trunk/v7/planner.py
Log:
659789 - Enhance command set for better usability and control of testing
Modified: trunk/v7/planner.py
===================================================================
--- trunk/v7/planner.py 2011-01-04 02:07:48 UTC (rev 695)
+++ trunk/v7/planner.py 2011-01-04 15:23:23 UTC (rev 696)
@@ -91,25 +91,14 @@
def __plan(self, devices):
tests = list()
- if self.Debugging and self.options.tag:
- print "Planning tests tagged: %s" % (", ".join(self.options.tag))
-
-
for test in self.deviceTests:
- if self.Debugging:
- print "Planning test %s" % test.Name()
- # plan test if tags intersect - both sets must be non-empty
- if (self.options.tag and test.tags() and set(self.options.tag) & set(test.tags())):
- someTests = test.plan(self.devices)
- if someTests:
- if self.Debugging:
- print " planned %u tests" % len(someTests)
- if self.options.tag:
- print " matching tag(s): %s" % (", ".join(list(set(self.options.tag) & set(test.tags()))))
- tests.extend(someTests)
- elif self.Debugging:
- print "Test not planned, no matching tags"
-
+ if self.Debugging: print "Planning test %s" % test.Name()
+
+ someTests = test.plan(self.devices)
+ if someTests:
+ if self.Debugging: print " planned %u tests" % len(someTests)
+ tests.extend(someTests)
+
# sort by TestMetaData comparison: interactive 1st, then by priority
tests.sort()
if self.Debugging:
13 years, 4 months
r695 - trunk/docs/man
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-04 02:07:48 +0000 (Tue, 04 Jan 2011)
New Revision: 695
Modified:
trunk/docs/man/v7.8.in
Log:
659789 - Enhance command set for better usability and control of testing
Modified: trunk/docs/man/v7.8.in
===================================================================
--- trunk/docs/man/v7.8.in 2010-12-16 01:52:46 UTC (rev 694)
+++ trunk/docs/man/v7.8.in 2011-01-04 02:07:48 UTC (rev 695)
@@ -33,15 +33,36 @@
Prints a list of available commands and options.
+.B --mode { normal | auto }
+
+In
+.I auto
+mode, v7 runs non-interactively to the extent possible. Some user confirmations and prompts will be skipped and reasonable options assumed. The default mode is
+.I normal.
+
.SH v7 COMMANDS
.SS certify
-.B v7 certify
+.B v7 certify [ --tag <test tag> ]
The
-.I certify
+.I certify
command runs all tests that have not yet passed.
+.IP Options
+
+.B --tag
+<test tag>
+
+If test tags are used, then v7 will run tests with the given tag(s) that have not yet passed. This option may appear multiple times for multiple tags.
+Interactive tests may be selected with the
+.I interactive
+tag. Similarly, non-interactive tests may be chosen with the
+.I non-interactive
+tag. If the option is not present, the
+.I certification
+tag is assumed. Available tags for the planned tests may be displayed using the print command.
+
.SS clean
.B v7 clean
.P
@@ -143,11 +164,16 @@
.B --last
-Show only the most recent test run
+Show only the most recent test run.
+.B --tag
+<test tag>
+Print results for tests with the test tag(s).
+
+
.I plan
-prints the test plan, and is the default format if there are no test results.
+prints the test plan, and is the default format if there are no test results.
.I summary
print past/fail results totals for each test
@@ -158,7 +184,7 @@
.SS run
.P
-.B v7 run [ --mode { normal | auto | self }] [ (--test <test name> | --udi <udi> | --device <device name>)] [ --server <server host name> ]
+.B v7 run [ (--test <test name> | --udi <udi> | --device <device name>) (--tag <test tag> )] [ --server <server host name> ]
.P
The
@@ -169,10 +195,6 @@
.IP Options
-.B --mode { normal | auto | self }
-
-Controls the mode of interactive tests' operation. In normal mode, v7 runs interactive tests in interactive mode. Tests may prompt the user to provide input or take action. auto mode is an automatic mode with no user-input. The self mode is for a self-test of v7 and its tests. The self test is also non-interactive. If mode is not supplied, v7 defaults to normal operation. To be valid for certification, normal mode must be used.
-
.B --test
<test name>
@@ -188,6 +210,16 @@
Only tests of the specified device logical name should be run. This option may be repeated to specify multiple devices.
+.B --tag
+<test tag>
+
+v7 will run tests with the given tag(s). This option may appear multiple times for multiple tags.
+Interactive tests may be selected with the
+.I interactive
+tag. Similarly, non-interactive tests may be chosen with the
+.I non-interactive
+tag. Available tags for the planned tests may be displayed using the print command.
+
.B --server
<server host hame>
@@ -227,6 +259,17 @@
packages the test results into an RPM package for submission to the
Red Hat Hardware Catalog.
+.SS verify
+.P
+.B v7 verify
+.P
+The verify command checks configuration requirements for the tests without actually
+running the tests. Test verification is also run as part of the
+.I certify
+and
+.I run
+commands.
+
.SS version
.P
.B v7 version
13 years, 4 months