public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM test: Not execute build test by default
@ 2009-12-01 23:07 Lucas Meneghel Rodrigues
  2009-12-02  4:09 ` Ryan Harper
  0 siblings, 1 reply; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-12-01 23:07 UTC (permalink / raw)
  To: autotest; +Cc: kvm, Lucas Meneghel Rodrigues

Instead of trying to build KVM using one of the methods
defined on the control file, use "noinstall" as the
default mode, and make "noinstall" entirely skip the
build test, as having "noinstall" as one of the options
for the build test was making the test to run, calling
the kvm preprocessor and killing VMs that could be present
on the environment, an undesirable situation.

This is an intermediate step before we carry over with the
control file cleanup.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 client/tests/kvm/control          |   20 ++++++++++----------
 client/tests/kvm/control.parallel |   20 ++++++++++----------
 client/tests/kvm/tests/build.py   |    5 +----
 3 files changed, 21 insertions(+), 24 deletions(-)

diff --git a/client/tests/kvm/control b/client/tests/kvm/control
index cff9965..a526cc0 100644
--- a/client/tests/kvm/control
+++ b/client/tests/kvm/control
@@ -75,12 +75,12 @@ params = {
     "name": "build",
     "shortname": "build",
     "type": "build",
-    "mode": "release",
+    #"mode": "release",
     #"mode": "snapshot",
     #"mode": "localtar",
     #"mode": "localsrc",
     #"mode": "git",
-    #"mode": "noinstall",
+    "mode": "noinstall",
     #"mode": "koji",
 
     ## Are we going to load modules built by this test?
@@ -88,15 +88,15 @@ params = {
     ## be built by this test, please set load_modules to 'no', and make sure
     ## the kvm and kvm-[vendor] module is already loaded by the time you start
     ## it.
-    "load_modules": "no",
+    #"load_modules": "no",
 
     ## Install from a kvm release ("mode": "release"). You can optionally
     ## specify a release tag. If you omit it, the test will get the latest
     ## release tag available.
     #"release_tag": '84',
-    "release_dir": 'http://downloads.sourceforge.net/project/kvm/',
+    #"release_dir": 'http://downloads.sourceforge.net/project/kvm/',
     # This is the place that contains the sourceforge project list of files
-    "release_listing": 'http://sourceforge.net/projects/kvm/files/',
+    #"release_listing": 'http://sourceforge.net/projects/kvm/files/',
 
     ## Install from a kvm snapshot location ("mode": "snapshot"). You can
     ## optionally specify a snapshot date. If you omit it, the test will get
@@ -151,11 +151,11 @@ params = {
 # /tmp/kvm-autotest-root/qemu is a link to your existing executable. Note that
 # if kvm_install is chose to run, it overwrites existing qemu and qemu-img
 # links to point to the newly built executables.
-r = True
-r = job.run_test("kvm", params=params, tag=params.get("shortname"))
-if not r:
-    print 'kvm_installation failed ... exiting'
-    sys.exit(1)
+
+if not params.get("mode") == "noinstall":
+    if not job.run_test("kvm", params=params, tag=params.get("shortname")):
+        print 'kvm_installation failed ... exiting'
+        sys.exit(1)
 
 # ----------------------------------------------------------
 # Get test set (dictionary list) from the configuration file
diff --git a/client/tests/kvm/control.parallel b/client/tests/kvm/control.parallel
index 99f6556..343f694 100644
--- a/client/tests/kvm/control.parallel
+++ b/client/tests/kvm/control.parallel
@@ -73,12 +73,12 @@ params = {
     "name": "build",
     "shortname": "build",
     "type": "build",
-    "mode": "release",
+    #"mode": "release",
     #"mode": "snapshot",
     #"mode": "localtar",
     #"mode": "localsrc",
     #"mode": "git",
-    #"mode": "noinstall",
+    "mode": "noinstall",
     #"mode": "koji",
 
     ## Are we going to load modules built by this test?
@@ -86,15 +86,15 @@ params = {
     ## be built by this test, please set load_modules to 'no', and make sure
     ## the kvm and kvm-[vendor] module is already loaded by the time you start
     ## it.
-    "load_modules": "no",
+    #"load_modules": "no",
 
     ## Install from a kvm release ("mode": "release"). You can optionally
     ## specify a release tag. If you omit it, the test will get the latest
     ## release tag available.
     #"release_tag": '84',
-    "release_dir": 'http://downloads.sourceforge.net/project/kvm/',
+    #"release_dir": 'http://downloads.sourceforge.net/project/kvm/',
     # This is the place that contains the sourceforge project list of files
-    "release_listing": 'http://sourceforge.net/projects/kvm/files/',
+    #"release_listing": 'http://sourceforge.net/projects/kvm/files/',
 
     ## Install from a kvm snapshot location ("mode": "snapshot"). You can
     ## optionally specify a snapshot date. If you omit it, the test will get
@@ -149,11 +149,11 @@ params = {
 # /tmp/kvm-autotest-root/qemu is a link to your existing executable. Note that
 # if kvm_install is chose to run, it overwrites existing qemu and qemu-img
 # links to point to the newly built executables.
-r = True
-r = job.run_test("kvm", params=params, tag=params.get("shortname"))
-if not r:
-    print 'kvm_installation failed ... exiting'
-    sys.exit(1)
+
+if not params.get("mode") == "noinstall":
+    if not job.run_test("kvm", params=params, tag=params.get("shortname")):
+        print 'kvm_installation failed ... exiting'
+        sys.exit(1)
 
 # ----------------------------------------------------------
 # Get test set (dictionary list) from the configuration file
diff --git a/client/tests/kvm/tests/build.py b/client/tests/kvm/tests/build.py
index 5fffac6..d22d59b 100644
--- a/client/tests/kvm/tests/build.py
+++ b/client/tests/kvm/tests/build.py
@@ -568,10 +568,7 @@ def run_build(test, params, env):
     srcdir = params.get("srcdir", test.srcdir)
     params["srcdir"] = srcdir
 
-    if install_mode == 'noinstall':
-        logging.info("Skipping installation")
-        return
-    elif install_mode in ['localsrc', 'localtar', 'release', 'snapshot']:
+    if install_mode in ['localsrc', 'localtar', 'release', 'snapshot']:
         installer = SourceDirInstaller(test, params)
     elif install_mode == 'git':
         installer = GitInstaller(test, params)
-- 
1.6.5.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] KVM test: Not execute build test by default
  2009-12-01 23:07 [PATCH] KVM test: Not execute build test by default Lucas Meneghel Rodrigues
@ 2009-12-02  4:09 ` Ryan Harper
  2009-12-02  4:15   ` [Autotest] " sudhir kumar
  0 siblings, 1 reply; 4+ messages in thread
From: Ryan Harper @ 2009-12-02  4:09 UTC (permalink / raw)
  To: Lucas Meneghel Rodrigues; +Cc: autotest, kvm

* Lucas Meneghel Rodrigues <lmr@redhat.com> [2009-12-01 17:12]:
> Instead of trying to build KVM using one of the methods
> defined on the control file, use "noinstall" as the
> default mode, and make "noinstall" entirely skip the
> build test, as having "noinstall" as one of the options
> for the build test was making the test to run, calling
> the kvm preprocessor and killing VMs that could be present
> on the environment, an undesirable situation.
> 
> This is an intermediate step before we carry over with the
> control file cleanup.
> 
> Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>

Yeah, I like noinstall as a default.

Acked-by: Ryan Harper <ryanh@us.ibm.com>

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Autotest] [PATCH] KVM test: Not execute build test by default
  2009-12-02  4:09 ` Ryan Harper
@ 2009-12-02  4:15   ` sudhir kumar
  2009-12-02 11:57     ` Lucas Meneghel Rodrigues
  0 siblings, 1 reply; 4+ messages in thread
From: sudhir kumar @ 2009-12-02  4:15 UTC (permalink / raw)
  To: Ryan Harper; +Cc: Lucas Meneghel Rodrigues, autotest, kvm

On Wed, Dec 2, 2009 at 9:39 AM, Ryan Harper <ryanh@us.ibm.com> wrote:
> * Lucas Meneghel Rodrigues <lmr@redhat.com> [2009-12-01 17:12]:
>> Instead of trying to build KVM using one of the methods
>> defined on the control file, use "noinstall" as the
>> default mode, and make "noinstall" entirely skip the
>> build test, as having "noinstall" as one of the options
>> for the build test was making the test to run, calling
>> the kvm preprocessor and killing VMs that could be present
>> on the environment, an undesirable situation.
>>
>> This is an intermediate step before we carry over with the
>> control file cleanup.
>>
>> Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
>
> Yeah, I like noinstall as a default.
Definitely good, but I will prefer a name like no_kvm_install.

>
> Acked-by: Ryan Harper <ryanh@us.ibm.com>
>
> --
> Ryan Harper
> Software Engineer; Linux Technology Center
> IBM Corp., Austin, Tx
> ryanh@us.ibm.com
> _______________________________________________
> Autotest mailing list
> Autotest@test.kernel.org
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
>



-- 
Sudhir Kumar

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Autotest] [PATCH] KVM test: Not execute build test by default
  2009-12-02  4:15   ` [Autotest] " sudhir kumar
@ 2009-12-02 11:57     ` Lucas Meneghel Rodrigues
  0 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-12-02 11:57 UTC (permalink / raw)
  To: sudhir kumar; +Cc: Ryan Harper, autotest, kvm

On Wed, 2009-12-02 at 09:45 +0530, sudhir kumar wrote: 
> >> Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
> >
> > Yeah, I like noinstall as a default.
> Definitely good, but I will prefer a name like no_kvm_install.

We might leave this for the control file refactoring!

Thanks,


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-12-02 11:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 23:07 [PATCH] KVM test: Not execute build test by default Lucas Meneghel Rodrigues
2009-12-02  4:09 ` Ryan Harper
2009-12-02  4:15   ` [Autotest] " sudhir kumar
2009-12-02 11:57     ` Lucas Meneghel Rodrigues

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox