12to11/tests
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
..
basic_damage.png Check in new test related files 2022-11-04 05:26:16 +00:00
basic_test_card.png Check in tests 2022-11-04 02:41:19 +00:00
blue.png Check in tests 2022-11-04 02:41:19 +00:00
damage_test.c Check in new test related files 2022-11-04 05:26:16 +00:00
damage_test_1.dump Check in new test related files 2022-11-04 05:26:16 +00:00
damage_test_2.dump Check in new test related files 2022-11-04 05:26:16 +00:00
Imakefile Add new damage test and unify buffer release code in xdg_surface 2022-11-04 05:36:10 +00:00
README Add new damage test and unify buffer release code in xdg_surface 2022-11-04 05:36:10 +00:00
run_tests.sh Check in new test related files 2022-11-04 05:26:16 +00:00
simple_test.c Add new damage test and unify buffer release code in xdg_surface 2022-11-04 05:36:10 +00:00
simple_test.dump Check in tests 2022-11-04 02:41:19 +00:00
svnignore.txt Add new damage test and unify buffer release code in xdg_surface 2022-11-04 05:36:10 +00:00
test_harness.c Add new damage test and unify buffer release code in xdg_surface 2022-11-04 05:36:10 +00:00
test_harness.h Add new damage test and unify buffer release code in xdg_surface 2022-11-04 05:36:10 +00:00

This directory holds some work-in-progress code for testing the
protocol translator.  The current test suite is nowhere near
comprehensive.

Each test must be individually run on a system with an a8r8g8b8
visual, GLOBAL_SCALE and OUTPUT_SCALE set to 1.  They also rely on
reference data; if some legitimate changes are made that affect test
results, then the tests should be run with TEST_WRITE_REFERENCE=1,
which will make the test binaries write out reference data to disk.

When tests are being run, the tester must be very careful to not
interfere with the test operation by moving or resizing the test
window.  A compositing manager should be running along with the test.

Most likely, you do not want to run these tests manually, as the
`run_tests.sh' script does all the setup for you.