spice-common/tests/Makefile.am
Christophe Fergeau 523875d8c5 Add marshaller test case
This allows to test the spice_marshaller_linearize() fix which was sent
recently.
2015-09-15 17:48:59 +02:00

51 lines
1.7 KiB
Makefile

NULL =
TESTS = test_marshallers
check_PROGRAMS = test_marshallers
test_marshallers_SOURCES = \
generated_test_marshallers.c \
generated_test_marshallers.h \
test-marshallers.c \
test-marshallers.h \
$(NULL)
test_marshallers_CFLAGS = \
-I$(top_srcdir)/common \
$(GLIB2_CFLAGS) \
$(PROTOCOL_CFLAGS) \
$(NULL)
test_marshallers_LDFLAGS = \
$(top_builddir)/common/libspice-common.la \
$(GLIB2_LIBS) \
$(NULL)
# Avoid need for python(pyparsing) by end users
TEST_MARSHALLERS = \
generated_test_marshallers.c \
generated_test_marshallers.h \
$(NULL)
BUILT_SOURCES = $(TEST_MARSHALLERS)
MARSHALLERS_DEPS = \
$(CODE_GENERATOR_BASEDIR)/python_modules/__init__.py \
$(CODE_GENERATOR_BASEDIR)/python_modules/codegen.py \
$(CODE_GENERATOR_BASEDIR)/python_modules/demarshal.py \
$(CODE_GENERATOR_BASEDIR)/python_modules/marshal.py \
$(CODE_GENERATOR_BASEDIR)/python_modules/ptypes.py \
$(CODE_GENERATOR_BASEDIR)/python_modules/spice_parser.py \
$(CODE_GENERATOR_BASEDIR)/spice_codegen.py \
$(NULL)
# Note despite being autogenerated these are not part of CLEANFILES, they are
# actually a part of EXTRA_DIST, to avoid the need for pyparser by end users
generated_test_marshallers.c: $(srcdir)/test-marshallers.proto $(MARSHALLERS_DEPS)
$(AM_V_GEN)$(PYTHON) $(CODE_GENERATOR_BASEDIR)/spice_codegen.py --generate-marshallers --server --include test-marshallers.h $< $@ >/dev/null
generated_test_marshallers.h: $(srcdir)/test-marshallers.proto $(MARSHALLERS_DEPS)
$(AM_V_GEN)$(PYTHON) $(CODE_GENERATOR_BASEDIR)/spice_codegen.py --generate-marshallers --server --include test-marshallers.h -H $< $@ >/dev/null
EXTRA_DIST = \
$(TEST_MARSHALLERS) \
$(NULL)
-include $(top_srcdir)/git.mk