<font size=2 face="sans-serif">I am trying to become a bit less of a newbie,
and having a bit of difficulty with basics. Following are some questions,
and reviews of the relevant documentation that I have been able to find
(I am trying to contribute to documentation as well as solve my setup problems).
My driving question is: how do I set up a development environment?
Included is this question: what sort(s) of testing should I plan
on doing in this environment? And: what sorts of testing does OpenStack
define?</font>
<br>
<br><font size=2 face="sans-serif">I started at </font><a href=http://www.openstack.org/><font size=2 face="sans-serif">http://www.openstack.org/</font></a><font size=2 face="sans-serif">
and looked at the links in the "Documentation" section of the
footer and also followed the Documentation link in the header. Those
lead to </font><a href=https://wiki.openstack.org/wiki/HowToContribute><font size=2 face="sans-serif">https://wiki.openstack.org/wiki/HowToContribute</font></a><font size=2 face="sans-serif">
and </font><a href=http://www.openstack.org/software/start/><font size=2 face="sans-serif">http://www.openstack.org/software/start/</font></a><font size=2 face="sans-serif">
--- which give different answers to my question. The nova project
itself has a top level file named HACKING.rst that gives yet another answer
regarding testing. I have found mentions of "unit", "functional",
and "operational" testing, but have not found any page that sets
out to list/define all the categories of testing; should there be?</font>
<br>
<br>
<br><font size=2 face="sans-serif">=================================================</font>
<br><a href=https://wiki.openstack.org/wiki/HowToContribute><font size=2 face="sans-serif">https://wiki.openstack.org/wiki/HowToContribute</font></a>
<br><font size=2 face="sans-serif">=================================================</font>
<br>
<br><font size=2 face="sans-serif">The HowToContribute page's most relevant
links are to </font><a href=https://wiki.openstack.org/wiki/GerritWorkflow><font size=2 face="sans-serif">https://wiki.openstack.org/wiki/GerritWorkflow</font></a><font size=2 face="sans-serif">
and </font><a href=https://wiki.openstack.org/wiki/GettingTheCode><font size=2 face="sans-serif">https://wiki.openstack.org/wiki/GettingTheCode</font></a><font size=2 face="sans-serif">
. GerritWorkflow says I should run unit tests, but does not describe
how; it tells me I can get the code by doing a `git clone` but says nothing
more about setting up my environment for running and testing.</font>
<br>
<br><font size=2 face="sans-serif">Getting_The_Code is more expansive.
In addition to telling me how to `git clone` a project, it also takes
a stab at telling me how to get the dependencies for Nova and for Swift;
what are people working on other projects to do? I looked into the
Nova remarks. There are two links: one for Ubuntu (</font><a href=https://wiki.openstack.org/wiki/DependsOnUbuntu><font size=2 face="sans-serif">https://wiki.openstack.org/wiki/DependsOnUbuntu</font></a><font size=2 face="sans-serif">)
and one for MacOS X (</font><a href=https://wiki.openstack.org/wiki/DependsOnOSX><font size=2 face="sans-serif">https://wiki.openstack.org/wiki/DependsOnOSX</font></a><font size=2 face="sans-serif">).
Those two are surprisingly different. The instructions for
the Mac are quite simple: `python tools/install_venv.py` and `./run_tests.sh`,
plus one more command to install RabbitMQ if I want to support running
more than the unit tests. The instructions for Ubuntu, on the other
hand, are much lengthier and a bit less ambitious (they seem to end with
the unit tests, no discussion of more general running). Why the difference?
Why should tools/install_venv.py not be used on Ubuntu?</font>
<br>
<br><font size=2 face="sans-serif">Are the instructions for MacOS X for
real? Looking in the "Install OpenStack" section of </font><a href=http://docs.openstack.org/><font size=2 face="sans-serif">http://docs.openstack.org/</font></a><font size=2 face="sans-serif">
I see no hint that OpenStack can run on MacOS X. Perhaps those instructions
make sense because the unit tests should actually work on MacOS X? (I
tested that, and got 8 failures in the nova unit tests on my Mac.)</font>
<br>
<br><a href=https://wiki.openstack.org/wiki/HowToContribute><font size=2 face="sans-serif">https://wiki.openstack.org/wiki/HowToContribute</font></a><font size=2 face="sans-serif">
also refers to a video (</font><a href="http://www.youtube.com/watch?v=mT2yC6ll5Qk&feature=youtu.be"><font size=2 face="sans-serif">http://www.youtube.com/watch?v=mT2yC6ll5Qk&feature=youtu.be</font></a><font size=2 face="sans-serif">),
and the video content shows several URLS:</font>
<br>
<br><a href=http://wiki.openstack.org/GitCommitMessages><font size=2 face="sans-serif">http://wiki.openstack.org/GitCommitMessages</font></a>
<br><a href=http://wiki.openstack.org/HowToContribute><font size=2 face="sans-serif">http://wiki.openstack.org/HowToContribute</font></a>
<br><a href=http://wiki.openstack.org/DevQuickStart><font size=2 face="sans-serif">http://wiki.openstack.org/DevQuickStart</font></a>
<br><a href="http://www.scribd.com/doc/117185088/Introduction-to-OpenStack"><font size=2 face="sans-serif">http://www.scribd.com/doc/117185088/Introduction-to-OpenStack</font></a>
<br><a href=http://docs.openstack.org/><font size=2 face="sans-serif">http://docs.openstack.org/</font></a>
<br><a href=http://devstack.org/><font size=2 face="sans-serif">http://devstack.org/</font></a>
<br>
<br><font size=2 face="sans-serif">The most interesting-looking one of
those that does not appear elsewhere, </font><a href=http://wiki.openstack.org/DevQuickStart><font size=2 face="sans-serif">http://wiki.openstack.org/DevQuickStart</font></a><font size=2 face="sans-serif">,
is now content-free.</font>
<br>
<br><font size=2 face="sans-serif">I myself would feel more comfortable
if I could run more than unit tests in my development environment. I
would like to go all the way to some full system tests.</font>
<br>
<br>
<br><font size=2 face="sans-serif">=================================================</font>
<br><a href=http://www.openstack.org/software/start/><font size=2 face="sans-serif">http://www.openstack.org/software/start/</font></a>
<br><font size=2 face="sans-serif">=================================================</font>
<br>
<br><a href=http://www.openstack.org/software/start/><font size=2 face="sans-serif">http://www.openstack.org/software/start/</font></a><font size=2 face="sans-serif">
leads directly to </font><a href=http://devstack.org/><font size=2 face="sans-serif">http://devstack.org/</font></a><font size=2 face="sans-serif">
--- which is surprising because it skips over the OpenStack wiki page (</font><a href=https://wiki.openstack.org/wiki/DevStack><font size=2 face="sans-serif">https://wiki.openstack.org/wiki/DevStack</font></a><font size=2 face="sans-serif">)
that introduces DevStack. The wiki's page gives a mission statement
and description for DevStack. The mission statement is "provide
and maintain tools used for the installation of the central OpenStack services
from source suitable for development and operational testing"; the
description is "an opinionated script to quickly create an OpenStack
development environment". Reading the text literally, it does
not define what sort(s) of testing are included in "development".
Since GerritWorkflow told me that the normal workflow includes unit
tests, I could reasonably conclude that DevStack sets me up to run unit
tests. In particular, one could take these remarks to mean that DevStack
will install the dependencies listed in test-requirements.txt. But
that is not actually true.</font>
<br>
<br><font size=2 face="sans-serif">I tested a DevStack install, and found
it gave me a nova/.git connected to the nova project at git.openstack.org
(one could take this as implied by the remarks that DevStack sets up a
development environment). I presume I can enhance this with the more
personal parts of the Gerrit client setup described in the GerritWorkflow
page.</font>
<br>
<br><font size=2 face="sans-serif">Once I install DevStack, and have a
running OpenStack installation, can I then modify code and run unit tests?
I worry that either or both could interfere with the running OpenStack.
I have not noticed DevStack documentation speaking to this issue.
And, of course, I eventually want to get the running OpenStack to
use my modified code.</font>
<br>
<br>
<br><font size=2 face="sans-serif">=================================================</font>
<br><font size=2 face="sans-serif">HACKING.rst</font>
<br><font size=2 face="sans-serif">=================================================</font>
<br>
<br><font size=2 face="sans-serif">The nova project's HACKING.rst file
says</font>
<br>
<br><font size=2 face="sans-serif">The testing system is based on a combination
of tox and testr. The canonical approach to running tests is to simply
run the command ``tox``.</font>
<br>
<br><font size=2 face="sans-serif">Neither of the other two answers mentioned
tox and testr. I see that nova/run_tests.sh uses testr, and not tox.
The .venv created by nova/tools/install_venv.sh does not have a tox
command, and neither does the nova/.venv created by DevStack.</font>
<br>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">Mike</font>