12to11/tests/Imakefile
hujianwei 5d033bc93f Add new damage test and unify buffer release code in xdg_surface
* 12to11-test.xml (test_surface): <description>: Document when
frame callbacks are run.
* 12to11.c (HandleCmdline): Accept new arg `printsocket'.
(XLMain): Pass socket to HandleCmdline.
* 12to11.man: Document new `printsocket' option.
* mime0.awk:
* mime1.awk:
* mime2.awk:
* mime3.awk:
* mime4.awk: Fix typos in copyright blurb.
* test.c (NoteBounds): Sync with X server after XResizeWindow.
(Commit): Run frame callbacks after unmap as well.
(GetTestSurface): Make windows override redirect.

* tests/Imakefile (SRCS2, OBJS2): New program.
(PROGRAMS): Add damage_test.
(damage_test): New program.  Depend on SRCS2.
* tests/README: Improve documentation on how to run tests.
* tests/simple_test.c (test_names): New list.
(LAST_TEST): New define.
(verify_single_step): Complete test upon last test being run.
(test_single_step): Submit correct surface damage.
(test_next_step): New function.  Does nothing here.
(handle_wl_callback_done): Run the next test.
(submit_surface_damage): New function.
* tests/svnignore.txt: Add damage_test and Makefile.bak.
* tests/test_harness.c (test_complete): New function.
* tests/test_harness.h: New prototypes.
* xdg_surface.c (struct _XdgRole): Use a buffer release helper.
(struct _ReleaseLaterRecord, DeleteRecord, FreeRecords)
(AddRecordAfter): Delete unused structs and functions.
(RunFrameCallbacksConditionally, BufferIdleCallback)
(ReleaseBacking, ReleaseBuffer, XLGetXdgSurface): Use and free
buffer release helper; run frame callbacks from its callback.
2022-11-04 05:36:10 +00:00

40 lines
1.5 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
PROGRAMS = simple_test damage_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)
DependTarget3($(SRCS1),$(SRCS2),NullParameter)
all:: $(PROGRAMS)