# Copyright (C) 2016, 2017, 2018, 2019, 2020 The Meme Factory, Inc.
# http://www.karlpinc.com/

# This file is part of PGWUI_Testing.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program.  If not, see
# <http://www.gnu.org/licenses/>.
#

# Karl O. Pinc <kop@karlpinc.com>

PGWUI_COMPONENT := pgwui_testing

include Makefile_pgwui.mk


# For check
export COV_CORE_SOURCE   := pgwui_testing
export COV_CORE_CONFIG   := .coveragerc
export COV_CORE_DATAFILE := .coverage.eager

# For clean
COVERAGE_DATA := .coverage .coverage.*
COVERAGE_STUFF := $(COVERAGE_STUFF) $(COVERAGE_DATA)

# Because we're testing fixtures we need to accumulate
# coverage data with --cov-append for pytest.  But this
# leaves coverage data files laying about which interfere
# with subsequent runs.  Remove the old data before
# running pytest again.

.PHONY: rm_coverage_data
rm_coverage_data:
	rm -f $(COVERAGE_DATA)

check: rm_coverage_data
check-unit: rm_coverage_data
check-integration: rm_coverage_data
