Commit Graph

530 Commits

Author SHA1 Message Date
Daniel Hahler 909ef8f532
Merge pull request #2667 from psychon/test_runner_timeout
tests/_runner: Don't lower timeouts for later steps
2019-02-19 20:44:55 +01:00
mergify[bot] 5908d9e108
Merge pull request #2683 from psychon/naughty_test_gio_dbus2
test-naughty-legacy: Use GDBus instead of spawning dbus-send
2019-02-19 18:47:07 +00:00
Uli Schlachter 828ce1471e test-naughty-legacy: Use GDBus instead of spawning dbus-send
This is inspired to be a correctness fix: The "hints" argument to
notifications is supposed to have type a{sv}, i.e. this maps from string
keys to some generic value. dbus-send does not support this and instead
it sends an argument of type a{ss}, i.e. a mapping from string to
string. This commit fixes this problem and uses the correct type.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-19 18:35:09 +01:00
Daniel Hahler ddf422dd0d
cmake: fix generate-examples/check-examples (#2545) 2019-02-19 00:15:19 +01:00
Uli Schlachter d1f15f9839 tests/_runner: Don't lower timeouts for later steps
The first step of a test is called 20 times before a failure is
diagnosed. Later steps only get five calls to finish. I guess the idea
is that the first step sets everything up and opens all necessary
clients, while later steps then do something with these clients.

However, looking at our existing tests, they are not structured like
that. Later steps open more clients etc.

Since this limit has no negative impact on the run-time of tests, but
only means that failures are detected later, let's just remove this
limit of five calls.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-18 08:51:10 +01:00
mergify[bot] e7a67d300e
Merge pull request #2664 from psychon/naughty_test_print_warning
Some changes to the new naughty test
2019-02-18 01:33:14 +00:00
mergify[bot] fd38e2fb5c
Merge pull request #2658 from psychon/delayed_call_run_now
Add and use gears.timer.run_delayed_calls_now()
2019-02-17 19:25:04 +00:00
Uli Schlachter a54eb67de0 naughty test: Use array-style spawn() calls
When a string is spawned, the C code has to split this into an array for
the execve() syscall. When an array is given directly, this array does
not need to be transformed in any way. This makes it much more clear
what is actually started.

This commit removes some quotation marks that were previously removed by
the C code. For example,

    array:string:1,"four",2,"five",3,"six"

became

    array:string:1,four,2,five,3,six

because otherwise the action was called "four" instead of four and the
test failed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-17 10:30:31 +01:00
Uli Schlachter 083462e0c1 naughty test: Warn about missing dependencies
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-17 10:21:18 +01:00
Emmanuel Lepage Vallee 1b4c1e9f1c tests: Test the naughty deprecated APIs 2019-02-16 15:49:39 -05:00
Emmanuel Lepage Vallee db591b50a4 tests: Add extensive tests for the existing notification features.
This new test suit add a rather extensive coverage to the "legacy"
notification popups. A few minor bugs have been found and fixed
and we can rest assured that the new spec 1.2 support and extended
manipulation API wont regress existing configs.
2019-02-16 15:49:39 -05:00
Emmanuel Lepage Vallee 1b567cc06a notification: Rename text to message
There is many "text" and the default text is the title, not the body.
2019-02-16 15:26:38 -05:00
Emmanuel Lepage Vallee 9df77e5c76 naughty: Move the notification object into its own file.
Mostly for the documentation, but also as the new base upon which
to build the modular notification GUI.
2019-02-16 15:25:10 -05:00
Uli Schlachter 8fdc89ff09 Add and use gears.timer.run_delayed_calls_now()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-15 17:04:19 +01:00
mergify[bot] ec47abb4bc
Merge pull request #2639 from psychon/selection_get
Add selection getter objects
2019-02-11 04:00:59 +00:00
Uli Schlachter 4c82199d19 selection_getter: Convert to use a table as argument
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-10 09:49:11 +01:00
Uli Schlachter cc73c39a60 Add a test case for the selection getter
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-07 17:59:36 +01:00
Uli Schlachter 75e67e1d33 Fix Luacheck warnings
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-06 14:31:57 +01:00
Uli Schlachter 83ffc2b0ce Add a test case for the selection watcher
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-06 14:31:57 +01:00
Uli Schlachter b5abd53cbf Use reproducible timestamps in more doc examples (#2626)
This adds require("_date") to some example tests that use the current
date via os.date. This allows reproducibility by replacing os.date()
with a function that uses a static date from $SOURCE_DATE_EPOCH. See
commit 9d7eaf0 for more details.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-01-29 19:36:40 +01:00
mergify[bot] cdd6e360f5
Merge pull request #2609 from psychon/shape_outside
Change the way the shape is done in the background container
2019-01-29 18:21:24 +00:00
Uli Schlachter 84eb175ccd background container: Deprecate shape_clip property
The previous commit removed the implementation of this property.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-01-28 14:55:53 +01:00
Emmanuel Lepage Vallee 4524a7880d tests: Test the layoutlist 2019-01-26 01:34:59 -05:00
Emmanuel Lepage Vallée 7e7733c6d1
Merge pull request #2521 from Elv13/modifiers
awesome: Add a `modifiers` field.
2019-01-24 23:59:54 -05:00
Emmanuel Lepage Vallee 6c1f9ec651 tests: Test the awful.popup 2019-01-24 10:58:45 -05:00
Emmanuel Lepage Vallee 94937595c2 doc: Use the modifier name instead of the keysym for the alttab example 2019-01-21 03:14:26 -05:00
Emmanuel Lepage Vallee b466db955f shims: Add awesome._modifiers 2019-01-21 03:13:26 -05:00
Emmanuel Lepage Vallee 5ab547fbfd tests: Test the awesome.modifiers 2019-01-21 01:08:48 -05:00
Daniel Hahler d2fd15cf99
cmake: pass DO_COVERAGE=1 in env for tests/run.sh (#2575)
`$DO_COVERAGE` is used in tests/run.sh, and should be set with the
`DO_COVERAGE` CMake option.
2019-01-11 17:04:23 +01:00
Daniel Hahler 5dbb5b4992 tests/run.sh: fix handling of test args
Fixes `tests/run.sh tests/test-signal.lua`.
2019-01-03 13:54:37 +01:00
Emmanuel Lepage Vallee 89867386c5 tests: Add images to the tooltip documentation
It also add some properties such as `border_width`, `border_color`
and `preferred_alignments`.

It also fix a documentation bug where the `margin_topleft` was called
`margins_topleft`. To conform to the documentation, both are now valid
but one should be removed the next time the API changes.

Fixes #1978
2018-12-24 21:52:30 -05:00
Emmanuel Lepage Vallee d8a7782bf4 tests: Add an awful.placement.next_to test
It was overdue
2018-12-24 21:52:30 -05:00
Emmanuel Lepage Vallee c3302c4bbe tests: Improve the awful example template
* Support async operations
 * Support `awful.popup`
 * Support minimized clients
2018-12-24 21:49:52 -05:00
Emmanuel Lepage Vallee 90342b62c6 shims: Make sure the wibox boolean properties are set
Also make some changes to support tooltips.
2018-12-24 21:49:52 -05:00
Sergey Vlasov d17433f6c9 tests: Add test for Motif titlebar hints
Test the c.requests_no_titlebar and titlebars_enabled=function...
features.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2018-11-12 11:48:59 +03:00
Emmanuel Lepage Vallée 2458f127f3
Merge pull request #2360 from Elv13/add_awful_tag_layouts
awful.tag: Add awful tag layouts
2018-10-22 14:40:16 -04:00
Emmanuel Lepage Vallee fded6acf97 tests: Fix a race condition in the spawn test.
To happen, both of these races have to be lost by client3

 * client2 have to take more time to `:kill()` than client3 take
   to be spawned.
 * client4 have to start faster than client3

It is very unlikely to happen on normal systems, but on server it
happens. Some factor that may or may not be involved

 * The scheduler assigned client2 on a very busy CPU and client 3
   on a CPU still busy while some other CPUs are idle
 * Linux is bad at scheduling hyper-threading
 * The system is NUMA and the memory bandwidth is lacking on a core
 * There is some "Z" memory compression or drive based swap
 * Extreme bad luck

Fix #2424
2018-10-16 12:35:18 -04:00
Emmanuel Lepage Vallée 35130169c9
keygrabber: Rename release_event to stop_event (#2422)
In the earlier revision of the keygrabber PR, there was a `release_key`
and it was suggested to rename it `stop_key`. However its sibling
`release_event` wasn't, so it is now confusing.

The commit adds a mild deprecation codepath to avoid breaking configs
based on git-master. However it isn't a "long term" deprecation notice
and the code can probably be removed in 5.0 without further delay.
2018-10-16 08:42:56 -04:00
Emmanuel Lepage Vallee 23c122e89a tests: Test awful.tag.object.set_layouts 2018-10-15 16:10:18 -04:00
mergify[bot] 7020a9707f
Merge pull request #2421 from Elv13/fix_2419
Fix 2419
2018-10-08 16:46:46 +00:00
Emmanuel Lepage Vallee 6229783e16 tests: Add a titlebar integration suite
It doesn't do all that much, but will prevent #2419 from regressing
2018-10-06 18:57:27 -04:00
Emmanuel Lepage Vallee 4c7bcf044c tests: Add more spawn tests 2018-10-05 10:57:55 -04:00
Emmanuel Lepage Vallee 0ac99a5dc5 awful.rules: Rename switchtotag to switch_to_tags.
First of all, it select many tags, so there is an "s". Also, Awesome
standardised naming to snake case in v4.0, but this was missed.
2018-10-04 09:16:00 -04:00
Sergey Vlasov 16b5803fda Add a test for awful.placement.no_overlap+awful.placement.no_offscreen
Test that the placement function used in the default configuration
behaves as intended.  This test was failing before the no_overlap and
no_offscreen fixes in two previous commits.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2018-09-13 08:23:36 +03:00
Sergey Vlasov 61cdc40595 awful.placement: Fix no_offscreen when composed with other functions
The awful.placement.no_offscreen function did not work properly when
composed with other placement functions; in particular, the default
configuration (awful.placement.no_overlap+awful.placement.no_offscreen)
was broken.  The compose function sets args.pretend=true and puts the
result of the previous placement function into args.override_geometry
before calling the next placement function, but no_offscreen did not use
args.override_geometry, therefore the result of the previous placement
function was discarded.

All other placement functions use `geometry_common(c, args)` to get the
current client geometry; `area_common(c)` should be used only when
getting geometry of other clients.

This change also fixes the problem with margin handling (adding margins
should not affect the window size, only the window position should
change); the test output which was adjusted in commit 0275d3537d
is adjusted again to account for this change.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2018-09-13 08:23:36 +03:00
Sergey Vlasov 7f11bc1108 tests: Add initial size support to the test client
Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2018-09-12 08:20:53 +03:00
Sergey Vlasov 0e3979b8e4 tests: Fix resize width/height mixup in the test client
Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2018-09-12 08:15:38 +03:00
Uli Schlachter 0275d3537d Fix no_offscreen test
Commit fec8d6aa8f fixes awful.placement.no_offscreen to behave
like other placement functions. This means that the margins=40 argument
that this test used and that was previously was just ignored, now
started working. Thus, there are now 40 pixels less on each side of the
client in this test.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-22 13:35:09 +02:00
Uli Schlachter 674cd21b81 Merge branch 'second-try-no-offcreen' of https://github.com/actionless/awesome 2018-08-22 12:26:05 +02:00
Uli Schlachter a996b21ee2 test-gravity.c: Accept different roundings
Some window gravities require a division by two. Up to now,
test-gravity.c expected this division to always be rounded up. This
commit changes the code to also allow rounding down.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-17 11:48:49 +02:00