12to11/tests/Imakefile
hujianwei 6a0506a169 Add test for buffer transforms
* tests/Imakefile (OBJS3, SRCS3): New program.
(PROGRAMS): Add transform_test.
* tests/README: Document what these tests are.
* tests/damage_test.c (test_names): Fix coding style.
* tests/run_tests.sh (standard_tests): Add `standard_tests'.
* tests/svnignore.txt: Add transform_test.
* tests/test_harness.c (load_image_data): Fix stride validation
when height > width.
* tests/test_harness.h (FALLTHROUGH): New macro.
2022-11-04 07:22:57 +00:00

43 lines
1.7 KiB
Text

#include "../12to11.conf"
12TO11ROOT = ..
DEPLIBS = $(DEPXLIB)
LOCAL_LIBRARIES = $(WAYLAND_CLIENT) $(XLIB) $(PNG)
COMMONOBJS = test_harness.o
COMMONSRCS = test_harness.c
HEADER = test_harness.h
EXTRA_DEFINES := -D_GNU_SOURCE -U_BSD_SOURCE -U_SVID_SOURCE
#define ScannerTarget(name) @@\
name.h: $(12TO11ROOT)/name.xml @@\
$(WAYLAND_SCANNER) client-header $< $@ @@\
@@\
name.c: $(12TO11ROOT)/name.xml name.h @@\
$(WAYLAND_SCANNER) private-code $< $@ @@\
@@\
COMMONOBJS := $(COMMONOBJS) name.o @@\
COMMONSRCS := $(COMMONSRCS) name.c @@\
HEADER := $(HEADER) name.h @@\
ScannerTarget(12to11-test)
SRCS1 = $(COMMONSRCS) simple_test.c
OBJS1 = $(COMMONOBJS) simple_test.o
SRCS2 = $(COMMONSRCS) damage_test.c
OBJS2 = $(COMMONOBJS) damage_test.o
SRCS3 = $(COMMONSRCS) transform_test.c
OBJS3 = $(COMMONSRCS) transform_test.o
PROGRAMS = simple_test damage_test transform_test
/* Make all objects depend on HEADER. */
$(OBJS1): $(HEADER)
/* And depend on all sources and headers. */
depend:: $(HEADER) $(SRCS1)
NormalProgramTarget(simple_test,$(OBJS1),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
NormalProgramTarget(damage_test,$(OBJS2),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
NormalProgramTarget(transform_test,$(OBJS3),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
DependTarget3($(SRCS1),$(SRCS2),$(SRCS3))
all:: $(PROGRAMS)