Make role test-requirements.txt be additive
Some roles need to make use of extra requirements, but only for tests. For example, the octavia role needs to use the octavia client for some test tasks. Instead of duplicating the whole test requirements file in that repo, we change the mechanism to make it additive so that the repo test-requirements are added into the test runtime venv. Change-Id: If670a32e79bfb4623fa427925cdc992219742d58
This commit is contained in:
parent
d8e70c43a9
commit
9297c36bb5
@ -138,13 +138,15 @@ fi
|
||||
# usable with 'Depends-On', which is marvellous!
|
||||
|
||||
# If the repo has its own test-requirements file, then use
|
||||
# it instead of the common one.
|
||||
# it with the common one.
|
||||
if [[ -f "${WORKING_DIR}/test-requirements.txt" ]]; then
|
||||
PIP_OPTS+=" --requirement ${WORKING_DIR}/test-requirements.txt"
|
||||
else
|
||||
PIP_OPTS+=" --requirement ${COMMON_TESTS_PATH}/test-requirements.txt"
|
||||
fi
|
||||
|
||||
# We add the common requirements after the in-repo requirements
|
||||
# so that the in-repo ones take precedence.
|
||||
PIP_OPTS+=" --requirement ${COMMON_TESTS_PATH}/test-requirements.txt"
|
||||
|
||||
# If the repo has a doc/requirements.txt file, add it to the
|
||||
# requirements list. This is necessary for the linters test
|
||||
# to be able to execute doc8.
|
||||
|
Loading…
Reference in New Issue
Block a user