Commit Graph

15 Commits

Author SHA1 Message Date
Uli Schlachter 0688e8899e tests/run.sh: Allow execution without installing
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>
2015-08-12 09:49:08 +02:00
Uli Schlachter d8a1b563e7 tests/run.sh: Use a temporary directory
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-08-12 09:48:28 +02:00
Uli Schlachter 41d81a4501 tests/run.sh: Move definition of AWESOME_CLIENT up
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-08-12 09:48:27 +02:00
Uli Schlachter 6d4837a53a tests/run.sh: Start dbus after X server startup
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>
2015-08-12 09:48:27 +02:00
Daniel Hahler 85facc0391 tests/run: handle 'expr 1 - 1' (exitcode 1); check for running awesome 2015-08-11 19:08:35 +02:00
Daniel Hahler 2b224dd954 tests: use root.fake_input instead of xdotool
Ref: https://github.com/awesomeWM/awesome/issues/328.
Closes: https://github.com/awesomeWM/awesome/pull/391.
2015-08-10 23:04:19 +02:00
Daniel Hahler 22624284a2 tests/_runner.lua: use xpcall+traceback with step error handler 2015-07-22 13:52:47 +02:00
Daniel Hahler f070c4e060 tests: wait until DISPLAY is ready; xrdb might complain/abort 2015-07-21 13:09:07 +02:00
Daniel Hahler 2c3c6b5ca8 tests: cleanup, remove sleep/print 2015-07-18 15:08:27 +02:00
Uli Schlachter f4ed41b39a tests: Check if test file is readable before running it
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>
2015-07-18 12:35:57 +02:00
Uli Schlachter f2a079204d tests: Make dbus session automatically exit when X server dies
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-18 10:45:03 +02:00
Uli Schlachter 534084698b tests/run.sh: Use $! instead of pgrep
And yes, $! is specified by POSIX and thus should be portable.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-18 10:44:16 +02:00
Daniel Hahler 430fe7f710 tests/run.sh: fix 'waiting for awesome' via pgrep 2015-07-16 17:05:46 +02:00
Daniel Hahler 1e9da0947e Improve tests/run.sh
- `set -x` only for Travis/CI=true.
 - improve waiting for PID and awesome-client success.
 - kill childs via trap always.

Closes https://github.com/awesomeWM/awesome/pull/316.
2015-07-15 01:30:06 +02:00
Daniel Hahler 611438a892 Add functional tests via Xephyr/Xvfb/xdotool
Closes https://github.com/awesomeWM/awesome/pull/133
2015-07-10 15:19:51 +02:00