.PHONY: run run-one no-dump-run deps

deps:
	@pip install -q -e "..[dev]" 2>/dev/null || pip install -q pytest

run: deps
	bats -x -T --print-output-on-failure *.bats
	pytest test_*.py -v

run-one:
	if [ -z "$(TESTS)" ]; then \
		echo "Error: make run-one TESTS=...";\
		exit 1;\
	fi
	bats -x -T --print-output-on-failure $(TESTS)

# For show tests (0002): set RHJIRA_SHOW_ISSUE to an issue that exists on your Jira.
# Example for redhat.atlassian.net: export RHJIRA_SHOW_ISSUE=RHEL-56971
no-dump-run: deps
	bats -x -T --print-output-on-failure 000[23456789]*.bats
	pytest test_*.py -v
