Commit Graph

442 Commits

Author SHA1 Message Date
Daniel Hahler 31e25dc6a5 Cleanup usages/patching of awful.util.deprecate (#1966) 2017-08-10 12:18:54 +02:00
Uli Schlachter 60b5df1308 awful.tag: Apply a default layout to tags (#1952)
Related-to: https://github.com/awesomeWM/awesome/pull/1950
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-29 13:58:45 -04:00
Uli Schlachter d33d7d71d7 tests/examples/CMakeLists.txt: Add a project() call (#1926)
project() automatically sets the PROJECT_NAME variable. Thus, when this
CMake code is run due to being included by awesome, this commit has no
effect.

When this CMake code is run on its own, CMake will no longer check for a
C and C++ compiler.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-17 10:11:52 +02:00
Emmanuel Lepage Vallée bb26c32726 Merge pull request #1901 from actionless/xresources-titlebar-hover-press
feat(beatiful: theme_assets; themes: xresources): recolor titlebar icons for `hover` and `press` states
2017-07-10 10:11:50 -04:00
Daniel Hahler fb18a1d159 tests/run.sh: use temporary RC_FILE again (#1910)
This was changed in ec9a981d for no good reason, and using a temporary
file removes the requirement to restore it on exit.
And it is necessary in case the original file is not writable (e.g. in
case of a read-only Docker mount).
2017-07-09 22:29:51 +02:00
Daniel Hahler 2f105a405f Improve tests/run.sh (#1904)
- add colors
- count test files
- display error summary
- filter out a_dbus_connect warnings and "Test finished successfully." message
- print current step with VERBOSE=1
- kill clients at the end of tests in an extra step
2017-07-09 14:17:35 +02:00
actionless 0488905fcc fix(tests: screen-changes): take in account useless_gap 2017-07-03 01:02:52 +02:00
Daniel Hahler 718d91355d tests: fix test-menubar for when there are no desktop files (#1898) 2017-07-02 23:25:04 +02:00
Emmanuel Lepage Vallée 09bd3ec67a Merge pull request #1872 from Elv13/upstream_dynamic_p8
Import some commits from the stateful layout branch
2017-06-27 03:54:12 -04:00
Uli Schlachter 19fbae7f74 test-menubar.lua: Also skip the test with LuaJIT
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-27 08:58:17 +02:00
Uli Schlachter 914b4b7c8b test-menubar.lua: Filter calls to gears.debug.print_error
A test counts as having failed if it prints any error. However, the
search path can very well contain non-existing directories which are not
a problem. Thus, handle this by monkey-patching gears.debug.print_error.

Ref: https://github.com/awesomeWM/awesome/pull/1872#issuecomment-311224439
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-27 08:54:03 +02:00
Luke Bonham 547c0e4b83 awful.spawn: add easy_async_with_shell and fixed easy_async doc (#1541) 2017-06-26 21:15:58 +02:00
Emmanuel Lepage Vallee 82d1616773 tests: Add tests for the stack layout 2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallee e49e7d6938 shims: Add a missing drawin member 2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallee 458340b4d4 doc: Add examples for the ratio layout 2017-06-26 02:27:20 -04:00
Uli Schlachter c9c02aef67 tests: Disable test-menubar.lua where needed
This test runs into an lgi bug that causes awesome to segfault. Work
around this by just disabling the test where needed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-23 20:24:50 -04:00
Uli Schlachter 941c997314 tests: Add a very basic test for the menubar
This does not actually test anything. It just makes sure that the code
runs. A proper test still seems to need some time and some hacks, but
this basic test is enough to check that the menubar does not cause any
Lua errors.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-23 20:24:44 -04:00
Emmanuel Lepage Vallée ef1d7d8396 Merge pull request #1647 from Elv13/free_layout
Add a manual (free floating) layout
2017-06-12 19:49:30 -04:00
getzze 15d66167f7 tests: Test the calendar widget 2017-06-12 02:58:06 -04:00
Emmanuel Lepage Vallee f2b7765355 tests: Test the `manual` layout. 2017-06-11 01:14:10 -04:00
Emmanuel Lepage Vallee 9e01c92ea2 tests: Minor changes to the wibox template. 2017-06-11 01:14:10 -04:00
Uli Schlachter 3bb8efd2db Re-arrange the magnifier layout on focus changes
Just re-arranging on every focus change would cause useless/needless
re-arranges (which have no effect except to waste CPU time). Thus, this
adds a special (undocumented) flag on layouts that makes sure that a
rearrange occurs when the focus changes.

Fixes: https://github.com/awesomeWM/awesome/issues/1799
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-09 10:13:14 +02:00
Uli Schlachter 0abfed54de example tests: Switch to new API
This makes the templates used by the example tests use the new API added
in the previous commit.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter e90f3ef253 test-maximize.lua: Test all gravities
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 18:24:28 +02:00
Uli Schlachter 3e0eefe3bc Add a test case for some recent bug
This test would have caught
https://github.com/awesomeWM/awesome/issues/1607.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 18:24:28 +02:00
Uli Schlachter 08555a4fed test-maximize: Restore old border width
When the border width changes, we move the client according to its
gravity. This can cause problems with the following code. Fix this by
restoring the original border width again, which undoes the move.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 18:24:28 +02:00
Emmanuel Lepage Vallee 5d944e3c1a tests: Add client self-resizing support to the tests 2017-05-23 22:34:12 +02:00
Emmanuel Lepage Vallee ae7b173c54 tests: Add resizing support to the test client 2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee 710039ed3f tests: Test more maximization corner cases 2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee 0eab45520e tests: Add maximization support to the test client
Both a "before manage" and "later" mode.
2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallée b6e6a04895 Merge pull request #1776 from psychon/emit_property_floating
Always emit property::floating when needed
2017-05-16 13:57:51 -04:00
Uli Schlachter 498510e810 Add a new disposition to _multi_screen.lua
Without the previous commit, this would make test-awful-client.lua fail.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-15 08:15:59 +02:00
Uli Schlachter 2eef92a891 test-maximize: Improve error messages
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-14 10:10:03 +02:00
Emmanuel Lepage Vallee e7232c0dc2 test: Use the test client in test-maximize 2017-05-14 09:56:58 +02:00
Emmanuel Lepage Vallee 2da1900d85 tests: Add gravity to the test client 2017-05-14 09:56:54 +02:00
Uli Schlachter 3ed0be6d85 Add a test for gravity handling (#1760)
This adds a C program which tests if the window manager handles
gravities correctly. This program is loosely based on metacity's
test-gravity.c, but completely rewritten and this version does automatic
tests instead of allowing the user to perform testing by hand.

By having this as a self-contained C program, it is possible to compare
awesome's behaviour with the behaviour of other WMs.

In my testing, only metacity and awesome pass this test. This is not
that much of a big surprise since awesome was fixed in
https://github.com/awesomeWM/awesome/pull/505 to work correctly with
metacity's test-gravity.c. However, I am surprised that e.g. Fluxbox
gets this wrong.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:28:45 +02:00
Uli Schlachter e1bad41fc8 Always emit property::floating when needed
There are some cases where a client's floating state "silently" changes.
For example, a fullscreen client will be considered floating. However,
even though c.floating changes its value in this case, we did not emit
the property::floating signal.

Fix this by explicitly tracking the "implicitly floating" state. When
some property that influences this "implicitly floating" state changes,
we update it and if a client which was not explicitly assigned a
floating state observes a change in this value, property::floating is
emitted.

This was tested by running a terminal and two xeyes in a tag with a
tiling layout where awful.ewmh was patched so that clients do not change
their geometry when fullscreening or maximizing. It was observable that
after this patch e.g. the titlebar and the tasklist update to show the
floating state of the client which became implicitly floating due to
being maximized.

Fixes: https://github.com/awesomeWM/awesome/issues/1662
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-11 16:22:16 +02:00
Uli Schlachter 07d0bcb713 Stabilize awful.tooltip code coverage (#1773)
For a while now we had our code coverage tools tell us that the coverage
for one line of code fluctuated. Sometimes it was being executed and
other times it was not. This is useless noise.

I think what is happening here is that the coverage depends on the order
of iteration over a table. Either the tooltip that is being created was
first made visible and then it text changed, or things happened in the
opposite order.

Fix this by doing this by explicitly changing the tooltip's text while
it is surely visible.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-07 18:00:22 +02:00
Uli Schlachter b3635a0101 Make the output of the gears.object.signal example stable (#1703)
Previously it would print a table which would include the memory
location where the table was stored. Thus, this produces a different
result on every build.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 10:00:34 +02:00
Kevin Zander 74fb39afbd Remove deprecated calls in tests
Change deprecated util.table call in lib/awful/widget/clienticon.lua to gears.table call
2017-03-30 23:07:20 -05:00
Kevin Zander 6cb2e0fa82 Fix some deprecated calls in code and docs
Add missing newline in test runner
2017-03-30 21:26:50 -05:00
Emmanuel Lepage Vallée b81b2149f6 Merge pull request #1679 from psychon/keyboard-layout-changes
Asynchronously update the keyboard state
2017-03-29 13:59:34 -04:00
Uli Schlachter 2f652a1de9 Speed up tests/run.sh on Travis (#1682)
tests/run.sh waits for awesome to exit via tail's "--pid" option. This
makes tail check once per second if the process still exists and if not,
tail will exit. However, the default of "once per second" causes lots of
wasted time for us.

This commit adds the argument "-s 0.1" to tail which makes tail check
once every 0.1 seconds. This commit changes the time that "tests/run.sh"
runs on Travis from about 60 seconds to about 35 seconds, which is a big
improvement.

Closes: https://github.com/awesomeWM/awesome/issues/1374
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-29 18:46:47 +02:00
Uli Schlachter 9f3a6757e9 Asynchronously update the keyboard state
When the keyboard layout is modified via xmodmap, each single "change"
(line of input to xmodmap) causes an "the keyboard configuration
changed"-event to be sent. Awesome reacted to each of these events by
reloading the keyboard layout. Thus, awesome reloaded the keyboard
layout a lot and appeared to freeze.

Fix this by asynchronously update the keyboard state: When such an event
comes in, instead of reloading things immediately, we set a flag which
makes us update the state at the end of the main loop iteration. This
means that many events still cause only a single (or at least few)
re-quering of the layout. Thus, a lot of time is saved.

This commit removes the argument to the (undocumented!) signal
xkb::group_changed. Previously, the argument was the active group
number. Since this argument was unused and I'm lazy, I just removed it.
The alternative would be that it might be visible to Lua that some "the
active group changed"-events are dropped.

Fixes: https://github.com/awesomeWM/awesome/issues/1494
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-28 15:21:01 +02:00
Kevin Zander 45dadde0dd Move filesystem functions out of awful.util into new gears.filesystem
Update awful.util filesystem function calls to gears.filesystem function calls
Rename getdir to get_dir for consistency
2017-03-15 13:46:33 -05:00
Kevin Zander c3461b535c gears: Move awful.util.table to gears.table (#1641)
* Move table functions out of awful.util into new gears.table

* travis: Use v9999 prefix for full requests

Make sure no newly deprecated functions are used

* Move all `awful.util.table.*` calls to `gears.table.*` calls
Move table test functions from awful/util_spec to new gears/table_spec
Change awful.util.subsets call to gears.math.subsets in awful/key.lua
2017-03-08 15:18:33 -05:00
Emmanuel Lepage Vallée 8f6e80f5c6 Merge pull request #1640 from psychon/add_to_wibox_lists
Add some non-helpful examples
2017-03-07 18:45:29 -05:00
Uli Schlachter 93b53bcf3f Add some non-helpful examples
This makes the scroll and only_on_screen widgets appear in the widget
lists. The examples are not really helpful, but Elv13 told me to add
them. Also, only_on_screen is in awful.widget, but now something in
tests/examples/wibox/container refers to it...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-07 11:32:17 +01:00
Uli Schlachter 6f803cf3b3 Fix code using awful.util.round
This gets rid of lots of deprecation warnings

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-06 17:11:05 +01:00
getzze bf2d658380 Add tests for grid layout
Update tests

Update tests

Separate spacing and padding tests

Update tests amd add imperative usage

Change fixed_size to homogeneous property

Update tests
2017-03-04 20:57:33 -05:00
Emmanuel Lepage Vallée 971adec0d0 Merge pull request #1622 from Veratil/fix-new-luacheck
Fix Luacheck 0.19.0 release Travis breaks
2017-03-04 13:32:53 -05:00
Daniel Hahler 0bd29ae1e9 Merge pull request #1580 from psychon/only_on_screen
Add a only_on_screen container widget
2017-03-04 04:06:21 +01:00
Kevin Zander 3f6df8ddee Fix Luacheck 0.19.0 release Travis breaks 2017-03-03 16:41:12 -06:00
Uli Schlachter 2b2612314c Add a only_on_screen container widget
Fixes: https://github.com/awesomeWM/awesome/issues/1565
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-03 13:25:28 +01:00
Kevin Zander 7f6763fb00 Add awesome.version to globals for tests. Will always show util.deprecate output 2017-03-02 18:15:59 -06:00
morethanoneanimal 1c71260389 Replace improperly used asserts with warnings.
Add awful.spawn noop function to hooks.lua test. Previously it was nil.
2017-02-21 00:31:33 +01:00
Emmanuel Lepage Vallee e221f8414c tests: Validate wibar geometry in the struts test
Prevent #1523 from regressing
2017-02-13 22:41:25 -05:00
Emmanuel Lepage Vallee 4a4864bb75 doc: Add another declarative syntax example
Better show the composite/encapsulated widgets
2017-02-12 22:19:08 +01:00
Emmanuel Lepage Vallee f448a604b7 cmake: Add a --DOC_NO_DASH option to the doc examples framework
This way it can be used in documentation pages.
2017-02-12 22:19:08 +01:00
Emmanuel Lepage Vallee 7753d830c1 tests: Test the place container. 2017-02-11 16:10:13 -05:00
Emmanuel Lepage Vallée fe4d6404a6 Merge pull request #1376 from Elv13/disable_wibox_in_tests
tests: Add a very dirty hack to break wibox for multiscreen tests
2017-02-07 11:38:33 -05:00
Emmanuel Lepage Vallee 83e176fa32 tests: Break wibox for multiscreen tests (on purpose)
This commit add an option to shim the whole wibox module when
running multi-screen tests. This is intended to lower the test
runtime when coverage is enabled.

In theory, most of that code is already covered by the
test-screen-changes suit.

This makes the coverage builds about twice as fast. This is
necessary because there is a large number of timeouts due to
limited resources on the Travis build system.
2017-02-07 11:37:07 -05:00
Emmanuel Lepage Vallee 631e75a757 ewmh: Use the request:: API in the border_width / wa callback
And stop listening to property::geometry, it's no longer needed.

This also remove messing up the border without saving it
somewhere. The concept is sound, but not the implementation.
2017-02-07 11:13:15 -05:00
Emmanuel Lepage Vallee 3ca363115d tests: Add tests for #1321 2017-02-07 11:12:40 -05:00
Daniel Hahler 52170f575f test-current-desktop: make wait_for_current_desktop fail directly (#1516)
We should get the expected state before already.

Ref: https://github.com/awesomeWM/awesome/issues/1495#issuecomment-277098634
2017-02-06 19:55:08 +01:00
actionless 3cc613fa20 test(awful: hotkeys_popup): add a minimal test 2017-02-05 21:32:43 +01:00
copycat-killer 1a5f6b7ad2 client: Allow clients to have shapes
Also fixes awful.client.shape docs

Closes #1507
2017-02-03 17:48:28 -05:00
Daniel Hahler d005640f92 test-current-desktop: add extra step when killing a client
Ref: https://github.com/awesomeWM/awesome/issues/1495#issuecomment-277098634
2017-02-02 23:02:54 +01:00
Uli Schlachter d494b87fb7 tests/_client.lua: Improve error with Gtk 2 (#1506)
In Gtk 2, the "first" argument to set_geometry_hints() is not optional.
However, this code does not provide any argument here. Improve the error
message in this case by checking for Gtk 3.

Reference: https://github.com/awesomeWM/awesome/issues/1495
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-02-02 22:30:04 +01:00
actionless 79a60b3009 fix(awful: key): clone table with user data
closes #1401

fix(tests: awesomerc): use `awful.key.execute` instead of local helper function
2017-01-30 18:19:24 +01:00
Emmanuel Lepage Vallee 1a7c816182 doc: Fix the progressbar examples indentation
Correctly, this time
2017-01-27 19:28:46 -05:00
Emmanuel Lepage Vallée 5a914b3496 Merge pull request #1198 from psychon/wibox-shape
Wibox: Add gears.shape support
2017-01-26 05:30:42 -05:00
SammysHP 37f0b7e3bf prompt: Make awful.widget.prompt themeable
Adds new optional properties to the theme:
    prompt_fg
    prompt_bg
    prompt_fg_cursor
    prompt_bg_cursor
    prompt_font
2017-01-23 13:15:09 +01:00
Emmanuel Lepage Vallee a6161d1229 tests: Test the prompt highligher 2017-01-22 01:14:20 -05:00
Emmanuel Lepage Vallee 928f7b04b4 prompt: Add a key filter example 2017-01-20 01:09:30 -05:00
Emmanuel Lepage Vallee f6cce940a5 prompt: Add a Vi like prompt parser
Otherwise hooks that modify the command are not documented well
enough.
2017-01-20 01:09:29 -05:00
Emmanuel Lepage Vallee 4934697817 prompt: Add a more complete hook example 2017-01-20 01:09:29 -05:00
Emmanuel Lepage Vallee 53d32d362a prompt: Unit test the example 2017-01-20 01:09:29 -05:00
Emmanuel Lepage Vallee e8f82c332a shims: Add basic shims for the key and mouse grabbers 2017-01-20 00:22:49 -05:00
Emmanuel Lepage Vallee 5e1d2ce0ad shims: Add the string.wlen function 2017-01-20 00:22:49 -05:00
Yauhen Kirylau 316734a681 move `theme_assets` from xresources theme to `beautiful` module. (#1219) 2017-01-14 04:09:54 +01:00
Daniel Hahler 162685bf30 Merge pull request #1367 from psychon/resizes
Fix some possible errors with resizes.

Fixes https://github.com/awesomeWM/awesome/issues/1368.
2017-01-08 23:42:52 +01:00
Daniel Hahler ec9a981dd7 tests: move coverage setup into tests/run.sh
This allows for `DO_COVERAGE=1 make check` with local tests (where
`CI=true` is not given).
It uses the new environment variables to configure the default theme,
instead of creating a temporary config/theme.
2017-01-08 20:34:13 +01:00
Daniel Hahler eacc49243b tests/examples/CMakeLists.txt: invoke luacov with `lua` directly 2017-01-08 20:34:13 +01:00
Daniel Hahler 6aee6c2053 ci: overhaul coverage processing
- Execute the tests without compiling, and don't mess with the source
   files when coverage is enabled.
   This ensures that the coverage report lines are correct.
   This disables the doc tests, as their results would be unused.
   Hack: it still expands macros on util.lua, because of
   `util.get_themes_dir()` and `util.get_awesome_icon_dir()`, which might
   be moved later.  Ref:
   https://github.com/awesomeWM/awesome/pull/1239#discussion_r93828178.
 - ensure that BUILD_APIDOC and DO_COVERAGE are not used together
 - awesomeConfig.cmake: add DO_COVERAGE as an option
 - Travis: only install codecov with DO_COVERAGE=codecov
 - Travis: do not use set -v; use set -x with DO_COVERAGE
 - do not use trailing slashes with dirs in tests/examples/CMakeLists.txt / .luacov
 - Use latest luacov (0.12.0-1) again
   This reverts parts of 4cc6a815.
   I think it is better to fix any failure that 4cc6a815 tried to work around.
 - Travis: simplify/fix require('luacov') for functionaltests
 - tests/examples/CMakeLists.txt: resolve ../.. in SOURCE_DIR
 - tests/examples/CMakeLists.txt: add DO_COVERAGE to env
 - Cleanup/simplify .luacov: work with SOURCE_DIRECTORY alone
 - tests/run.sh: pass through / set SOURCE_DIRECTORY when running awesome
 - tests/run.sh: resolve source_dir
 - use DO_COVERAGE from env only
2017-01-08 20:34:13 +01:00
Uli Schlachter e659b80f36 Refuse attempts to resize clients to invalid size
X11 does not allow to resize a window to size 0x0. Also, there are some
possibilities of integer overflows in our case. We tried to handle this
already, but there was a loop-hole: If the too-small-value is only
produced after applying size hints, then this was not caught.

Fix this by applying size hints before checking if the resulting size is
valid. However, this means some check needs to be duplicated to handle
the possibility of integer underflows while applying size hints.

Helps-with: https://github.com/awesomeWM/awesome/issues/1340
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-08 15:35:56 +01:00
Uli Schlachter f8b735fa24 test client: Add support for setting some size hints
This adds a new argument to the test client spawning function that will
make the test client window set a resize increment property.

The API here is starting to a bit ugly, but since this is not any user
facing API, that should not be a problem.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-08 15:35:56 +01:00
Emmanuel Lepage Vallee 6158091422 doc: Partially revert the indentation changes
This messes up the doc
2017-01-03 00:12:28 -05:00
Emmanuel Lepage Vallee 767cda5830 doc: Fix some example tests indentation
When `DOC_NO_USAGE` is set, the examples need 4 spaces as per the
markdown spec.
2017-01-03 00:10:18 -05:00
Emmanuel Lepage Vallee ad203232c4 cmake: Add an extra space to the @usage code
Otherwise commented lines look like ---- My comment
instead of -- -- My comment. This wasn't a problem before the
intentation fix commit, but it is now.
2017-01-03 00:07:57 -05:00
Daniel Hahler 9d69825766 Merge pull request #1345 from psychon/test-runner-speed2
Test runner speedup
2017-01-03 02:13:44 +01:00
Daniel Hahler 4b9e8e232d Merge pull request #1341 from psychon/modeline
Lots of fun with vim modelines
2017-01-02 19:56:06 +01:00
Uli Schlachter f7025e2f73 Fix tests/run.sh
Commit a944636c02 "bashified" tests/run.sh for some reason.
Afterwards, commit 4abd820051 fixed some of the fall-out.
However, there is still a problem left.

We have "set -e" in this script. Thus, whenever some command exits with
status 0, the script abort. When the variable errors is zero/unset, the
command "((errors++))" has exit status zero. Thus, this instruction
caused the shell script to abort. This was not intended.

Fix this by using "((++errors))" instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:35:13 +01:00
Uli Schlachter 6534208f62 tests/_runner.lua: Use less waiting
Before this, the test runner used a timer which fired every 0.1 seconds
to "do its thing". Many of these waits seem unnecessary.

This commit makes the test runner wait 0 seconds for the first call of a
step function. Only following calls will have a timeout of 0.1 seconds
applied.

A full run of the test suite (tests/run.sh without further arguments)
took about 100 seconds before this change. After this change, we are
down to 60 seconds. This is almost factor two faster! (Well, five thirds
is the exact number, so factor 1.66)

(The numbers are best out of three runs. The "before" number is rounded
down while the "after" number is rounded up.)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter edff48f133 test-awful-client.lua: Fix indentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter a1b5782e90 test-awful-client.lua: Wait for c:kill() to be done
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter 30912c6f24 test-geometry: Wait for c:kill() to be done
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter 0d8106c6dd test-leak-client.lua: Wait for c:kill() to be done
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter 0dff0c308a test-geometry.lua: Fix indentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter 5bbe6747fc tests: Add calls to awesome.sync() where needed
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00