1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/bash
# Runs tests for console and X11.
set -xeuo pipefail
# Enable verbose logging.
export COPYQ_LOG_LEVEL=DEBUG
export QT_LOGGING_RULES="*.debug=true;qt.*.debug=false;qt.*.warning=true"
# Test command line arguments that don't need GUI.
DISPLAY="" ./copyq --help
DISPLAY="" ./copyq --version
DISPLAY="" ./copyq --info
# Start X11 and window manager.
export DISPLAY=':99.0'
Xvfb :99 -screen 0 1280x960x24 &
sleep 5
openbox &
sleep 8
# Smoke test the default session
./copyq --start-server exit
# Test handling Unix signals.
"$(dirname "$0")/test-signals.sh"
# Test global shortcuts on X11.
"$(dirname "$0")/test-linux-global-shortcuts.sh"
# Run tests.
export COPYQ_TESTS_RERUN_FAILED=1
./copyq tests "$@"
|