[openstack-dev] [Infra][Devstack] Why aren't test-requirements.txt installed during test runs?

2013-12-26 Thread Jay Pipes

Hello all,

When looking at a Solum patch in review [1], I wondered why Georgy 
needed to move fixtures, testresources, and httplib2 into 
requirements.txt [2] instead of test-requirements.txt, when those 
aforementioned dependencies are not for Solum itself, but rather the 
newly-introduced functional tests. When I asked Georgy on IRC, he 
mentioned that the gate doesn't install the dependencies in 
test-requirements.txt.


I'm wondering why that is the case? Why bother having a 
test-requirements.txt at all, if we need to list test-specific 
dependencies in requirements.txt?


Thanks in advance for answers!

Best,
-jay

[1] https://review.openstack.org/#/c/64165
[2] https://review.openstack.org/#/c/64165/9/requirements.txt

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


Re: [openstack-dev] [Infra][Devstack] Why aren't test-requirements.txt installed during test runs?

2013-12-26 Thread Clark Boylan
On Thu, Dec 26, 2013 at 3:49 PM, Jay Pipes jaypi...@gmail.com wrote:
 Hello all,

 When looking at a Solum patch in review [1], I wondered why Georgy needed to
 move fixtures, testresources, and httplib2 into requirements.txt [2] instead
 of test-requirements.txt, when those aforementioned dependencies are not for
 Solum itself, but rather the newly-introduced functional tests. When I asked
 Georgy on IRC, he mentioned that the gate doesn't install the dependencies
 in test-requirements.txt.

 I'm wondering why that is the case? Why bother having a
 test-requirements.txt at all, if we need to list test-specific dependencies
 in requirements.txt?

 Thanks in advance for answers!

 Best,
 -jay

 [1] https://review.openstack.org/#/c/64165
 [2] https://review.openstack.org/#/c/64165/9/requirements.txt

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

The gate is made up of two major types of tests. The first are self
contained unittest like tests that rely on tox for their invocation
and the second are the devstack-gate tests that use the devstack-gate
project to configure and run tests. In both cases projects are
installed from source (with pip install $PATH_TO_PROJECT iirc) which
installs only the requirements.txt. These are the requirements needed
to run the project but not to test it. In the tox run tests you will
typically add the test-requirements.txt file to the testenv's dep list
in order to get those dependencies installed for testing. In
devstack-gate land no test-requirements are installed as these are
functional/integration tests and should be tested as normally
installed.

So it depends on which test was having trouble. If it was something
run by tox then tox.ini probably needs an update. This sounds like a
problem with the devstack-gate tests which are trickier because it
just does normal installs of projects before testing them and the test
framework is expected to pull in the test dependencies as its normal
dependencies. In this case I would probably update the job in question
to install the test-requirements as part of the pre_test_hook in
devstack-gate.

The reason for the difference in lists is requirements.txt is the
minimum to run the project. test-requirements.txt is the minimum
needed to run the unittests, doc builds, lint checks, and so on.

Clark

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


Re: [openstack-dev] [Infra][Devstack] Why aren't test-requirements.txt installed during test runs?

2013-12-26 Thread Jay Pipes

On 12/26/2013 07:06 PM, Clark Boylan wrote:

On Thu, Dec 26, 2013 at 3:49 PM, Jay Pipes jaypi...@gmail.com wrote:

Hello all,

When looking at a Solum patch in review [1], I wondered why Georgy needed to
move fixtures, testresources, and httplib2 into requirements.txt [2] instead
of test-requirements.txt, when those aforementioned dependencies are not for
Solum itself, but rather the newly-introduced functional tests. When I asked
Georgy on IRC, he mentioned that the gate doesn't install the dependencies
in test-requirements.txt.

I'm wondering why that is the case? Why bother having a
test-requirements.txt at all, if we need to list test-specific dependencies
in requirements.txt?

Thanks in advance for answers!

Best,
-jay

[1] https://review.openstack.org/#/c/64165
[2] https://review.openstack.org/#/c/64165/9/requirements.txt

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


The gate is made up of two major types of tests. The first are self
contained unittest like tests that rely on tox for their invocation
and the second are the devstack-gate tests that use the devstack-gate
project to configure and run tests. In both cases projects are
installed from source (with pip install $PATH_TO_PROJECT iirc) which
installs only the requirements.txt. These are the requirements needed
to run the project but not to test it. In the tox run tests you will
typically add the test-requirements.txt file to the testenv's dep list
in order to get those dependencies installed for testing. In
devstack-gate land no test-requirements are installed as these are
functional/integration tests and should be tested as normally
installed.


OK, understood, thx for the detailed explanation.


So it depends on which test was having trouble. If it was something
run by tox then tox.ini probably needs an update. This sounds like a
problem with the devstack-gate tests which are trickier because it
just does normal installs of projects before testing them and the test
framework is expected to pull in the test dependencies as its normal
dependencies. In this case I would probably update the job in question
to install the test-requirements as part of the pre_test_hook in
devstack-gate.


Ah, good thinking. That's indeed a good solution.

Thank you, Clark!
-jay

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


Re: [openstack-dev] [Infra][Devstack] Why aren't test-requirements.txt installed during test runs?

2013-12-26 Thread Noorul Islam Kamal Malmiyoda
On Fri, Dec 27, 2013 at 7:30 AM, Jay Pipes jaypi...@gmail.com wrote:
 On 12/26/2013 07:06 PM, Clark Boylan wrote:

 On Thu, Dec 26, 2013 at 3:49 PM, Jay Pipes jaypi...@gmail.com wrote:

 Hello all,

 When looking at a Solum patch in review [1], I wondered why Georgy needed
 to
 move fixtures, testresources, and httplib2 into requirements.txt [2]
 instead
 of test-requirements.txt, when those aforementioned dependencies are not
 for
 Solum itself, but rather the newly-introduced functional tests. When I
 asked
 Georgy on IRC, he mentioned that the gate doesn't install the
 dependencies
 in test-requirements.txt.

 I'm wondering why that is the case? Why bother having a
 test-requirements.txt at all, if we need to list test-specific
 dependencies
 in requirements.txt?

 Thanks in advance for answers!

 Best,
 -jay

 [1] https://review.openstack.org/#/c/64165
 [2] https://review.openstack.org/#/c/64165/9/requirements.txt

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


 The gate is made up of two major types of tests. The first are self
 contained unittest like tests that rely on tox for their invocation
 and the second are the devstack-gate tests that use the devstack-gate
 project to configure and run tests. In both cases projects are
 installed from source (with pip install $PATH_TO_PROJECT iirc) which
 installs only the requirements.txt. These are the requirements needed
 to run the project but not to test it. In the tox run tests you will
 typically add the test-requirements.txt file to the testenv's dep list
 in order to get those dependencies installed for testing. In
 devstack-gate land no test-requirements are installed as these are
 functional/integration tests and should be tested as normally
 installed.


 OK, understood, thx for the detailed explanation.


 So it depends on which test was having trouble. If it was something
 run by tox then tox.ini probably needs an update. This sounds like a
 problem with the devstack-gate tests which are trickier because it
 just does normal installs of projects before testing them and the test
 framework is expected to pull in the test dependencies as its normal
 dependencies. In this case I would probably update the job in question
 to install the test-requirements as part of the pre_test_hook in
 devstack-gate.


 Ah, good thinking. That's indeed a good solution.

 Thank you, Clark!

https://review.openstack.org/64226

Regards,
Noorul

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