---
lib/python/rats.py | 5 +++++
tests/rats_install/install.py | 6 +++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/python/rats.py b/lib/python/rats.py
index b219b87..7cff743 100644
--- a/lib/python/rats.py
+++ b/lib/python/rats.py
@@ -76,6 +76,10 @@ def parse_args():
parser.add_option("-b", "--bindir", action="store",
default=config.bindir,
help="binary dir - contains minimon, ks.cfg, etc. (%default)")
+ parser.add_option("-x", "--extra-args", action="store",
+ default="",
+ help="Additional arguments to pass to the kernel booted from the specified TREEURL")
+
(opt, args) = parser.parse_args()
if len(args) != 1:
parser.error("incorrect number of arguments")
@@ -86,4 +90,5 @@ def parse_args():
config.set_scratchdir(opt.scratchdir)
config.logdir = opt.logdir
config.bindir = opt.bindir
+ config.extra_args = opt.extra_args
return (opt, uri)
diff --git a/tests/rats_install/install.py b/tests/rats_install/install.py
index 01eb572..72b7171 100755
--- a/tests/rats_install/install.py
+++ b/tests/rats_install/install.py
@@ -90,7 +90,7 @@ def get_initrd(treeinfo):
initrd = c.get('images-%s' % arch,'initrd')
return initrd
-def create_guest(imgdir, name="RATS", kickstart=None, minimon=None, url=None):
+def create_guest(imgdir, name="RATS", kickstart=None, minimon=None, url=None, extra_args=""):
'''Attempt to create a new virt guest using the given data'''
if kickstart is None:
kickstart = os.path.join(config.bindir, "ks.cfg")
@@ -149,7 +149,7 @@ def create_guest(imgdir, name="RATS", kickstart=None, minimon=None, url=None):
guest = VirtGuest(name="%s_%u" % (name, counter))
print " new guest name: %s" % guest.name
print "starting virt guest"
- guest.create(location=imgdir)
+ guest.create(location=imgdir, extra_args=extra_args)
guest.minimon = minimon_server # save MinimonServer object
guest.steplist = [] # A place to save the list of anaconda steps
return guest
@@ -323,7 +323,7 @@ if __name__ == '__main__':
util.write_keyval("tree_time", int(float(timestamp)))
util.write_keyval("treeinfo_localtime", time.ctime(timestamp))
- guest = create_guest(config.scratchdir, url=baseuri)
+ guest = create_guest(config.scratchdir, url=baseuri, extra_args=opt.extra)
try:
print "\n== kernel boot test =="
--
1.6.5.2