Skip to content

Commit

Permalink
Initial ansible-test implementation. (ansible#18556)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclay authored Nov 30, 2016
1 parent d95eac1 commit 6bbd92e
Show file tree
Hide file tree
Showing 191 changed files with 5,483 additions and 48 deletions.
24 changes: 21 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[report]
# This configuration file is used for manual execution of coverage
# as well as for tests run through ansible-test.

[run]
branch = True

# Enable concurrency. This also enables parallel mode, which results in
# multiple coverage files being created. Concurrency allows us to collect
# results from multiple tests simultaneously, as well as supporting multiple
# test runs, such as from integration tests.
concurrency = multiprocessing

# When running tests through ansible-test, this option is overridden by
# the COVERAGE_FILE environment variable. This option is present for
# convenience when running coverage manually from this directory.
data_file = test/results/coverage/coverage

# Don't collect or report code coverage from files matching these patterns.
omit =
*/python?.?/*
*/site-packages/nose/*
*/python*/dist-packages/*
*/python*/site-packages/*
*/pytest
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ credentials.yml
# test output
*.retry
*.out
.coverage
.tox
.cache
results.xml
Expand All @@ -67,3 +66,11 @@ ansible.egg-info/
/shippable/
# Release directory
packaging/release/ansible_release
/.cache/
/test/results/coverage/coverage*
/test/results/reports/coverage.xml
/test/results/reports/coverage/
/test/results/junit/*.xml
/test/results/logs/*.log
/test/integration/inventory.remote
/test/integration/inventory.winrm
79 changes: 35 additions & 44 deletions shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,51 @@ matrix:
exclude:
- env: TEST=none
include:
- env: TEST=remote TARGET=all PLATFORM=osx VERSION=10.11
- env: TEST=other
- env: TEST=units

- env: TEST=remote TARGET=all PLATFORM=freebsd VERSION=10.3-STABLE PRIVILEGED=true
- env: TEST=osx/10.11

- env: TEST=remote TARGET=ci_win1 PLATFORM=windows VERSION=2012-R2_RTM
- env: TEST=remote TARGET=ci_win2 PLATFORM=windows VERSION=2012-R2_RTM
- env: TEST=remote TARGET=ci_win3 PLATFORM=windows VERSION=2012-R2_RTM
- env: TEST=freebsd/10.3-STABLE

- env: TEST=integration TARGET=destructive IMAGE=ansible/ansible:centos6
- env: TEST=integration TARGET=destructive IMAGE=ansible/ansible:centos7
- env: TEST=integration TARGET=destructive IMAGE=ansible/ansible:fedora-rawhide
- env: TEST=integration TARGET=destructive IMAGE=ansible/ansible:fedora23
- env: TEST=integration TARGET=destructive IMAGE=ansible/ansible:opensuseleap
- env: TEST=integration TARGET=destructive IMAGE=ansible/ansible:ubuntu1204 PRIVILEGED=true
- env: TEST=integration TARGET=destructive IMAGE=ansible/ansible:ubuntu1404 PRIVILEGED=true
- env: TEST=integration TARGET=destructive IMAGE=ansible/ansible:ubuntu1604
- env: TEST=integration TARGET=destructive IMAGE=ansible/ansible:ubuntu1604py3 PYTHON3=1
- env: TEST=windows/1
- env: TEST=windows/2
- env: TEST=windows/3

- env: TEST=integration TARGET=non_destructive IMAGE=ansible/ansible:centos6
- env: TEST=integration TARGET=non_destructive IMAGE=ansible/ansible:centos7 PRIVILEGED=true
- env: TEST=integration TARGET=non_destructive IMAGE=ansible/ansible:fedora-rawhide PRIVILEGED=true
- env: TEST=integration TARGET=non_destructive IMAGE=ansible/ansible:fedora23 PRIVILEGED=true
- env: TEST=integration TARGET=non_destructive IMAGE=ansible/ansible:opensuseleap PRIVILEGED=true
- env: TEST=integration TARGET=non_destructive IMAGE=ansible/ansible:ubuntu1204 PRIVILEGED=true
- env: TEST=integration TARGET=non_destructive IMAGE=ansible/ansible:ubuntu1404 PRIVILEGED=true
- env: TEST=integration TARGET=non_destructive IMAGE=ansible/ansible:ubuntu1604 PRIVILEGED=true
- env: TEST=integration TARGET=non_destructive IMAGE=ansible/ansible:ubuntu1604py3 PYTHON3=1 PRIVILEGED=true
- env: TEST=linux/centos6/1
- env: TEST=linux/centos7/1
- env: TEST=linux/fedora-rawhide/1
- env: TEST=linux/fedora23/1
- env: TEST=linux/opensuseleap/1
- env: TEST=linux/ubuntu1204/1
- env: TEST=linux/ubuntu1404/1
- env: TEST=linux/ubuntu1604/1
- env: TEST=linux/ubuntu1604py3/1

- env: TEST=integration TARGET=other IMAGE=ansible/ansible:centos6
- env: TEST=integration TARGET=other IMAGE=ansible/ansible:centos7
- env: TEST=integration TARGET=other IMAGE=ansible/ansible:fedora-rawhide
- env: TEST=integration TARGET=other IMAGE=ansible/ansible:fedora23
- env: TEST=integration TARGET=other IMAGE=ansible/ansible:opensuseleap
- env: TEST=integration TARGET=other IMAGE=ansible/ansible:ubuntu1204
- env: TEST=integration TARGET=other IMAGE=ansible/ansible:ubuntu1404
- env: TEST=integration TARGET=other IMAGE=ansible/ansible:ubuntu1604
- env: TEST=integration TARGET=other IMAGE=ansible/ansible:ubuntu1604py3 PYTHON3=1
- env: TEST=linux/centos6/2
- env: TEST=linux/centos7/2
- env: TEST=linux/fedora-rawhide/2
- env: TEST=linux/fedora23/2
- env: TEST=linux/opensuseleap/2
- env: TEST=linux/ubuntu1204/2
- env: TEST=linux/ubuntu1404/2
- env: TEST=linux/ubuntu1604/2
- env: TEST=linux/ubuntu1604py3/2

- env: TEST=sanity INSTALL_DEPS=1 TOXENV=py24
python: 2.7
- env: TEST=sanity INSTALL_DEPS=1 TOXENV=py26
python: 2.6
- env: TEST=sanity INSTALL_DEPS=1 TOXENV=py27
python: 2.7
- env: TEST=sanity INSTALL_DEPS=1 TOXENV=py35
python: 3.5

- env: TEST=code-smell INSTALL_DEPS=1
python: 2.7
- env: TEST=linux/centos6/3
- env: TEST=linux/centos7/3
- env: TEST=linux/fedora-rawhide/3
- env: TEST=linux/fedora23/3
- env: TEST=linux/opensuseleap/3
- env: TEST=linux/ubuntu1204/3
- env: TEST=linux/ubuntu1404/3
- env: TEST=linux/ubuntu1604/3
- env: TEST=linux/ubuntu1604py3/3
build:
pre_ci_boot:
options: "--privileged=false --net=bridge"
ci:
- test/utils/shippable/ci.sh
- test/utils/shippable/timing.sh test/utils/shippable/shippable.sh

integrations:
notifications:
Expand Down
51 changes: 51 additions & 0 deletions test/compile/python2.4-skip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/contrib/
/docsite/
/hacking/
/lib/ansible/cli/
/lib/ansible/compat/
/lib/ansible/config/
/lib/ansible/constants.py
/lib/ansible/errors/
/lib/ansible/executor/
/lib/ansible/galaxy/
/lib/ansible/__init__.py
/lib/ansible/inventory/
/lib/ansible/modules/core/cloud/[^/]+/(?!(ec2_facts.py|_ec2_ami_search.py))
/lib/ansible/modules/extras/cloud/
/lib/ansible/modules/extras/clustering/consul.*.py
/lib/ansible/modules/extras/clustering/znode.py
/lib/ansible/modules/extras/database/influxdb/
/lib/ansible/modules/extras/database/mssql/
/lib/ansible/modules/extras/infrastructure/foreman/
/lib/ansible/modules/extras/monitoring/zabbix.*.py
/lib/ansible/modules/extras/network/f5/
/lib/ansible/modules/extras/network/nmcli.py
/lib/ansible/modules/extras/notification/pushbullet.py
/lib/ansible/modules/extras/packaging/language/maven_artifact.py
/lib/ansible/modules/extras/packaging/os/dnf.py
/lib/ansible/modules/extras/packaging/os/layman.py
/lib/ansible/modules/extras/remote_management/ipmi/
/lib/ansible/modules/extras/univention/
/lib/ansible/modules/extras/web_infrastructure/letsencrypt.py
/lib/ansible/modules/__init__.py
/lib/ansible/module_utils/a10.py
/lib/ansible/module_utils/azure_rm_common.py
/lib/ansible/module_utils/cloud.py
/lib/ansible/module_utils/docker_common.py
/lib/ansible/module_utils/ec2.py
/lib/ansible/module_utils/gcdns.py
/lib/ansible/module_utils/gce.py
/lib/ansible/module_utils/gcp.py
/lib/ansible/module_utils/lxd.py
/lib/ansible/module_utils/openstack.py
/lib/ansible/module_utils/rax.py
/lib/ansible/module_utils/vca.py
/lib/ansible/module_utils/vmware.py
/lib/ansible/parsing/
/lib/ansible/playbook/
/lib/ansible/plugins/
/lib/ansible/release.py
/lib/ansible/template/
/lib/ansible/utils/
/lib/ansible/vars/
/test/
2 changes: 2 additions & 0 deletions test/compile/python2.6-skip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/contrib/inventory/vagrant.py
/hacking/dump_playbook_attributes.py
2 changes: 2 additions & 0 deletions test/compile/python3.5-skip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/examples/scripts/uptime.py
/test/samples/multi.py
1 change: 1 addition & 0 deletions test/integration/targets/add_host/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/ansible/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
2 changes: 2 additions & 0 deletions test/integration/targets/apache2_module/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
destructive
posix/ci/group1
2 changes: 2 additions & 0 deletions test/integration/targets/apt/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
destructive
posix/ci/group1
3 changes: 3 additions & 0 deletions test/integration/targets/apt_repository/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apt_key
destructive
posix/ci/group1
1 change: 1 addition & 0 deletions test/integration/targets/args/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/assemble/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
3 changes: 3 additions & 0 deletions test/integration/targets/async/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
async_status
async_wrapper
posix/ci/group2
4 changes: 4 additions & 0 deletions test/integration/targets/async_extra_data/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
needs/ssh
posix/ci/group3
skip/freebsd
skip/osx
2 changes: 2 additions & 0 deletions test/integration/targets/authorized_key/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
needs/root
posix/ci/group2
2 changes: 2 additions & 0 deletions test/integration/targets/become/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
destructive
posix/ci/group1
1 change: 1 addition & 0 deletions test/integration/targets/binary/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/binary_modules_posix/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/binary_modules_winrm/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
windows/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/blocks/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/changed_when/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/check_mode/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
3 changes: 3 additions & 0 deletions test/integration/targets/command_shell/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
command
posix/ci/group2
shell
1 change: 1 addition & 0 deletions test/integration/targets/conditionals/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
2 changes: 2 additions & 0 deletions test/integration/targets/connection_chroot/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
needs/root
posix/ci/group3
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions test/integration/targets/connection_local/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions test/integration/targets/connection_paramiko_ssh/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
needs/ssh
posix/ci/group3
2 changes: 2 additions & 0 deletions test/integration/targets/connection_ssh/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
needs/ssh
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/connection_winrm/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
windows/ci/group3
2 changes: 2 additions & 0 deletions test/integration/targets/copy/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
needs/root
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/delegate_to/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
2 changes: 2 additions & 0 deletions test/integration/targets/dnf/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
destructive
posix/ci/group1
2 changes: 2 additions & 0 deletions test/integration/targets/docker/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
destructive
posix/ci/group1
1 change: 1 addition & 0 deletions test/integration/targets/embedded_module/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/environment/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/facts_d/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/failed_when/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/fetch/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/file/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/filters/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
2 changes: 2 additions & 0 deletions test/integration/targets/gathering_facts/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
posix/ci/group3
skip/osx
2 changes: 2 additions & 0 deletions test/integration/targets/gem/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
destructive
posix/ci/group1
4 changes: 4 additions & 0 deletions test/integration/targets/get_url/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
destructive
posix/ci/group1
skip/freebsd
skip/osx
3 changes: 3 additions & 0 deletions test/integration/targets/git/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
destructive
posix/ci/group1
skip/osx
1 change: 1 addition & 0 deletions test/integration/targets/group_by/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/handlers/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/hash/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
2 changes: 2 additions & 0 deletions test/integration/targets/hg/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
posix/ci/group2
skip/python3
1 change: 1 addition & 0 deletions test/integration/targets/hosts_field/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/ignore_errors/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/include_vars/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/includes/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
2 changes: 2 additions & 0 deletions test/integration/targets/iterators/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
posix/ci/group2
skip/osx
1 change: 1 addition & 0 deletions test/integration/targets/lineinfile/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/lookup_paths/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/lookup_properties/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/lookups/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/loops/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
3 changes: 3 additions & 0 deletions test/integration/targets/mount/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
needs/privileged
needs/root
posix/ci/group2
4 changes: 4 additions & 0 deletions test/integration/targets/mysql_db/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
destructive
posix/ci/group1
skip/freebsd
skip/osx
4 changes: 4 additions & 0 deletions test/integration/targets/mysql_user/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
destructive
posix/ci/group1
skip/freebsd
skip/osx
4 changes: 4 additions & 0 deletions test/integration/targets/mysql_variables/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
destructive
posix/ci/group1
skip/freebsd
skip/osx
1 change: 1 addition & 0 deletions test/integration/targets/no_log/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/parsing/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/ping/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
2 changes: 2 additions & 0 deletions test/integration/targets/pip/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
destructive
posix/ci/group1
8 changes: 8 additions & 0 deletions test/integration/targets/postgresql/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
destructive
needs/privileged
posix/ci/group1
postgresql_db
postgresql_privs
postgresql_user
skip/freebsd
skip/osx
1 change: 1 addition & 0 deletions test/integration/targets/pull_limit_inventory/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/pull_no_127/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/pull_run/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/script/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
6 changes: 6 additions & 0 deletions test/integration/targets/service/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
destructive
needs/privileged
posix/ci/group1
skip/freebsd
skip/osx
skip/python3
1 change: 1 addition & 0 deletions test/integration/targets/special_vars/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/stat/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/subversion/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/synchronize/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
1 change: 1 addition & 0 deletions test/integration/targets/tags/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group3
1 change: 1 addition & 0 deletions test/integration/targets/task_ordering/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
posix/ci/group2
Loading

0 comments on commit 6bbd92e

Please sign in to comment.