Re: [openstack-dev] heat run_tests.sh fails with one huge line of output

2014-02-16 Thread Robert Collins
On 17 February 2014 10:20, Mike Spreitzer mspre...@us.ibm.com wrote:
 Kevin, I changed no code, it was a fresh DevStack install.


 Thanks Robert, I tried following your leads but got nowhere, perhaps I need
 a few more clues.

 I am not familiar with bzr (nor baz), and it wasn't obvious to me how to fit
 that into my workflow --- which was:
 (1) install DevStack
 (2) install libmysqlclient-dev
 (3) install flake8
 (4) cd /opt/stack/heat
 (5) ./run_tests.sh

I would have expected run_tests.sh to tox which creates a venv, but
heat seems different. So you'll need to install testrepository via
your system tox, not one from a venv.

So the steps to install testrepository outside a venv will be:
$ bzr branch lp:testrepository
$ sudo pip install ./testrepository

 I guessed that your (A) would apply if I use a venv and go between (1) the
 `python tools/install_venv.py` inside run_tests.sh and (2) the invocation
 inside run_tests.sh of its run_tests function.

No - see above.

 So I manually invoked
 `python tools/install_venv.py`, then entered that venv, then issued your

I suspect heat hasn't kept up with run_tests evolution from other
projects - install_venv was a pre-tox thing IIRC I think its
somewhat unhelpful, since AFAICT it's main purpose is to confuse
people :).

 commands of (A) (discovered I needed to install bzr and did so), then exited
 that venv, then invoked heat's `run_tests -V -u` to use the venv thus
 constructed.  It still produced one huge line of output.  Here I attach a
 typescript of that:

The 'd' is because you're human-reading a binary protocol (which the
testrepository trunk fixes). Try the import without the 'd'. Also be
sure to be trying the import within the tox venv, which run_tests will
have triggered.

 You will see that the huge line still ends with something about import
 error, and now lists one additional package ---
 heat.tests.test_neutron_firewalld.  I then tried your (B), testing manual
 imports.   All worked except for the last, which failed because there is
 indeed no such thing (why is there a spurrious 'd' at the end of the package
 name?).  Here is a typescript of that:

So, all the listed imports fail to import from the test run. It's odd
that they are succeeding manually.

You could try patching your testtools with
https://github.com/testing-cabal/testtools/pull/77 to get a direct
readout of the error.

-Rob


-- 
Robert Collins rbtcoll...@hp.com
Distinguished Technologist
HP Converged Cloud

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] heat run_tests.sh fails with one huge line of output

2014-02-16 Thread Alexander Gorodnev
Hi Mike,

Looks like you have some syntax error for some accidental reason. Could you
please do the following:
0) install flake8;
1) run ./run_tests.sh -p  pep8.log into your Heat directory;
2) Attach to the letter and send it to the list.

Thank you,
Alexander



2014-02-17 1:20 GMT+04:00 Mike Spreitzer mspre...@us.ibm.com:

 Kevin, I changed no code, it was a fresh DevStack install.

 Robert Collins robe...@robertcollins.net wrote on 02/16/2014 05:33:59
 AM:
  A) [fixed in testrepository trunk] the output from subunit.run
  discover  --list is being shown verbatim when an error happens,
  rather than being machine processed and the test listings elided.
 
  To use trunk - in your venv:
  bzr branch lp:testrepository
  pip install testrepository
 
  B) If you look at the end of that wall of text you'll see 'Failed
  imports' in there, and the names after that are modules that failed
  to import - for each of those if you try to import it in python,
  you'll find the cause, and there's likely just one cause.

 Thanks Robert, I tried following your leads but got nowhere, perhaps I
 need a few more clues.

 I am not familiar with bzr (nor baz), and it wasn't obvious to me how to
 fit that into my workflow --- which was:
 (1) install DevStack
 (2) install libmysqlclient-dev
 (3) install flake8
 (4) cd /opt/stack/heat
 (5) ./run_tests.sh

 I guessed that your (A) would apply if I use a venv and go between (1) the
 `python tools/install_venv.py` inside run_tests.sh and (2) the invocation
 inside run_tests.sh of its run_tests function.  So I manually invoked
 `python tools/install_venv.py`, then entered that venv, then issued your
 commands of (A) (discovered I needed to install bzr and did so), then
 exited that venv, then invoked heat's `run_tests -V -u` to use the venv
 thus constructed.  It still produced one huge line of output.  Here I
 attach a typescript of that:



 You will see that the huge line still ends with something about import
 error, and now lists one additional package ---
 heat.tests.test_neutron_firewalld.  I then tried your (B), testing manual
 imports.   All worked except for the last, which failed because there is
 indeed no such thing (why is there a spurrious 'd' at the end of the
 package name?).  Here is a typescript of that:



 Thanks,
 Mike
 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] heat run_tests.sh fails with one huge line of output

2014-02-16 Thread Mike Spreitzer
Robert Collins robe...@robertcollins.net wrote on 02/16/2014 05:26:50 
PM:
 I would have expected run_tests.sh to tox which creates a venv, but
 heat seems different. So you'll need to install testrepository via
 your system tox, not one from a venv.

I don't think I have a system tox.  `pip list | grep -i tox` comes up 
empty.  Should I be looking for a system tox in some other way?  I'm a 
little unclear on what you are saying here.


 The 'd' is because you're human-reading a binary protocol (which the
 testrepository trunk fixes). Try the import without the 'd'. Also be
 sure to be trying the import within the tox venv, which run_tests will
 have triggered.

If I take the 'd' off then that import succeeds like all the others,
when tried manually in the venv created by run_tests.sh -V.

Thanks,
Mike___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] heat run_tests.sh fails with one huge line of output

2014-02-16 Thread Robert Collins
On 17 February 2014 13:50, Mike Spreitzer mspre...@us.ibm.com wrote:
 Robert Collins robe...@robertcollins.net wrote on 02/16/2014 05:26:50 PM:

 I would have expected run_tests.sh to tox which creates a venv, but
 heat seems different. So you'll need to install testrepository via
 your system tox, not one from a venv.


 I don't think I have a system tox.  `pip list | grep -i tox` comes up empty.
 Should I be looking for a system tox in some other way?  I'm a little
 unclear on what you are saying here.

s/system tox/system pip/.

 The 'd' is because you're human-reading a binary protocol (which the
 testrepository trunk fixes). Try the import without the 'd'. Also be
 sure to be trying the import within the tox venv, which run_tests will
 have triggered.


 If I take the 'd' off then that import succeeds like all the others,
 when tried manually in the venv created by run_tests.sh -V.

I'm unclear - are you running 'run_tests.sh' or 'run_tests.sh -V'.
*either way*, you need to be using the matching pip to install
testrepository, and you need to be using the matching Python to test
imports.

-Rob

-- 
Robert Collins rbtcoll...@hp.com
Distinguished Technologist
HP Converged Cloud

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev