The timeout utility guarantees an exit code of 124 when the process died due to
timeout. Since awesome only ever exits with 0 or 1, we can use this to reliably
detect timeouts and print a matching message.
Signed-off-by: Uli Schlachter <psychon@znc.in>
coreutils provides a timeout command. Use that instead of (badly) inventing our
own version of it. This "timeout" command seems to be new. Let's hope everyone
has it and think about alternative solutions only when needed.
Fixes: https://github.com/awesomeWM/awesome/issues/1075
Signed-off-by: Uli Schlachter <psychon@znc.in>
When awesome exits with a non-zero code, this is something interesting that we
should log. Do so.
The "set +e" / "set -e" dance is required so that we do not abort because the
wait builtin returns a non-zero code.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This script runs under "set -e", so any command exiting with a non-zero status
makes it abort. However, we do not care about failures from grep to find
anything, so handle that case gracefully.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The "test launching client on a specific screen" suit is very slow.
However, it is also necessary to avoid issues such as #1069 or #154
from regressing again.
This is a temporary fix until a faster test client "daemon" is
developped.
This uses the new support introduced in f0f31bc305 in the docs and in
tests/run.sh, removing an useless use of cat/echo.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Currently, tests/run.sh expects the directory layout that our wrapper Makefile
sets up before running CMake. This commit adds support for any other directory
configuration as well.
Signed-off-by: Uli Schlachter <psychon@znc.in>
GDK_SCALE=1 is needed to overwrite other settings that people might have which
would make geometry-related tests fail.
NO_AT_BRIDGE=1 gets rid of the following message that I am seeing:
** (lua:8321): WARNING **: Error retrieving accessibility bus address:
org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not
provided by any .service files
Signed-off-by: Uli Schlachter <psychon@znc.in>
Currently, an error in the default config in the right place isn't noticed. Fix
this by doing two things:
- Also grep for "error" (this catches runtime errors with a stack trace)
- Make _runner print a "success" message at the end and also grep for that
Fixes: https://github.com/awesomeWM/awesome/issues/689
Signed-off-by: Uli Schlachter <psychon@znc.in>
While setting up an environment to run the integration tests in, the run.sh
script uses sed to generate versions of several files that refer to the
not-installed version of files. One of these needs to replace the call to
beautiful.init().
Before commit 20c9723c5b, the corresponding line was:
beautiful.init("@AWESOME_THEMES_PATH@/default/theme.lua")
Now this wants to find and replace the following:
beautiful.init(awful.util.get_themes_dir() .. "default/theme.lua")
To handle both versions, this commit adds some wildcards to the sed-expression
so that any line containing a call to beautiful.init is found and replaced.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When using Xephyr, this already starts the server with -noreset, but for Xvfb we
also need this flag. Without this flag, the DPI value that is set via xrdb gets
lost at server reset.
This wasn't a problem before commit 6d4837a53a. That commit moved the launch
of the dbus session after the setting of the DPI. So previously, waiting for
server startup was half broken (the dbus session already tried to connect to the
server to check for when it shuts down), but due to this no server reset
occurred and thus the DPI was correctly applied. After this commit, the server
immediately resets after xrdb is done setting the DPI and the value set is lost.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This factors out a function wait_until_success that runs some command until it
succeeds (with a timeout) and uses this function in the two places where this
was already done before.
Note that this removes the "kill -0" trick for early exit again and instead will
use the timeout in case awesome dies during startup.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When this script is not run under Travis, it will prepare a temporary config
file and a theme file that point to the files that were not yet installed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The code does some dances with xrdb to ensure that the server finished starting
up. However, before this it already tries to access the server via dbus-launch.
Since nothing uses dbus in this part of the code, we can just move this down.
Signed-off-by: Uli Schlachter <psychon@znc.in>
I tried calling this script with "tests/foo.lua" as an argument, but it actually
expects "foo.lua" since it changes into the appropriate directory itself.
Because this file does not exist, "cat $f | awesome-client" failed and thus this
whole script just hung (the test runner was never actually started).
Fix this by testing for the test-file to exist before trying to run it.
Signed-off-by: Uli Schlachter <psychon@znc.in>