Commit Graph

211 Commits

Author SHA1 Message Date
Uli Schlachter 75ed165ae6 Test & fix a bug with dbus.disconnect_signal (#1096)
The code was written so that it assumes that disconnecting the last signal also
removed the corresponding entry in the signal array. This lead e.g. to an
index-out-of-bounds access in some cases.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-09-18 12:50:40 +02:00
Emmanuel Lepage Vallee 35c0476c86 tests: Increase time limit to 120 seconds
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.
2016-09-07 00:40:30 -04:00
Emmanuel Lepage Vallee edf7fb40b3 tests: Test moving tags between screens. 2016-09-05 17:13:53 -04:00
Emmanuel Lepage Vallee 760e72f94a tests: Test spawning client on a specific screen. 2016-09-05 17:13:53 -04:00
Emmanuel Lepage Vallee db73887b9f tests: Add a framework to make it easier to test multiple screens.
While testing using "the real deal" and with all the tests would be
better, it would add a lot of complexity to the testing framework.

This module generate multiple multi-screen scenarios and some obvious
issues that they can cause. Over time, as more steps are added, it
will provide "good enough" testing for multiple screens.

Individual test suits can require() this utility to replicate their
steps for each multi-screen scenarios.
2016-09-05 17:13:53 -04:00
Emmanuel Lepage Vallee a0b40bfd8f tests: Try to detect client "manage" signal race conditions.
See #1028
2016-09-04 02:52:16 -04:00
Uli Schlachter cf89f108ac Make use of awesome-client commands
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>
2016-08-31 17:45:37 +02:00
Emmanuel Lepage Vallee f2bb0ab871 tests: Test the tag index more often 2016-08-22 17:27:48 -04:00
Emmanuel Lepage Vallée ba2750cf91 Merge pull request #929 from Elv13/geometry_overhaul_p3.03
Geometry overhaul part 3.03 (final part for 3.6)
2016-08-20 16:40:36 -04:00
Emmanuel Lepage Vallee 4aada37682 tests: Test tooltips 2016-08-20 16:21:48 -04:00
Emmanuel Lepage Vallée 76d0c458b0 Merge pull request #1031 from Elv13/add_recursive_signal
Add recursive signal for widgets trees.
2016-08-20 16:01:54 -04:00
Emmanuel Lepage Vallee 46f6d28bdf tests: Test recursive signals on mouse events. 2016-08-20 15:41:12 -04:00
Uli Schlachter c22b939630 Be less strict about warnings from "example tests" (#1045)
The build is no longer aborted when one of the "example tests" produces a
message on stderr. However, on Travis this requirement is still made. This
should catch "bad errors" via Travis while not breaking the build for users.

Fixes: https://github.com/awesomeWM/awesome/issues/821
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-08-20 18:59:28 +02:00
Uli Schlachter 71049a67f7 tests/run.sh: Use --search instead of $LUA_PATH
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-08-20 16:04:11 +02:00
Emmanuel Lepage Vallée cbda387677 Merge pull request #1008 from blueyed/tests-run-from-tests-dir
tests/run: change to script dir first
2016-08-20 00:15:57 -04:00
Emmanuel Lepage Vallee 9d69448ac1 tests: Test mouse.move on odd sized clients.
Close #1039
2016-08-12 17:02:33 -04:00
Emmanuel Lepage Vallee da62aec055 tests: Test spawn empty command corner case 2016-08-09 18:50:34 -04:00
Emmanuel Lepage Vallee 3587de5721 tests: Test the declarative widget system on wiboxes 2016-08-01 16:10:53 -04:00
cmertz 2231158adf change test value for client.border_width 2016-07-27 13:43:28 +02:00
cmertz 41133c9836 test client.border_width restore after fullscreen 2016-07-27 09:50:11 +02:00
Daniel Hahler e8dfe36c59 tests/run: change to script dir first
Then use `$source_dir` for detecting the build dir: this way you can run
`./run.sh some-test-file.lua` from `./tests/`.
2016-07-21 19:08:43 +02:00
Daniel Hahler 25b6d31e97 Merge pull request #994 from psychon/fix-drawable-bgimage
Fix drawable bgimage
2016-07-09 19:17:48 +02:00
Uli Schlachter a8834bfcc1 tests/examples: Move common template code into a common file (#993)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 19:03:49 +02:00
Uli Schlachter 3e85ddb11d Add a test for drawable:set_bgimage()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-09 10:28:42 +02:00
Emmanuel Lepage Vallée 36e47fb1a9 tests: Don't use arbitrary build dir path (#898)
Calling the test script by hand from the build dir stopped working.
2016-06-12 23:28:32 +02:00
Uli Schlachter 7488f80be7 tests/example/: Print status messages
Running the tests sadly takes much to long. Since I don't have a good idea what
to do about this (I'd like to run all tests in a single Lua process, but that
doesn't seem to be possible easily), instead let's just make it more explicit
what is being done. This commit prints a message for each test that is being
run.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-11 10:24:34 +02:00
Uli Schlachter ca074dc689 tests/example/: Remove environment hack
Now that tests are no longer scanned for recursively, the hack of passing values
back and forth via the environment is no longer needed and can be removed.

While at it, this also exchanges the "useless use of regex" for an explicit
string replacement.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-11 10:24:34 +02:00
Uli Schlachter a7d6699d5d tests/example/: Replace recursion with iteration
Instead of recursively walking the directory tree, this commit makes the code us
GLOB_RECURSE to find all files and then handles them on after another.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-11 10:24:34 +02:00
Uli Schlachter 77f867ff57 tests/example/: Explcitly compute namespace
The namespace of e.g. "tests/examples/awful/mouse/coords.lua" is "_awful_mouse".
This is purely based on the path of the file.

Previously, this was computed while recursively scanning the directory tree.
This commit instead moves this to an extra function that handles this task.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-11 10:24:34 +02:00
Uli Schlachter 5fb6ca8194 tests/example/: Make search for template.lua explicit
Previously, while recursively scanning the directory tree, the code in here also
scanned for template.lua files and remembered the latest one it found. This
commit adds a function which finds the right template.lua for a given file name,
making this search explicit and easier to understand.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-11 10:24:34 +02:00
Uli Schlachter 2d511e2ab5 gears.object.properties: Implement read-only properties
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-08 20:28:31 +02:00
Daniel Hahler d9cd0a4f0e Merge pull request #948 from psychon/deprecate-add-signal
Deprecate add_signal
2016-06-07 22:58:14 +02:00
Uli Schlachter ffe64727fe Silence warnings in examples (#944)
There was a problem that the examples were considered to have failed as soon as
they produced any kind of output, but there were legitimate cases of warnings
being printed that triggered these checks. Commit 4819be4f4f used a
regular expression to detect and ignore this warnings.

This commit reverts the above commit and instead silences the warnings by
monkey-patching the function that prints the warnings into a no-op.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-07 22:57:01 +02:00
Daniel Hahler efb8e65b15 Merge pull request #886 from psychon/fake-screen-resize
Fake screen resize
2016-06-07 21:13:35 +02:00
Daniel Hahler eaa80fef9a tests/run: clarify timeout in wait_until_success
Ref: https://github.com/awesomeWM/awesome/pull/937#discussion-diff-65313945
2016-06-05 17:05:23 +02:00
Daniel Hahler 8e221522f7 Travis: kill awesome after max. 60s per test file
This is required for when the test setup fails already, e.g. because of
an assertion error at the top of a test file.
2016-06-05 17:05:23 +02:00
Uli Schlachter 0857f6f1b5 Lua: Remove calls to add_signal()
The requirement to call add_signal() was added to catch typos. However, this
requirement became increasingly annoying with property::<name> signals and e.g.
gears.object allowing arbitrary properties to be changed.

All of this ended up in a single commit because tests/examples fails if I first
let add_signal() emit a deprecation warning.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-04 18:23:48 +02:00
Uli Schlachter a21c0baac2 test-screen-changes.lua: Also test moves
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-04 17:39:51 +02:00
Uli Schlachter 7830cf076b Fix the test that the previous commit added
There was a race with autofocus. To overcome this, add another step that tests
that moving the client back to a visible tag and focusing it updates
_NET_CURRENT_DESKTOP. Afterwards, we kill the client so that it can no longer
interfere.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-04 17:05:42 +02:00
Uli Schlachter 66cadf5af8 Test if _NET_CURRENT_DESKTOP is set correctly
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-04 16:01:24 +02:00
Daniel Hahler 007d3d7a14 Merge pull request #926 from psychon/signals-and-hostname
Signals and hostname
2016-06-04 00:29:02 +02:00
Emmanuel Lepage Vallee 505db433d6 shims: Support graph and progresssbar colors 2016-05-30 23:10:03 -04:00
Emmanuel Lepage Vallee c62ca6c665 imagebox: Enable the property system
And add the missing documentation
2016-05-30 23:10:02 -04:00
Emmanuel Lepage Vallee a8505ed019 doc: Add an imagebox widget default screenshot 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee 940a623c34 shims: Add an awesome logo 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee 83a9a9e67a doc: Add a progressbar widget default screenshot 2016-05-30 18:00:59 -04:00
Emmanuel Lepage Vallee f29eeed82e doc: Add a graph widget default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee ec2cfc7be2 doc: Add a textbox widget default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee ab40a342af doc: Add a stack layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 163748c782 doc: Add a ratio layout default screenshot 2016-05-30 18:00:58 -04:00