mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 04:40:07 +01:00
test: Add a convenience script to disable the screensaver when testing
If the screensaver activates, it can cause failures when attempting to render into an xlib window, so inhibit if we know how.
This commit is contained in:
parent
4e4724d48c
commit
b49c944fe4
2 changed files with 19 additions and 1 deletions
|
|
@ -126,7 +126,7 @@ cairo_test_trace_DEPENDENCIES = \
|
|||
endif
|
||||
|
||||
BUILT_SOURCES += cairo-test-constructors.c
|
||||
EXTRA_DIST += $(BUILT_SOURCES) $(noinst_SCRIPTS) COPYING make-cairo-test-constructors.sh
|
||||
EXTRA_DIST += $(BUILT_SOURCES) $(noinst_SCRIPTS) COPYING make-cairo-test-constructors.sh run-cairo-test-suite.sh
|
||||
CLEANFILES += $(BUILT_SOURCES)
|
||||
|
||||
# All tests which have a reference image go here.
|
||||
|
|
|
|||
18
test/run-cairo-test-suite.sh
Executable file
18
test/run-cairo-test-suite.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -m
|
||||
|
||||
if `which gnome-screensaver-command`; then
|
||||
gnome-screensaver-command -i -n "cairo-test-suite" -r "Cairo needs to read back from the screen in order to test rendering to xlib" &
|
||||
pid=$!
|
||||
|
||||
restore_screensaver() { kill $pid; }
|
||||
else
|
||||
restore_screensaver() { :; }
|
||||
fi
|
||||
|
||||
trap cleanup SIGINT SIGTERM
|
||||
|
||||
./cairo-test-suite "$*"
|
||||
|
||||
restore_screensaver
|
||||
Loading…
Add table
Reference in a new issue