summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2019-08-07 16:13:28 +0200
committerMatt Clay <matt@mystile.com>2019-08-07 18:34:26 +0200
commit278044358c9df08f424a459df3a686929659a978 (patch)
treee30ff8570e476cac5b5f1593d15e96da810a3d2d
parentRelocate validate-modules for easier testing. (#60214) (diff)
downloadansible-278044358c9df08f424a459df3a686929659a978.tar.xz
ansible-278044358c9df08f424a459df3a686929659a978.zip
Split up ansible-test sanity test requirements.
-rw-r--r--test/lib/ansible_test/_data/requirements/sanity.txt7
-rw-r--r--test/lib/ansible_test/_internal/executor.py4
-rw-r--r--test/sanity/requirements.txt4
3 files changed, 9 insertions, 6 deletions
diff --git a/test/lib/ansible_test/_data/requirements/sanity.txt b/test/lib/ansible_test/_data/requirements/sanity.txt
index 1545e8f99b..b6f6595ae4 100644
--- a/test/lib/ansible_test/_data/requirements/sanity.txt
+++ b/test/lib/ansible_test/_data/requirements/sanity.txt
@@ -1,14 +1,9 @@
cryptography
jinja2
-mock
-packaging # needed for update-bundled and changelog
pycodestyle
pylint ; python_version >= '3.5' # pylint 2.0.0 and later require python 3+
-pytest
+pyyaml
rstcheck ; python_version >= '2.7' # rstcheck requires python 2.7+
-sphinx ; python_version >= '3.5' # docs build requires python 3+
-sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
-straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+
virtualenv
voluptuous ; python_version >= '2.7' # voluptuous 0.11.0 and later require python 2.7+
yamllint
diff --git a/test/lib/ansible_test/_internal/executor.py b/test/lib/ansible_test/_internal/executor.py
index a93766309e..1618c1527f 100644
--- a/test/lib/ansible_test/_internal/executor.py
+++ b/test/lib/ansible_test/_internal/executor.py
@@ -323,6 +323,10 @@ def generate_pip_install(pip, command, packages=None):
if os.path.exists(requirements) and os.path.getsize(requirements):
options += ['-r', requirements]
+ if data_context().content.is_ansible:
+ if command == 'sanity':
+ options += ['-r', os.path.join(data_context().content.root, 'test', 'sanity', 'requirements.txt')]
+
if packages:
options += packages
diff --git a/test/sanity/requirements.txt b/test/sanity/requirements.txt
new file mode 100644
index 0000000000..3e3a96692b
--- /dev/null
+++ b/test/sanity/requirements.txt
@@ -0,0 +1,4 @@
+packaging # needed for update-bundled and changelog
+sphinx ; python_version >= '3.5' # docs build requires python 3+
+sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
+straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+