tests/run.sh: Use dbus-send directly with low timeouts (#1116)

run.sh waits for awesome's startup to be done by having awesome execute "return
1" via its dbus interface. However, by default dbus has a 25 second timeout
before it fails a dbus-send invocation. This defeats the purpose of this
exercise.

So instead of using awesome-client, this commit makes the code use dbus-send
directly and specifies a relative low reply timeout (which should still be
plenty so that this doesn't erroneously fail).

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-09-25 20:28:27 +02:00 committed by Daniel Hahler
parent 8dc98e8c51
commit cea5d41518
1 changed files with 2 additions and 1 deletions

View File

@ -188,7 +188,8 @@ start_awesome() {
cd - >/dev/null
# Wait until the interface for awesome-client is ready (D-Bus interface).
wait_until_success "wait for awesome startup via awesome-client" "DISPLAY=$D '$AWESOME_CLIENT' 'return 1' 2>&1"
# Do this with dbus-send so that we can specify a low --reply-timeout
wait_until_success "wait for awesome startup via awesome-client" "dbus-send --reply-timeout=100 --dest=org.naquadah.awesome.awful --print-reply / org.naquadah.awesome.awful.Remote.Eval 'string:return 1' 2>&1"
}
# Count errors.