Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenStack: Dev

[OpenStack][Nova] No tests available in custom branch

 

 

OpenStack dev RSS feed   Index | Next | Previous | View Threaded


leanderbb at gmail

Jun 25, 2012, 6:13 AM

Post #1 of 20 (188 views)
Permalink
[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


jsuh at isi

Jun 25, 2012, 6:39 AM

Post #2 of 20 (179 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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" <leanderbb [at] gmail>
To: openstack [at] lists
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 [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


leanderbb at gmail

Jun 25, 2012, 6:45 AM

Post #3 of 20 (178 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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 <jsuh [at] isi> 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" <leanderbb [at] gmail>
> To: openstack [at] lists
> 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 [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>


jsuh at isi

Jun 25, 2012, 7:00 AM

Post #4 of 20 (181 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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" <leanderbb [at] gmail>
To: "Joseph Suh" <jsuh [at] isi>
Cc: openstack [at] lists
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 < jsuh [at] isi > 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" < leanderbb [at] gmail >
To: openstack [at] lists
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 [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


leanderbb at gmail

Jun 25, 2012, 7:03 AM

Post #5 of 20 (181 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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 <jsuh [at] isi> 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" <leanderbb [at] gmail>
> To: "Joseph Suh" <jsuh [at] isi>
> Cc: openstack [at] lists
> 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 < jsuh [at] isi > 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" < leanderbb [at] gmail >
> To: openstack [at] lists
> 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 [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>


brian.waldon at rackspace

Jun 25, 2012, 8:53 AM

Post #6 of 20 (172 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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 <jsuh [at] isi> 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" <leanderbb [at] gmail>
> To: "Joseph Suh" <jsuh [at] isi>
> Cc: openstack [at] lists
> 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 < jsuh [at] isi > 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" < leanderbb [at] gmail >
> To: openstack [at] lists
> 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 [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


leanderbb at gmail

Jun 25, 2012, 8:56 AM

Post #7 of 20 (172 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

Here's the diff http://paste.openstack.org/show/18756/

On Mon, Jun 25, 2012 at 4:53 PM, Brian Waldon <brian.waldon [at] rackspace>wrote:

> 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 <jsuh [at] isi> 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" <leanderbb [at] gmail>
>> To: "Joseph Suh" <jsuh [at] isi>
>> Cc: openstack [at] lists
>> 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 < jsuh [at] isi > 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" < leanderbb [at] gmail >
>> To: openstack [at] lists
>> 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 [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>>
>>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>
>


kevin.mitchell at rackspace

Jun 25, 2012, 11:01 AM

Post #8 of 20 (173 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace>


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


leanderbb at gmail

Jun 26, 2012, 1:36 AM

Post #9 of 20 (172 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace> 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.mitchell [at] rackspace>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>


leanderbb at gmail

Jun 26, 2012, 3:10 AM

Post #10 of 20 (172 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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 <
leanderbb [at] gmail> 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.mitchell [at] rackspace> 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.mitchell [at] rackspace>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>>
>
>


kevin.mitchell at rackspace

Jun 26, 2012, 7:40 AM

Post #11 of 20 (174 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace>


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


leanderbb at gmail

Jun 26, 2012, 7:50 AM

Post #12 of 20 (172 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace> 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.mitchell [at] rackspace>
>
>


kevin.mitchell at rackspace

Jun 26, 2012, 7:56 AM

Post #13 of 20 (171 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace>


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


leanderbb at gmail

Jun 26, 2012, 8:05 AM

Post #14 of 20 (174 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace> 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.mitchell [at] rackspace>
>
>


kevin.mitchell at rackspace

Jun 26, 2012, 8:17 AM

Post #15 of 20 (176 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace>


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


leanderbb at gmail

Jun 26, 2012, 8:21 AM

Post #16 of 20 (177 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace> 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.mitchell [at] rackspace>
>
>


kevin.mitchell at rackspace

Jun 26, 2012, 8:28 AM

Post #17 of 20 (173 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace>


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


leanderbb at gmail

Jun 26, 2012, 8:33 AM

Post #18 of 20 (171 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace> 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.mitchell [at] rackspace>
>
>


kevin.mitchell at rackspace

Jun 26, 2012, 8:44 AM

Post #19 of 20 (171 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace>


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


leanderbb at gmail

Jun 26, 2012, 8:46 AM

Post #20 of 20 (171 views)
Permalink
Re: [OpenStack][Nova] No tests available in custom branch [In reply to]

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.mitchell [at] rackspace> 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.mitchell [at] rackspace>
>
>

OpenStack dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.