On Wed, 2010-02-10 at 09:17 -0500, James Laska wrote:
---
lib/python/rats.py | 3 +++
lib/python/virtguest.py | 11 ++++++++++-
tests/rats_install/install.py | 23 +++++++++++++++++++----
3 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/lib/python/rats.py b/lib/python/rats.py
index ec72e43..3adda31 100644
--- a/lib/python/rats.py
+++ b/lib/python/rats.py
@@ -82,6 +82,9 @@ def parse_args():
parser.add_option("-x", "--extra-args",
action="store",
default="",
help="Additional arguments to pass to the kernel booted from the specified
TREEURL")
+ parser.add_option("-r", "--ram", action="store",
type="int", dest="memory",
+ default=768,
+ help="Memory to allocate for guest instance in megabytes (default:
%default)")
(opt, args) = parser.parse_args()
I'd prefer that options that are only needed for one test be defined
inside that test. So it'd be better if we could define this option
inside install.py - it's kind of silly that you can pass --ram=768 to
sanity.py.
Perhaps rats.parse_args() could take an optional OptionGroup as input,
so tests can define their own arguments to add to the default rats
parser?
The rest of the patch looks good to me.
-w