From: Michael Goldish <mgoldish@redhat.com>
To: Lucas Meneghel Rodrigues <lmr@redhat.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM test: Pass the test parameters through the command line
Date: Fri, 14 Jan 2011 16:14:35 +0200 [thread overview]
Message-ID: <4D305A4B.5050203@redhat.com> (raw)
In-Reply-To: <1295005359-4840-1-git-send-email-lmr@redhat.com>
On 01/14/2011 01:42 PM, Lucas Meneghel Rodrigues wrote:
> From: Jason Wang <jasowang@redhat.com>
>
> The patch tries to make using kvm-autotest much more easier by
> enabling the ability of passing the test parameters from command line
> directly through --args="key1=value1 key2=value2 ... keyN=valueN".
>
> The idea is simple, autotest test pass the additional parameters
> through args, and the control file analyzes them and generate the
> configuration string for kvm_config.
>
> The keywords "only" and "no" were introduced to limit the variants,
> for each "only=variant1" the control file would generate a line
> "only variant1", same for "no". For others, "key = value" is
> generated.
>
> User still need to be familiar with the test parameters in order to
> get the intended test matrix.
>
> Change from V3:
> Use a slightly bigger subset of the config file language
> by allowing "no" to limit the amount of variants.
>
> Change from V2:
> Use the args exported by autotest.
> Analyze the cmd parameters in control and drop control.cli.
> Drop test_cli.cfg.sample so there's no default variants.
> Add "only" which is used to limit the varaints.
>
> Change from V1:
> Drop the wrapper method and use the control file directly.
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> client/tests/kvm/control | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/client/tests/kvm/control b/client/tests/kvm/control
> index 63bbe5d..79c0897 100644
> --- a/client/tests/kvm/control
> +++ b/client/tests/kvm/control
> @@ -53,6 +53,20 @@ str = """
> """
> tests_cfg = kvm_config.config()
> tests_cfg_path = os.path.join(kvm_test_dir, "tests.cfg")
> +
> +if args:
> + # We get test parameters from command line
> + for arg in args:
> + try:
> + (key, value) = re.findall("(.*)=(.*)", arg)[0]
> + if key == "only":
> + str += "only %s\n" % value
> + if key == "no":
> + str += "no %s\n" % value
> + else:
> + str += "%s = %s\n" % (key, value)
> + except IndexError:
> + pass
> tests_cfg.fork_and_parse(tests_cfg_path, str)
>
> # Run the tests
Is it possible to pass multiple names to an 'only' command, e.g.
only='boot reboot migrate'? What about values with spaces? (vms='vm1
vm2 vm3')
next prev parent reply other threads:[~2011-01-14 14:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 11:42 [PATCH] KVM test: Pass the test parameters through the command line Lucas Meneghel Rodrigues
2011-01-14 14:14 ` Michael Goldish [this message]
2011-01-14 15:03 ` Lucas Meneghel Rodrigues
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D305A4B.5050203@redhat.com \
--to=mgoldish@redhat.com \
--cc=autotest@test.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=lmr@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.