cairo/test/run-cairo-test-suite.sh
Chris Wilson b49c944fe4 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.
2010-06-11 12:38:17 +01:00

18 lines
359 B
Bash
Executable file

#!/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