forked from 12to11/12to11

* 12to11-test.xml (test_manager): <error>: Add `invalid_button', `value_exists', `bad_seat_version' and `invalid_valuator'. (test_manager): <get_test_seat>: New request. (test_XIButtonState, test_XIModifierState, test_XIValuatorState) (test_seat_controller): New interfaces. * Imakefile: (seat.o): Depend on test_seat.c. * compositor.h: Update prototypes. * run.c (XLRunCompositor): Get rid of stdbool constant. * seat.c (HandleBind1): Move binding logic to this new function. (HandleBind): Call HandleBind1. (InitSeatCommon): Add list initialization to this function. (MakeSeatForDevicePair): Call InitSeatCommon instead. (HandleRawKey, UpdateModifiersForSeats, DispatchFocusIn) (DispatchMotion, DispatchBarrierHit, DispatchGesturePinch) (DispatchGestureSwipe): Do not update user time from send_event events. Include test_seat.c. * test.c (GetTestSeat): New function. (test_manager_impl): Add new proc function. (XLLookUpTestSurface): New function. * tests/Imakefile (OBJS8, SRCS8): New program. (PROGRAMS): Add seat_test. (seat_test): New function. * tests/run_tests.sh (standard_tests): Add seat_test. * tests/svnignore.txt: Add seat_test. * tests/test_harness.c (report_test_internal_error, test_init_seat): New functions. * tests/test_harness.h (struct test_seat): New struct. (struct test_display): New field `seat'.
48 lines
1.4 KiB
Bash
Executable file
48 lines
1.4 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
|
|
)
|
|
|
|
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
|
|
|
|
popd
|