mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Convert ansible-test compile into a sanity test.
This commit is contained in:
4
docs/docsite/rst/dev_guide/testing/sanity/compile.rst
Normal file
4
docs/docsite/rst/dev_guide/testing/sanity/compile.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
Sanity Tests » compile
|
||||
======================
|
||||
|
||||
See :doc:`../../testing_compile` for more information.
|
||||
@@ -15,34 +15,36 @@ Compile tests check source files for valid syntax on all supported python versio
|
||||
- 3.5
|
||||
- 3.6
|
||||
|
||||
NOTE: In Ansible 2.4 and earlier the compile test was provided by a dedicated sub-command ``ansible-test compile`` instead of a sanity test using ``ansible-test sanity --test compile``.
|
||||
|
||||
Running compile tests locally
|
||||
=============================
|
||||
|
||||
Unit tests can be run across the whole code base by doing:
|
||||
Compile tests can be run across the whole code base by doing:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
cd /path/to/ansible/source
|
||||
source hacking/env-setup
|
||||
ansible-test compile
|
||||
ansible-test sanity --test compile
|
||||
|
||||
Against a single file by doing:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
ansible-test compile lineinfile
|
||||
ansible-test sanity --test compile lineinfile
|
||||
|
||||
Or against a specific Python version by doing:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
ansible-test compile --python 2.7 lineinfile
|
||||
ansible-test sanity --test compile --python 2.7 lineinfile
|
||||
|
||||
For advanced usage see the help:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
ansible-test units --help
|
||||
ansible-test sanity --help
|
||||
|
||||
|
||||
Installing dependencies
|
||||
@@ -54,7 +56,7 @@ The dependencies can be installed using the ``--requirements`` argument. For exa
|
||||
|
||||
.. code:: shell
|
||||
|
||||
ansible-test units --requirements lineinfile
|
||||
ansible-test sanity --test compile --requirements lineinfile
|
||||
|
||||
|
||||
|
||||
@@ -64,4 +66,4 @@ The full list of requirements can be found at `test/runner/requirements <https:/
|
||||
Extending compile tests
|
||||
=======================
|
||||
|
||||
If you believe changes are needed to the Compile tests please add a comment on the `Testing Working Group Agenda <https://github.com/ansible/community/blob/master/meetings/README.md>`_ so it can be discussed.
|
||||
If you believe changes are needed to the compile tests please add a comment on the `Testing Working Group Agenda <https://github.com/ansible/community/blob/master/meetings/README.md>`_ so it can be discussed.
|
||||
|
||||
Reference in New Issue
Block a user