jitters/tests/local.am

51 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2020-09-29 20:35:05 +02:00
# Configure TAP driver
TEST_LOG_DRIVER = \
env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh
TESTS =
2020-09-29 20:35:51 +02:00
2020-09-30 13:02:39 +02:00
# Leak suppresion file, because Asan screams about Criterion internals otherwise
SUPPRESSION_FILE = $(srcdir)/%D%/unit/leak.suppr
2020-09-29 20:35:51 +02:00
# Distribute the leak suppression file
2020-09-30 13:02:39 +02:00
EXTRA_DIST += $(SUPPRESSION_FILE)
2020-09-29 20:35:51 +02:00
if USING_CRITERION
# Add our testsuite to `make check` only if Criterion is detected
check_PROGRAMS = testsuite
# Add our testsuite to the TAP driver
TESTS += $(check_PROGRAMS)
# Setup Criterion TAP output, and suppress leak from Criterion
AM_TESTS_ENVIRONMENT = \
CRITERION_OUTPUTS='tap:-'; \
export CRITERION_OUTPUTS; \
2020-09-30 13:02:39 +02:00
LSAN_OPTIONS='suppressions=$(SUPPRESSION_FILE)'; \
2020-09-29 20:35:51 +02:00
export LSAN_OPTIONS; \
$(NULL)
# Unit-test sources
testsuite_SOURCES = \
%D%/unit/common.c \
%D%/unit/common.h \
2020-09-29 20:36:09 +02:00
%D%/unit/eval.c \
2020-09-30 01:33:22 +02:00
%D%/unit/jit.c \
2020-09-29 20:35:51 +02:00
%D%/unit/parse.c \
2020-09-30 22:35:58 +02:00
%D%/unit/vm.c \
2020-09-29 20:35:51 +02:00
$(NULL)
# Libraries being tested
testsuite_LDADD = \
libast.a \
2020-09-29 20:36:09 +02:00
libeval.a \
2020-09-30 01:33:22 +02:00
libjit.a \
2020-09-29 20:35:51 +02:00
libparse.a \
2020-09-30 22:35:58 +02:00
libvm.a \
2020-09-29 20:35:51 +02:00
$(NULL)
# Needed flags
testsuite_CFLAGS = $(AM_CFLAGS) $(CRITERION_CFLAGS)
testsuite_CPPFLAGS = $(AM_CPPFLAGS)
testsuite_LDFLAGS = $(AM_LDFLAGS) $(CRITERION_LIBS)
endif