at work
This commit is contained in:
75
tests/Makefile.am
Normal file
75
tests/Makefile.am
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo subdir-objects
|
||||
|
||||
SUFFIXES = .c .o
|
||||
AM_CFLAGS = -Wall -I.. -I.
|
||||
AM_LDFLAGS = -pthread
|
||||
|
||||
.c.o:
|
||||
$(CC) -I. -pthread $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
if HAVE_VALGRIND
|
||||
VALGRIND_OPT = --tool=memcheck
|
||||
endif
|
||||
|
||||
test: $(bin_TESTS)
|
||||
@for test in $(bin_TESTS); do \
|
||||
echo ====== Test $${test} ======; \
|
||||
./$${test}; \
|
||||
echo ====== Done $${test} ======; \
|
||||
done
|
||||
|
||||
|
||||
valgrind: $(bin_TESTS)
|
||||
@for test in $(bin_TESTS); do \
|
||||
echo ====== Test $${test} ======; \
|
||||
$(VALGRIND) $(VALGRIND_OPT) ./$${test}; \
|
||||
echo ====== Done $${test} ======; \
|
||||
done
|
||||
|
||||
common_SOURCES = \
|
||||
../cflexer.c \
|
||||
../cflexer.h \
|
||||
../cfparser.c \
|
||||
../cfparser.h \
|
||||
../cllexer.c \
|
||||
../cllexer.h \
|
||||
../clparser.c \
|
||||
../clparser.h \
|
||||
../jlexer.c \
|
||||
../jlexer.h \
|
||||
../jparser.c \
|
||||
../jparser.h \
|
||||
../logger.c \
|
||||
../logger.h \
|
||||
../massert.c \
|
||||
../massert.h \
|
||||
../rcache.c \
|
||||
../rcache.h
|
||||
|
||||
|
||||
bin_TESTS = \
|
||||
cfparser_test \
|
||||
clparser_test \
|
||||
cflexer_test \
|
||||
cfparser_test \
|
||||
cllexer_test \
|
||||
clparser_test \
|
||||
jlexer_test \
|
||||
jparser_test \
|
||||
rcache_test
|
||||
|
||||
noinst_PROGRAMS = $(bin_TESTS)
|
||||
#TESTS = $(bin_TESTS)
|
||||
|
||||
cflexer_test_SOURCES = cflexer_test.c $(common_SOURCES)
|
||||
cfparser_test_SOURCES = cfparser_test.c $(common_SOURCES)
|
||||
cllexer_test_SOURCES = cllexer_test.c $(common_SOURCES)
|
||||
clparser_test_SOURCES = clparser_test.c $(common_SOURCES)
|
||||
jlexer_test_SOURCES = jlexer_test.c $(common_SOURCES)
|
||||
jparser_test_SOURCES = jparser_test.c $(common_SOURCES)
|
||||
rcache_test_SOURCES = rcache_test.c $(common_SOURCES)
|
||||
|
||||
clean-local:
|
||||
rm -rf autom4te.cache
|
||||
rm -rf *~
|
||||
Reference in New Issue
Block a user