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

Jay Pipes jaypipes at gmail.com
Fri Dec 27 02:00:30 UTC 2013


On 12/26/2013 07:06 PM, Clark Boylan wrote:
> On Thu, Dec 26, 2013 at 3:49 PM, Jay Pipes <jaypipes at 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 at 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



More information about the OpenStack-dev mailing list