Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Leander Bessa Beernaert
I'v tried doing those modifications directly on the master branch, just to
see if the tests would run. Sadly, i get the same output.

Am i supposed to change something when adding new files before running the
tests?

On Tue, Jun 26, 2012 at 9:36 AM, Leander Bessa Beernaert 
leande...@gmail.com wrote:

 Performing the alteration you suggested did not change anything, the
 output from run_tests.sh is still the same:

 ./run_tests.sh


 --
 Ran 0 tests in 0.000s
 OK
 Running PEP8 and HACKING compliance check...
 4 imports missing in this test environment


 Any ideas?

 On Mon, Jun 25, 2012 at 7:01 PM, Kevin L. Mitchell 
 kevin.mitch...@rackspace.com wrote:

 On Mon, 2012-06-25 at 16:56 +0100, Leander Bessa Beernaert wrote:
  Here's the diff http://paste.openstack.org/show/18756/

 Change import diagnostics to from nova.virt.libvirt import
 diagnostics.  (Also note that you may need to add a space between your
 name and your email address in Authors, and if you mean to submit this
 to the trunk, it'd be nice to put your entry in the
 alphabetically-appropriate place…)
 --
 Kevin L. Mitchell kevin.mitch...@rackspace.com


 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Kevin L. Mitchell
On Tue, 2012-06-26 at 09:36 +0100, Leander Bessa Beernaert wrote:
 Any ideas? 

My gut instinct is that you have a syntax error as well, somewhere in
diagnostics.py.  Try running the python interpreter and manually trying
that import; if it fails, you should have an error message that will
help you track down what the problem is.
-- 
Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Leander Bessa Beernaert
I've successfully imported the diagnostics.py in the interpreter, so that
can't be the problem.

On Tue, Jun 26, 2012 at 3:40 PM, Kevin L. Mitchell 
kevin.mitch...@rackspace.com wrote:

 On Tue, 2012-06-26 at 09:36 +0100, Leander Bessa Beernaert wrote:
  Any ideas?

 My gut instinct is that you have a syntax error as well, somewhere in
 diagnostics.py.  Try running the python interpreter and manually trying
 that import; if it fails, you should have an error message that will
 help you track down what the problem is.
 --
 Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Kevin L. Mitchell
On Tue, 2012-06-26 at 15:50 +0100, Leander Bessa Beernaert wrote:
 I've successfully imported the diagnostics.py in the interpreter, so
 that can't be the problem.

Then try importing the other file you modified.  If that still doesn't
help you find the problem, then I'm all out of ideas…
-- 
Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Leander Bessa Beernaert
You sir are my hero!

  File stdin, line 1, in module
   File connection.py, line 73, in module
 from nova.virt.libvirt import diagnostics
 ImportError: cannot import name diagnostics


The file, is right there in the same directory. I have double checked the
names but it still keeps failing :s

On Tue, Jun 26, 2012 at 3:56 PM, Kevin L. Mitchell 
kevin.mitch...@rackspace.com wrote:

 On Tue, 2012-06-26 at 15:50 +0100, Leander Bessa Beernaert wrote:
  I've successfully imported the diagnostics.py in the interpreter, so
  that can't be the problem.

 Then try importing the other file you modified.  If that still doesn't
 help you find the problem, then I'm all out of ideas…
 --
 Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Kevin L. Mitchell
On Tue, 2012-06-26 at 16:05 +0100, Leander Bessa Beernaert wrote:
 The file, is right there in the same directory. I have double checked
 the names but it still keeps failing :s

The first thing I'd try is clearing out all your *.pyc files.
(run_tests.sh should do this for you, so I don't expect this to actually
fix your problem, but it's a place to start…)  Also, double-check the
permissions on the diagnostics.py file.  Finally, verify that your
current directory is the top-level directory of the repository, not the
nova subdirectory of the repository…
-- 
Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Leander Bessa Beernaert
It works from the top level, but fails if i try to import it directly from
the same dir (nova/virt/libvirt). The other files there import just fine :/

On Tue, Jun 26, 2012 at 4:17 PM, Kevin L. Mitchell 
kevin.mitch...@rackspace.com wrote:

 On Tue, 2012-06-26 at 16:05 +0100, Leander Bessa Beernaert wrote:
  The file, is right there in the same directory. I have double checked
  the names but it still keeps failing :s

 The first thing I'd try is clearing out all your *.pyc files.
 (run_tests.sh should do this for you, so I don't expect this to actually
 fix your problem, but it's a place to start…)  Also, double-check the
 permissions on the diagnostics.py file.  Finally, verify that your
 current directory is the top-level directory of the repository, not the
 nova subdirectory of the repository…
 --
 Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Kevin L. Mitchell
On Tue, 2012-06-26 at 16:21 +0100, Leander Bessa Beernaert wrote:
 It works from the top level, but fails if i try to import it directly
 from the same dir (nova/virt/libvirt). The other files there import
 just fine :/

Relative imports are iffy at best; imports should ideally always be
absolute.  This is why I suggest that you should always call
run_tests.sh from the top-level of the repository, not from the nova
subdirectory…
-- 
Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Leander Bessa Beernaert
I'm not calling run_tests.sh from the nova subdirectory. I'm saying that
from the location where nova_tests.sh is located, i can import
connection.py.
However, when i try to import connection.py from with cd=nova/virt/libvirt,
it fails. The funny thing is i can import all the modules int that
directory perfectly, except connection.py.

On Tue, Jun 26, 2012 at 4:28 PM, Kevin L. Mitchell 
kevin.mitch...@rackspace.com wrote:

 On Tue, 2012-06-26 at 16:21 +0100, Leander Bessa Beernaert wrote:
  It works from the top level, but fails if i try to import it directly
  from the same dir (nova/virt/libvirt). The other files there import
  just fine :/

 Relative imports are iffy at best; imports should ideally always be
 absolute.  This is why I suggest that you should always call
 run_tests.sh from the top-level of the repository, not from the nova
 subdirectory…
 --
 Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Kevin L. Mitchell
On Tue, 2012-06-26 at 16:33 +0100, Leander Bessa Beernaert wrote:
 I'm not calling run_tests.sh from the nova subdirectory. I'm saying
 that from the location where nova_tests.sh is located, i can import
 connection.py.
 However, when i try to import connection.py from with
 cd=nova/virt/libvirt, it fails. The funny thing is i can import all
 the modules int that directory perfectly, except connection.py.

That's expected.  Whenever you run Python, the current directory is
added to the import path.  connection.py has several absolute imports
that it depends on being able to import; when you run from the top-level
of the repo, things like nova.virt.libvirt.utils can be found, whereas
importing from the nova/virt/libvirt directory means that
nova.virt.libvirt makes no sense.
-- 
Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-26 Thread Leander Bessa Beernaert
I've managed to fix it by removing the import libvirt from
diagnostics.py. I've got the answer to this through sdague in the
openstack-dev irc channel. I'ts now running :)

On Tue, Jun 26, 2012 at 4:44 PM, Kevin L. Mitchell 
kevin.mitch...@rackspace.com wrote:

 On Tue, 2012-06-26 at 16:33 +0100, Leander Bessa Beernaert wrote:
  I'm not calling run_tests.sh from the nova subdirectory. I'm saying
  that from the location where nova_tests.sh is located, i can import
  connection.py.
  However, when i try to import connection.py from with
  cd=nova/virt/libvirt, it fails. The funny thing is i can import all
  the modules int that directory perfectly, except connection.py.

 That's expected.  Whenever you run Python, the current directory is
 added to the import path.  connection.py has several absolute imports
 that it depends on being able to import; when you run from the top-level
 of the repo, things like nova.virt.libvirt.utils can be found, whereas
 importing from the nova/virt/libvirt directory means that
 nova.virt.libvirt makes no sense.
 --
 Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-25 Thread Joseph Suh
Leander,

Did you give -V -f option? If you post your log, it would be easier to help.

Thanks,

Joseph


(w) 703-248-6160
(c) 571-340-2434
(f) 703-812-3712
3811 N. Fairfax Drive Suite 200
Arlington, VA, 22203, USA
http://www.east.isi.edu/~jsuh

- Original Message -
From: Leander Bessa Beernaert leande...@gmail.com
To: openstack@lists.launchpad.net
Sent: Monday, June 25, 2012 9:13:43 AM
Subject: [Openstack] [OpenStack][Nova] No tests available in custom branch


Hello, 


I've created a separate branch in Nova to test my code out. However, every time 
i attempt to run the command run_tests.sh it says it has 0 tests to be run. I 
followed the guide from http://wiki.openstack.org/GerritWorkflow to setup the 
branch. Did i miss something? 


Regards, 
Leander 
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-25 Thread Leander Bessa Beernaert
I've tried all the options and the output is always, even with -V and -f:

--
 Ran 0 tests in 0.000s
 OK
 Running PEP8 and HACKING compliance check...
 5 imports missing in this test environment


The tests run just fine on the master branch :/

On Mon, Jun 25, 2012 at 2:39 PM, Joseph Suh j...@isi.edu wrote:

 Leander,

 Did you give -V -f option? If you post your log, it would be easier to
 help.

 Thanks,

 Joseph

 
 (w) 703-248-6160
 (c) 571-340-2434
 (f) 703-812-3712
 3811 N. Fairfax Drive Suite 200
 Arlington, VA, 22203, USA
 http://www.east.isi.edu/~jsuh

 - Original Message -
 From: Leander Bessa Beernaert leande...@gmail.com
 To: openstack@lists.launchpad.net
 Sent: Monday, June 25, 2012 9:13:43 AM
 Subject: [Openstack] [OpenStack][Nova] No tests available in custom branch


 Hello,


 I've created a separate branch in Nova to test my code out. However, every
 time i attempt to run the command run_tests.sh it says it has 0 tests to
 be run. I followed the guide from http://wiki.openstack.org/GerritWorkflowto 
 setup the branch. Did i miss something?


 Regards,
 Leander
 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-25 Thread Joseph Suh
Leander,

If it works fine in master branch, the problem must be due to some changes in 
your own branch.

Thanks,

Joseph


(w) 703-248-6160
(c) 571-340-2434
(f) 703-812-3712
3811 N. Fairfax Drive Suite 200
Arlington, VA, 22203, USA
http://www.east.isi.edu/~jsuh

- Original Message -
From: Leander Bessa Beernaert leande...@gmail.com
To: Joseph Suh j...@isi.edu
Cc: openstack@lists.launchpad.net
Sent: Monday, June 25, 2012 9:45:51 AM
Subject: Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

I've tried all the options and the output is always, even with -V and -f: 




-- 
Ran 0 tests in 0.000s 
OK 
Running PEP8 and HACKING compliance check... 
5 imports missing in this test environment 


The tests run just fine on the master branch :/ 


On Mon, Jun 25, 2012 at 2:39 PM, Joseph Suh  j...@isi.edu  wrote: 


Leander, 

Did you give -V -f option? If you post your log, it would be easier to help. 

Thanks, 

Joseph 

 
(w) 703-248-6160 
(c) 571-340-2434 
(f) 703-812-3712 
3811 N. Fairfax Drive Suite 200 
Arlington, VA, 22203, USA 
http://www.east.isi.edu/~jsuh 



- Original Message - 
From: Leander Bessa Beernaert  leande...@gmail.com  
To: openstack@lists.launchpad.net 
Sent: Monday, June 25, 2012 9:13:43 AM 
Subject: [Openstack] [OpenStack][Nova] No tests available in custom branch 


Hello, 


I've created a separate branch in Nova to test my code out. However, every time 
i attempt to run the command run_tests.sh it says it has 0 tests to be run. I 
followed the guide from http://wiki.openstack.org/GerritWorkflow to setup the 
branch. Did i miss something? 


Regards, 
Leander 
___ 
Mailing list: https://launchpad.net/~openstack 
Post to : openstack@lists.launchpad.net 
Unsubscribe : https://launchpad.net/~openstack 
More help : https://help.launchpad.net/ListHelp 


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-25 Thread Leander Bessa Beernaert
I've just added a new file and added a new method in the connection.py of
libvirt. Those are the changes i made, surely they haven' screwed up the
test system :/

On Mon, Jun 25, 2012 at 3:00 PM, Joseph Suh j...@isi.edu wrote:

 Leander,

 If it works fine in master branch, the problem must be due to some changes
 in your own branch.

 Thanks,

 Joseph

 
 (w) 703-248-6160
 (c) 571-340-2434
 (f) 703-812-3712
 3811 N. Fairfax Drive Suite 200
 Arlington, VA, 22203, USA
 http://www.east.isi.edu/~jsuh

 - Original Message -
 From: Leander Bessa Beernaert leande...@gmail.com
 To: Joseph Suh j...@isi.edu
 Cc: openstack@lists.launchpad.net
 Sent: Monday, June 25, 2012 9:45:51 AM
 Subject: Re: [Openstack] [OpenStack][Nova] No tests available in custom
 branch

 I've tried all the options and the output is always, even with -V and -f:




 --
 Ran 0 tests in 0.000s
 OK
 Running PEP8 and HACKING compliance check...
 5 imports missing in this test environment


 The tests run just fine on the master branch :/


 On Mon, Jun 25, 2012 at 2:39 PM, Joseph Suh  j...@isi.edu  wrote:


 Leander,

 Did you give -V -f option? If you post your log, it would be easier to
 help.

 Thanks,

 Joseph

 
 (w) 703-248-6160
 (c) 571-340-2434
 (f) 703-812-3712
 3811 N. Fairfax Drive Suite 200
 Arlington, VA, 22203, USA
 http://www.east.isi.edu/~jsuh



 - Original Message -
 From: Leander Bessa Beernaert  leande...@gmail.com 
 To: openstack@lists.launchpad.net
 Sent: Monday, June 25, 2012 9:13:43 AM
 Subject: [Openstack] [OpenStack][Nova] No tests available in custom branch


 Hello,


 I've created a separate branch in Nova to test my code out. However, every
 time i attempt to run the command run_tests.sh it says it has 0 tests to
 be run. I followed the guide from http://wiki.openstack.org/GerritWorkflowto 
 setup the branch. Did i miss something?


 Regards,
 Leander
 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-25 Thread Leander Bessa Beernaert
Here's the diff http://paste.openstack.org/show/18756/

On Mon, Jun 25, 2012 at 4:53 PM, Brian Waldon brian.wal...@rackspace.comwrote:

 I usually run into this kind of problem when I break an import or add an
 unfulfillable import somewhere in Nova or Glance. Could you post a diff for
 us to take a look at?

 Brian



 On Jun 25, 2012, at 7:03 AM, Leander Bessa Beernaert wrote:

 I've just added a new file and added a new method in the connection.py of
 libvirt. Those are the changes i made, surely they haven' screwed up the
 test system :/

 On Mon, Jun 25, 2012 at 3:00 PM, Joseph Suh j...@isi.edu wrote:

 Leander,

 If it works fine in master branch, the problem must be due to some
 changes in your own branch.

 Thanks,

 Joseph

 
 (w) 703-248-6160
 (c) 571-340-2434
 (f) 703-812-3712
 3811 N. Fairfax Drive Suite 200
 Arlington, VA, 22203, USA
 http://www.east.isi.edu/~jsuh

 - Original Message -
 From: Leander Bessa Beernaert leande...@gmail.com
 To: Joseph Suh j...@isi.edu
 Cc: openstack@lists.launchpad.net
 Sent: Monday, June 25, 2012 9:45:51 AM
 Subject: Re: [Openstack] [OpenStack][Nova] No tests available in custom
 branch

 I've tried all the options and the output is always, even with -V and -f:




 --
 Ran 0 tests in 0.000s
 OK
 Running PEP8 and HACKING compliance check...
 5 imports missing in this test environment


 The tests run just fine on the master branch :/


 On Mon, Jun 25, 2012 at 2:39 PM, Joseph Suh  j...@isi.edu  wrote:


 Leander,

 Did you give -V -f option? If you post your log, it would be easier to
 help.

 Thanks,

 Joseph

 
 (w) 703-248-6160
 (c) 571-340-2434
 (f) 703-812-3712
 3811 N. Fairfax Drive Suite 200
 Arlington, VA, 22203, USA
 http://www.east.isi.edu/~jsuh



 - Original Message -
 From: Leander Bessa Beernaert  leande...@gmail.com 
 To: openstack@lists.launchpad.net
 Sent: Monday, June 25, 2012 9:13:43 AM
 Subject: [Openstack] [OpenStack][Nova] No tests available in custom branch


 Hello,


 I've created a separate branch in Nova to test my code out. However,
 every time i attempt to run the command run_tests.sh it says it has 0
 tests to be run. I followed the guide from
 http://wiki.openstack.org/GerritWorkflow to setup the branch. Did i miss
 something?


 Regards,
 Leander
 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help : https://help.launchpad.net/ListHelp


 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [OpenStack][Nova] No tests available in custom branch

2012-06-25 Thread Kevin L. Mitchell
On Mon, 2012-06-25 at 16:56 +0100, Leander Bessa Beernaert wrote:
 Here's the diff http://paste.openstack.org/show/18756/

Change import diagnostics to from nova.virt.libvirt import
diagnostics.  (Also note that you may need to add a space between your
name and your email address in Authors, and if you mean to submit this
to the trunk, it'd be nice to put your entry in the
alphabetically-appropriate place…)
-- 
Kevin L. Mitchell kevin.mitch...@rackspace.com


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp