Commit Graph

621 Commits

Author SHA1 Message Date
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
Uli Schlachter fa39de17b3 Add a test for selection ownership and transfer
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:21:50 +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
Uli Schlachter 3aefce7ccb Merge branch 'example_tests_during_build_again' of https://github.com/psychon/awesome 2018-08-08 15:53:32 +02:00
Emmanuel Lepage Vallee a961c5f002 tests: Add keygrabber tests. 2018-08-06 19:03:25 -04:00
Emmanuel Lepage Vallee e05222088a tests: Add fake_input tests 2018-08-06 19:03:25 -04:00
Emmanuel Lepage Vallee 0765772c17 shims: Fix a typo in a root.fake_input name 2018-08-06 18:34:40 -04:00
Emmanuel Lepage Vallee a32d892988 tests: Add ways to input fake strings and keybindings.
This commit add a way for the test to avoid all the boiler-plate code
necessary to perform higher level input emulation.
2018-08-06 18:34:40 -04:00
mergify[bot] 1cb8375261
Merge pull request #2340 from psychon/print_log_on_awesome_client_failures
tests/run.sh: Print log on awesome-client failures
2018-08-06 18:06:47 +00:00
Uli Schlachter 2769bdbc5b tests/examples: Run example-tests in build phase, not configure phase
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-06 16:50:46 +02:00
Uli Schlachter be728324ef tests/examples: Change ENV handling
Instead of messing with CMake's environment and having that implicitly
inherited when running a process, explicitly set $SOURCE_DIRECTORY where
required.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-06 16:50:46 +02:00
Uli Schlachter 0e94f8bd6b tests/run.sh: Print log on awesome-client failures
tests/run.sh uses awesome-client to actually make awesome run the test.
If awesome-client fails, then the only error message that is printed look like:

== Running /home/travis/build/awesomeWM/awesome/tests/test-leaks.lua ==
Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
E: dbus-send failed.
make[4]: *** [CMakeFiles/check-integration] Error 1

To also get the output from awesome, this commit makes failures from
awesome-client non-fatal so that the following shell code can notice the
failure and hopefully print some useful information.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-06 16:03:17 +02:00
Emmanuel Lepage Vallée e889caba91
build: Auto-add example tests outputs. (#2339)
This commit allow the file to be auto added when it doesn't exist. This
save the useless process of writing it by hand.
2018-08-06 09:30:59 -04:00
Uli Schlachter 73b519d38b Fix STRICT_TESTS (#2338)
STRICT_TESTS was introduced in commit c22b93963. Some people have setups
where e.g. fontconfig produces warnings. These warnings made the tests
under tests/examples/ fail. The above commit changes things so that
these warnings are ignored by default, unless STRICT_TESTS is enabled.

Commit b5ca8bf937 broke this by making example test failures fatal
again.

Fix this by appending "|| true" to the command to run in case strict
tests are disabled. Thus, all failures from tests/examples/runner.sh get
ignored.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-06 09:05:51 -04:00
Emmanuel Lepage Vallée dd7161ee0a
build: Fix a regression when adding new example tests. (#2337)
If the example had a text output, it would cause an error

Regression from b5ca8bf93
2018-08-06 09:05:31 -04:00
Uli Schlachter 15a508f022 Merge branch 'examples_tests_during_build' of https://github.com/psychon/awesome 2018-08-03 14:30:25 +02:00
Uli Schlachter 477af1b145 test runner: Move running to a shell script
Instead of running the example tests directly from CMake and checking
the results via CMake, the tests are now run through a shell script.

So far, there are too many variables involved for me to easily figure
out how to run this shell script in the building phase instead of the
configuring phase, but at least this commit moves the "actual running"
out of CMake, bringing us a step closer to that goal.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-31 17:50:41 +02:00
Emmanuel Lepage Vallee 6240ec113f tests: Implement keybindings, keygrabber and fake_inputs 2018-07-29 10:46:27 -04:00
Emmanuel Lepage Vallee 3adad38c0a tests: Make the capi.screen shim more robust
Also add some private properties to be consumed by the template for a
better rendered documentation example image.
2018-07-29 10:46:27 -04:00
Emmanuel Lepage Vallee 2c8c274193 tests: Add the capi.object miss handle support to the capi.mouse shim 2018-07-29 10:46:27 -04:00
Emmanuel Lepage Vallee 1df44210c8 tests: Add many missing client properties so the tilebar loads correctly 2018-07-29 10:46:27 -04:00
Emmanuel Lepage Vallee ff9f78ef7e tests: Add the cursor and focus colors to the generated images theme. 2018-07-29 10:46:27 -04:00
Emmanuel Lepage Vallee bf6ab0ba4c tests: Mock the keyboard layout API enough to stop getting errors.
It IS NOT correct, the point is to be able to load the keyboard widget
with errors.
2018-07-29 10:46:24 -04:00
Emmanuel Lepage Vallee f1245f083c tests: Add a basic `key` shim 2018-07-29 10:45:40 -04:00
Uli Schlachter b5ca8bf937 example tests: Save expected test output in a txt file
This commit adds a .txt file next to each example test that generates a
text output. This text file contains the expected output and it is an
error if the actual output does not match the expected output. This
means that we no longer have to run the example tests before we can
expand all the @foo@ expressions that occur.

While touching this, I also fixed some typos and unexpected newlines in
the tests' output.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-27 08:56:18 +02:00
mergify[bot] e7251011ac
Merge pull request #2314 from Elv13/add_example_generator_options
Add example generator options
2018-07-25 07:15:18 +00:00
Emmanuel Lepage Vallee 4e8d907044 tests: Restore support for newlines in examples
Since last year luacheck change, trailing spaces are no longer
allowed. This caused all documentaiton examples that used them
as a way to mark newlines to look plain wrong.

This commit add an explicit flag to make longer examples more
readable.
2018-07-24 17:22:41 -04:00
Emmanuel Lepage Vallee c340c14cf2 tests: Improve the CMakeLists.txt
* Add a FOLLOW_SYMLINKS so Awesome 3rd party module can share the
  awesome test infrastructure by adding themselves as symlinks in
  `lib/`, `tests/` and `tests/examples` and otherwise use AwesomeWM
  Travis config.

* Add an option to add examples to the C documentation. Previously only
  Lua functions could be documented using this framework.
2018-07-24 17:22:41 -04:00
Uli Schlachter e1a90ecf5b tests/examples: Explicitly mark tests generating text
This is similar to the previous commit, but for text output that is
produced by some test.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-24 14:27:41 +02:00
Uli Schlachter 654eecd40d tests/examples: Explicitly mark tests generating an image
This allows to figure out if a test will generate an image without
having to run it. The long term plan for this is to run the tests during
compiling ("make") and not during configuring ("cmake"). Since the list
of files to e.g. install needs to be known during configuring, this
commit is a necessary step in that direction.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-24 14:12:44 +02:00
Uli Schlachter efe23dc7d2 tests/examples: Drop support for PNG output images
No currently existing test produces a PNG image, so why do we even check
for such an output file?

I did 'rm -rf build && make -j9 && cp -r build /tmp', then applied this
patch, and then did another 'rm -rf build && make -j9'. According to
diff, the resulting directories are basically the same (except for lots
of timestamps and some non-determinism in CMake).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-24 13:49:43 +02:00
actionless fec8d6aa8f fix(awful: placement: no_offsceen): use new placement infrastructure
fix(tests: examples: awful: placement: no_offscreen): uncomment context

fix(awful: placement): common function to remove border from geometries
2018-07-24 07:38:35 +02:00
Yauhen Kirylau 94d3918d14 fix(awful: widget: only_on_screen): update for screen API changes from #2293 (#2304) 2018-07-22 18:33:59 -04:00
Yauhen Kirylau 4bd5b1940d feat(themes; beautiful): add partial support for GTK+3 themes (#2129) 2018-06-26 10:43:20 -04:00
Uli Schlachter 619d922538 tests/run.sh: Allow setting timeout via $TEST_TIMEOUT (#2281)
This allows to e.g. easily run awesome from source (for an hour) via
TEST_TIMEOUT=42d tests/run.sh /dev/null.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-06-12 13:16:44 -04:00
Rastislav Barlik 7a273778d8 Add test for window factor on maximized clients 2018-05-27 20:34:53 +01:00
Emmanuel Lepage Vallée c0b8388f9b
Merge pull request #2207 from psychon/alpha_borders
Make alpha work on window borders
2018-04-22 02:02:10 -04:00
Emmanuel Lepage Vallée 356d730b7d
Merge pull request #2216 from psychon/deprecate-get_dir
Deprecate gears.filesystem.get_dir
2018-03-12 22:55:33 -04:00
Uli Schlachter 0a588e099a Add a client shape test (#2214)
This is not really a test. It just starts xeyes and sees if anything
explodes.

However, the reason for this test is to stabilise code coverage.
Apparently, Gtk(?) sometimes creates shaped windows. This had the effect
that codecov always reports random changes to code coverage, depending
on if this specific test run saw any shaped client windows or not.

Thus, by explicitly adding a test that runs a shaped client, hopefully
these random fluctuations disappear.

Hopefully-fixes: https://github.com/awesomeWM/awesome/issues/1975
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-03-12 22:53:00 -04:00
Uli Schlachter c8d6b7d28a Use get_cache_dir() where appropriate
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-03-11 16:08:07 +01:00
Emmanuel Lepage Vallée aabff6dac7
Merge pull request #1487 from Elv13/fix_1482
Add an awful.rules chain of responsibility
2018-03-04 16:42:05 -05:00
Emmanuel Lepage Vallee 6921dc9f4c doc: Add a titlebar example 2018-03-04 02:21:48 -05:00
Emmanuel Lepage Vallee aae9655e41 tests: Test the custom rule sources 2018-03-04 01:34:34 -05:00
Emmanuel Lepage Vallee 23d9727590 tests: Make sure clients really end up on the right screen
Prevent #1482 from regressing
2018-03-04 01:34:34 -05:00
Emmanuel Lepage Vallee 20db37f892 tests: Test the gears.sort module 2018-03-04 01:34:33 -05:00
Uli Schlachter 8a44d59716 Correctly convert colors with alpha to a Lua string
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-03-03 10:57:48 +01:00
Uli Schlachter d82f883c0b test-focus.lua: Improve error messages on assertion failure
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-03-03 10:57:48 +01:00
Emmanuel Lepage Vallee cfaf7d8fe8 titlebar: Expose some previously private properties.
I am not happy with this API in general, I keep it undocumented
for now. In a perfect world, the whole client frame would be
a hierarchy.
2018-02-25 18:01:08 -05:00
Emmanuel Lepage Vallee 45135b28b1 shims: Use cairo PNG support instead of GDK
It is inferior, but at least doesn't print warnings on Travis due
to the lack of X server.
2018-02-25 18:01:08 -05:00
Emmanuel Lepage Vallée dd5be865c3
Merge pull request #2127 from Elv13/doc_tests_and_notif_p3_1
awful.widget.common overhaul
2017-12-05 14:06:05 -05:00
Emmanuel Lepage Vallee 0300f6484a tests: Test the taglist 2017-12-02 16:41:25 -05:00
Emmanuel Lepage Vallee acb4c36ac4 tests: Test the tasklist 2017-12-02 16:41:25 -05:00
Emmanuel Lepage Vallee b59495e1e7 tag/tasklist: Update rc.lua
And the tests to avoid some deprecation warnings
2017-12-02 16:33:06 -05:00
Emmanuel Lepage Vallée 73b70d34fa
Merge pull request #2122 from Elv13/doc_tests_and_notif_p2_2
wibox: Add an input_passthrough property
2017-11-27 00:36:44 -05:00
Emmanuel Lepage Vallee 9e81045d42 tests: Test the input_passthrough property 2017-11-27 00:22:11 -05:00
Emmanuel Lepage Vallée b44fd6e35b
Merge pull request #2124 from Elv13/doc_tests_and_notif_p2_4
Add spacing widgets to layouts
2017-11-27 00:18:38 -05:00
Emmanuel Lepage Vallee f1b4850bdc tests: Test the spacing widgets 2017-11-24 19:13:59 -05:00
Emmanuel Lepage Vallee a9c06fb8c5 template: Add configurable margins to the generic layout widget 2017-11-23 23:48:00 -05:00
Daniel Hahler b0220a3804 tests: do not set Xft.dpi with integration tests (#2121)
This should help with covering the methods for detection/fallback during
tests.

Ref: https://github.com/awesomeWM/awesome/pull/2109#issuecomment-346224956

Uses xrdb -q to check for X server being available.

Ignores the following warning:

> W: awesome: beautiful: can't get colorscheme from xrdb (using fallback).
2017-11-23 23:26:54 -05:00
Emmanuel Lepage Vallée 10057ec51c
Merge pull request #2104 from Elv13/fix_2101
Fix the resize/move "after" mode
2017-11-19 14:02:44 -05:00
Daniel Hahler 73ebf452ec
tests: improve coverage with integration tests (#2082)
- install luacov.runner in tests/_runner.lua.
- use Lua's `dofile` to execute the test files, which will give us
  coverage for them.
- CMakeLists.txt: revert DO_COVERAGE env injection
- revert cd: make f absolute if not in source_dir
2017-11-18 01:52:48 +01:00
Emmanuel Lepage Vallee dcdd491ce3 tests: Check that the "after" resize mode doesn't print errors
Something is broken elsewhere that makes the test irrelevant, but
it proves there is no errors.
2017-11-06 05:47:12 +01:00
Emmanuel Lepage Vallee 9f6fed4e7b tests: Test the separator widget 2017-11-06 05:19:17 +01:00
Uli Schlachter 7fda5d3273 awful.rules: Handle non-existing tags
If a tag is specified by name, but no such tags exist, awful.rules would
cause an error (attempt to index a nil value). Fix this and add a test
for this case.

Fixes: https://github.com/awesomeWM/awesome/issues/2087
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-31 13:23:12 +01:00
Daniel Hahler 65b6d12b44 Merge pull request #2073 from blueyed/fix-examples
tests: examples: remove caching, add depends for ldoc
2017-10-27 00:21:55 +02:00
Daniel Hahler 678ead2634 Add client.object.immobilized_{horizontal,vertical} (#2066)
ewmh.client_geometry_requests: ignore immobilized clients

Fixes https://github.com/awesomeWM/awesome/issues/1676.
Fixes https://github.com/awesomeWM/awesome/issues/2036.
2017-10-25 15:36:00 +02:00
Daniel Hahler a5e00347e1 tests: tests/run.sh: timeout after 30 seconds (#2083) 2017-10-24 00:29:56 +02:00
Daniel Hahler d1d794ab2d tests/examples/CMakeLists.txt: remove EXAMPLE_DOC_SOURCE_FILES
The caching is not reliable, and cannot be made so easily.
2017-10-22 15:55:50 +02:00
Daniel Hahler f3baf499aa tests/examples/CMakeLists.txt: set env via LUA_COV_RUNNER only (#2072)
LUA_COV_RUNNER is used with `add_custom_command` for the command to
generate the images, and AWESOME_THEMES_PATH should be set there.

Since LUA_COV_RUNNER is used also with `execute_process` there is no
need for `set(ENV …)` anymore.
2017-10-22 15:47:53 +02:00
Emmanuel Lepage Vallee 2a506b03ae tests: Port the screen template to wibox.layout.manual
It's more flexible than raw cairo code and it's what it was
originally designed for (see #1153).
2017-10-21 19:34:04 +02:00
Emmanuel Lepage Vallee 8e87bd7c64 tests: Add some methods to the shims 2017-10-21 17:57:30 +02:00
Emmanuel Lepage Vallee 15b025ff91 tests: Add the theme path ENV variable
That way theme assets can be used by the documentation images
2017-10-21 17:50:38 +02:00
Reiner Herrmann 9d7eaf020d Use reproducible timestamp during build
During build svg images of the calendar widget are generated, which
differ based on the current date.
By honouring the environment variable SOURCE_DATE_EPOCH, which is
set by distributions during build, a deterministic date can be used
at build time while keeping the normal behaviour during runtime.

See also: https://reproducible-builds.org/specs/source-date-epoch/
2017-10-07 13:58:35 +02:00
Daniel Hahler 02f894ce0c Improve tests/examples: generate deps for output files (#1962)
This still runs all the tests in the configure phase, since the tests
report back what output file (png/svg/none) will be generated.. :/

This could be improved by having this table in CMakeLists directly, or
by having a callback into the tests that only reports back that
information.  The latter would still execute all the tests (via a Lua
process).

Adds an explicit check-examples target.
2017-08-31 21:21:19 +02:00
Daniel Hahler 8923df4a5f build: make DO_COVERAGE a CMake variable
Travis: remove CXXFLAGS (not used), LDFLAGS (typo, not used)

Closes https://github.com/awesomeWM/awesome/pull/2001.
2017-08-29 22:24:12 +02:00
actionless 596b7443e7 feat(tests: run.sh): treat luaA_panic as an error 2017-08-24 23:16:53 +02:00
actionless 162cf1854c fix(tests: run.sh): add one more error log pattern 2017-08-24 23:16:53 +02:00
Daniel Hahler 6e53143401 tests/themes/run.sh: whitespace: sw=4 2017-08-24 23:16:53 +02:00
Daniel Hahler e1da4b030f tests/themes/run.sh: use themes from build dir 2017-08-24 23:16:53 +02:00
Uli Schlachter 98e762e5f7 fix(tests: menubar): ignore warning about opening applications dir in /dev/null 2017-08-24 23:06:15 +02:00
Daniel Hahler 4604ce705d Merge pull request #1979 from psychon/spawn_env
Allow setting environment vars for spawned processes
2017-08-16 13:37:57 +02:00
Daniel Hahler ef04fa688e tests/themes/run.sh: use themes from source dir (#1994)
This makes it easier to track their coverage.
2017-08-16 13:27:49 +02:00
Uli Schlachter 9f8ff76079 awesome.spawn: Add a new argument for env
This adds a new argument to awesome.spawn that can be used to specify
the environment of the spawned process.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 13:23:19 +02:00
Daniel Hahler cdaf0dd294 tests/run.sh: fix verbose mode (#1997)
Fixes https://github.com/awesomeWM/awesome/issues/1996.

Also improves usage information.
2017-08-16 11:27:32 +02:00
Daniel Hahler 52548a2bee tests/run.sh: add -v option, replacing/using VERBOSE 2017-08-15 16:58:24 +02:00
Daniel Hahler 062f9d6a15 tests/themes/run.sh: distinguish header from tests/run.sh 2017-08-14 13:42:13 +02:00
Daniel Hahler e852455308 tests/run.sh: add support for -W to turn warnings into errors 2017-08-14 13:42:13 +02:00
Daniel Hahler 26f32f5ce4 tests/run.sh: cleanup: wait for process(es) to finish (#1982)
Ref: https://github.com/awesomeWM/awesome/pull/1967#issuecomment-321978955
2017-08-13 11:57:59 +02:00
Daniel Hahler f698a17138 Add check-themes, which tests themes via tests/themes/
It relies on tests/run.sh to handle failures.
2017-08-11 20:01:37 +02:00
Daniel Hahler f36738f115 tests/run.sh: allow to provide RC_FILE and theme/icon paths 2017-08-11 20:01:37 +02:00
Daniel Hahler fbea595f60 tests/_runner.lua: write "Running step …" to stderr 2017-08-11 20:01:37 +02:00
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