forked from 12to11/12to11

* 12to11-test.xml (test_manager) <error>: Add invalid_user_time. <get_serial, serial> New request and event. (test_seat_controller) <set_last_user_time>: New request. * compositor.h (struct _TextInputFuncs): Make `filter_input' return keycode. * data_device.c (DestroyReference): Check if reference device is detached before unlinking reference. * seat.c (LookupKeysym): Delete function. (DispatchKey): Use keycodes instead. (XLSeatExplicitlyGrabSurface): Avoid using owner-events keyboard grab. * select.c (struct _SelectionOwnerInfo, HandleSelectionRequest): Allow CurrentTime in selection requests. Compensate for wraparound as well. (OwnSelection, DisownSelection): Use Timestamp instead of Time. * test.c (GetSerial): New function. (test_manager_impl): Add new function. * test_seat.c (SetLastUserTime): New function. (seat_controller_impl): Add new function. * tests/Imakefile (LOCAL_LIBRARIES): Remove GBM and DRM. (SRCS10, OBJS10, SRCS11, OBJS11): New variables. (dmabuf_test): Only link this program with GBM and DRM. (PROGRAMS): Add select_test, select_helper. (select_test, select_helper): New programs. * tests/README: Document that select_test needs to be run under vfb. * tests/run_tests.sh: Add TODO note. * tests/svnignore.txt: Add select_test and select_helper. * tests/test_harness.c (handle_test_manager_serial): New function. (test_manager_listener): Add new function. (open_test_display): Clear display->seat. (test_get_serial): New function. * tests/test_harness.h (struct test_display): New function `serial'. * text_input.c (CreateIC): Improve debugging code. (CalculateKeycodeForEvent): Move earlier. (FilterInputCallback): Handle keycodes here as well. (XLTextInputDispatchCoreEvent): Add more debugging code. * xdata.c (SelectSelectionInput): Obtain server time here. (XLOwnDragSelection, NoteLocalSelectionFooter): Convert times to Timestamp.
50 lines
1.5 KiB
Bash
Executable file
50 lines
1.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Tests for the Wayland compositor running on top of an X serer.
|
|
|
|
# Copyright (C) 2022 to various contributors.
|
|
|
|
# This file is part of 12to11.
|
|
|
|
# 12to11 is free software: you can redistribute it and/or modify it
|
|
# under the terms of the GNU General Public License as published by the
|
|
# Free Software Foundation, either version 3 of the License, or (at your
|
|
# option) any later version.
|
|
|
|
# 12to11 is distributed in the hope that it will be useful, but WITHOUT
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
# for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with 12to11. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
pushd "$(dirname $0)"
|
|
declare -a standard_tests=(
|
|
simple_test damage_test transform_test viewporter_test
|
|
subsurface_test scale_test seat_test dmabuf_test
|
|
)
|
|
|
|
make -C . "${standard_tests[@]}"
|
|
|
|
export GLOBAL_SCALE=1
|
|
export OUTPUT_SCALE=1
|
|
exec 3< <(stdbuf -oL ../12to11 -printsocket)
|
|
read -u 3 WAYLAND_DISPLAY
|
|
export WAYLAND_DISPLAY
|
|
|
|
echo "Compositor started at ${WAYLAND_DISPLAY}"
|
|
|
|
for test_executable in "${standard_tests[@]}"
|
|
do
|
|
echo "Running test ${test_executable}"
|
|
|
|
if ./${test_executable}; then
|
|
echo "${test_executable} completed successfully"
|
|
else
|
|
echo "${test_executable} failed; see its output for more details"
|
|
fi
|
|
done
|
|
|
|
# TODO: figure out how to run some tests under Xvfb.
|
|
|
|
popd
|