## This file helps set up a vinyltest execution without a traditional
## pre-defined list of tests. Test cases are expected to be located in a
## tests/ directory relative to the Makefile's source directory.
##
## When a difference is detected, a refresh is triggered by calling the
## vtc-refresh-tests target that must be defined in the including Makefile.
##
## The current assumption is that all the tests for the Makefile are VTCs
## and may be revisited if needed.

VTC_LOG_COMPILER = $(top_builddir)/bin/vinyltest/vinyltest -v -i
TEST_EXTENSIONS = .vtc

check: vtc-check-tests

vtc-check-tests:
	@mkdir -p tests ; \
	LC_ALL=C; \
	if [ "$$(cd $(srcdir) && echo tests/*.vtc)" != "$(TESTS)" ]; then \
		cd $(top_builddir) && ./config.status --recheck ; \
	fi
