diff options
author | Matt Clay <matt@mystile.com> | 2017-01-11 12:03:26 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2017-01-11 12:34:59 -0800 |
commit | cd3fdca540781d0b982e885b01f467f1601dba75 (patch) | |
tree | 3f66924eb79d6e0171cbb40d5f733be56b8e47fa /Makefile | |
parent | 027b126b42ee37c61d721c47dd493677ef936059 (diff) | |
download | ansible-cd3fdca540781d0b982e885b01f467f1601dba75.tar.gz |
Switch tests to pytest and ansible-test.
- Replace nose usage with pytest.
- Remove legacy Shippable integration.sh.
- Update Makefile to use pytest and ansible-test.
- Convert most yield unit tests to pytest parametrize.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -98,22 +98,30 @@ RPMNVR = "$(NAME)-$(VERSION)-$(RPMRELEASE)$(RPMDIST)" MOCK_BIN ?= mock MOCK_CFG ?= -NOSETESTS ?= nosetests +# ansible-test parameters +ANSIBLE_TEST ?= test/runner/ansible-test +TEST_FLAGS ?= -NOSETESTS3 ?= nosetests-3.5 +# ansible-test units parameters (make test / make test-py3) +PYTHON_VERSION ?= $(shell python2 -c 'import sys; print("%s.%s" % sys.version_info[:2])') +PYTHON3_VERSION ?= $(shell python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])') + +# ansible-test integration parameters (make integration) +IMAGE ?= centos7 +TARGET ?= ######################################################## all: clean python tests: - PYTHONPATH=./lib $(NOSETESTS) -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches --cover-erase -e test_os_server + $(ANSIBLE_TEST) units -v --python $(PYTHON_VERSION) $(TEST_FLAGS) tests-py3: - PYTHONPATH=./lib $(NOSETESTS3) -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches --cover-erase -e test_os_server + $(ANSIBLE_TEST) units -v --python $(PYTHON3_VERSION) $(TEST_FLAGS) integration: - test/utils/shippable/integration.sh + $(ANSIBLE_TEST) integration -v --docker $(IMAGE) $(TARGET) $(TEST_FLAGS) authors: sh hacking/authors.sh |