diff options
author | Elijah DeLee <kdelee@redhat.com> | 2018-11-06 21:22:07 +0100 |
---|---|---|
committer | Elijah DeLee <kdelee@redhat.com> | 2018-11-15 21:29:35 +0100 |
commit | d70cd113e11d92edaabfbb6b70ca9900b3f425ff (patch) | |
tree | d071af148049e58f3bbe2c502f3dfbcae529fc2c | |
parent | Generate schema suitable for comparing for schema changes (diff) | |
download | awx-d70cd113e11d92edaabfbb6b70ca9900b3f425ff.tar.xz awx-d70cd113e11d92edaabfbb6b70ca9900b3f425ff.zip |
Reduce duplicated logic for genschema target
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore index f1463667a5..0ba4ef481b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Ignore generated schema +swagger.json +schema.json # Tags .tags @@ -11,7 +11,6 @@ GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) MANAGEMENT_COMMAND ?= awx-manage IMAGE_REPOSITORY_AUTH ?= IMAGE_REPOSITORY_BASE ?= https://gcr.io - VERSION := $(shell cat VERSION) # NOTE: This defaults the container image version to the branch that's active @@ -339,16 +338,13 @@ pylint: reports @(set -o pipefail && $@ | reports/$@.report) genschema: reports - @if [ "$(VENV_BASE)" ]; then \ - . $(VENV_BASE)/awx/bin/activate; \ - fi; \ - (set -o pipefail && py.test --genschema awx/conf/tests/functional awx/main/tests/functional/api awx/main/tests/docs --release=$(VERSION_TARGET) | tee reports/$@.report) + $(MAKE) swagger PYTEST_ARGS="--genschema" swagger: reports @if [ "$(VENV_BASE)" ]; then \ . $(VENV_BASE)/awx/bin/activate; \ fi; \ - (set -o pipefail && py.test awx/conf/tests/functional awx/main/tests/functional/api awx/main/tests/docs --release=$(VERSION_TARGET) | tee reports/$@.report) + (set -o pipefail && py.test $(PYTEST_ARGS) awx/conf/tests/functional awx/main/tests/functional/api awx/main/tests/docs --release=$(VERSION_TARGET) | tee reports/$@.report) check: flake8 pep8 # pyflakes pylint |