Author: gnichols
Date: 2011-03-29 13:17:35 +0000 (Tue, 29 Mar 2011)
New Revision: 848
Modified:
trunk/v7/fvtest.py
trunk/v7/hardwaretest.py
Log:
690799 - FV tests should run v7 with --mode auto on guest
Modified: trunk/v7/fvtest.py
===================================================================
--- trunk/v7/fvtest.py 2011-03-25 19:08:43 UTC (rev 847)
+++ trunk/v7/fvtest.py 2011-03-29 13:17:35 UTC (rev 848)
@@ -341,7 +341,7 @@
guestScript.write("#!/bin/sh\n")
guestScript.write("# v7 FV guest script - auto-generated\n")
# try to install v7
- guestScript.write("rpm -ivh --nodeps /mnt/v7-*.noarch.rpm 2>&1
> /var/log/v7fv.log\n")
+ guestScript.write("rpm -ivh /mnt/v7-*.noarch.rpm 2>&1 >
/var/log/v7fv.log\n")
# run the tests
guestScript.write("v7 plan --mode auto\n")
commandToRun = self.v7CommandInGuest + " --mode auto --test " +
self.testToRun + ' --server ' + self.getTestServer()
Modified: trunk/v7/hardwaretest.py
===================================================================
--- trunk/v7/hardwaretest.py 2011-03-25 19:08:43 UTC (rev 847)
+++ trunk/v7/hardwaretest.py 2011-03-29 13:17:35 UTC (rev 848)
@@ -372,6 +372,9 @@
return True
def checkRequiredRPMs(self, tests):
+ return self.installRequiredRPMs(self.getRequiredRPMs(tests))
+
+ def getRequiredRPMs(self, tests):
print "Checking for additional required packages based on the test
plan:"
requiredRPMs = dict()
for test in tests:
@@ -386,6 +389,9 @@
sys.stdout.write(rpm)
requiredRPMs[rpm] = rpm
sys.stdout.write("\n")
+ return requiredRPMs
+
+ def installRequiredRPMs(self, requiredRPMs):
while True:
missingRPMs = list()
@@ -446,6 +452,11 @@
testCount = 0
tests = planner.getServerModeTests();
result = 0
+ # check server=specific rpms
+ if subcommand == "start":
+ # server web CGI uses XSLT via python-lxml
+ if not self.installRequiredRPMs({"python-lxml":
"python-lxml"}):
+ result = 1
for test in tests:
rv = self.runServer(test, subcommand)
if rv != 0:
Show replies by date