Commit Graph

8391 Commits

Author SHA1 Message Date
Uli Schlachter 75431d90c9 Fix "make package" with RPMs (#1370)
In contrast do dpkg, rpm tracks which package created a directory. No
idea what happens if you remove the package which owns the directory,
but another package still owns files in there. Anyway, this behaviour
produced the following problem:

    file /etc/xdg from install of awesome-[snip].x86_64 conflicts with
    file from package filesystem-3.2-37.fc24.x86_64

Fix this by telling CPack to exclude these directories from the file
list.

Fixes: https://github.com/awesomeWM/awesome/issues/1234
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-08 23:44:07 +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 902a5c5e78 Merge pull request #1239 from Elv13/drill_speed_holes
Improve the CI accuracy and maybe its speed
2017-01-08 22:13:44 +01:00
Emmanuel Lepage Vallee 594cb6fc5d Do not cat luacov on travis, but test for it 2017-01-08 21:28:05 +01:00
Daniel Hahler 0863e52c1d do_codecov: from source dir to handle relative spec/ paths 2017-01-08 20:34:13 +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 83a118e421 awful.util.{get_themes_dir,get_awesome_icon_dir}: support env
Look at environment variables AWESOME_THEMES_PATH and AWESOME_ICON_PATH,
which allows to override this in the integration test runner.
2017-01-08 20:34:13 +01:00
Daniel Hahler 74295393af default theme: use dynamic themes/icon dir 2017-01-08 20:34:13 +01:00
Daniel Hahler f6fd52a94c Travis: functionaltests: keep original line numbers with awesomerc.lua 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 2aca0871cd luacov: include everything 2017-01-08 20:34:13 +01:00
Daniel Hahler eb8b98eef3 ci: only install ldoc for BUILD_APIDOC
The example tests are being run explicitly by now, and not implicitly
when building the docs.
2017-01-08 20:34:13 +01:00
Daniel Hahler 06eeef47d8 ci: fix test-prev-commits: checkout -; no coverage; improve msg
- checkout previous commit, so the coverage upload uses the current
   code
 - do not run coverage reports when testing previous commits
 - improve failure message: display subject/author/name for each commit
2017-01-08 20:34:13 +01:00
Daniel Hahler 061c434a90 CMakeLists.txt: use source dir with check-unit/check-unit-coverage
The build files do not get updated on source changes currently anyway
(as a dependency of these targets), and this seems to be a leftover from
when `lua.in` files were used / pre-processing was required?!
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 528455045c Print warnings on invalid resizes
These warnings might help catching some problems in the future. These
could be asserts, but printing a warning is a lot nicer than dying.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-08 15:35:56 +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 d89b044adc ci: Build the API doc on the fastest target
Do less in the coverage one, as it's much slower
2017-01-08 04:10:55 -05:00
Emmanuel Lepage Vallée aab37dc629 Merge pull request #1366 from thekrampus/volatile-theme-vars
Add taglist theme variables for volatile tags
2017-01-08 03:39:54 -05:00
rob cb3138544f themes: updated taglist variable hint comments 2017-01-07 21:22:30 -07:00
rob 703b11182c taglist: added volatile tag theme variables 2017-01-07 21:21:46 -07:00
Emmanuel Lepage Vallée 6896a0aab7 Merge pull request #1363 from Airblader/fix-include
Remove obsolete include and Xlib comment.
2017-01-06 03:19:23 -05:00
Ingo Bürk 11a29540f2 Remove obsolete include and Xlib comment. 2017-01-05 23:17:11 +01:00
Daniel Hahler 466988eb5a Merge pull request #1354 from psychon/menubar-fixes
Menubar fixes
2017-01-04 20:55:51 +01:00
Emmanuel Lepage Vallée 5e1b88cbb6 Merge pull request #1361 from Elv13/fix_mag
layout: Fix the magnifier layout
2017-01-04 06:47:10 -05:00
Emmanuel Lepage Vallee cefa14d1bd layout: Fix the magnifier layout
It was broken since the dynamic screen support was merged.

Fix #1338
2017-01-04 04:56:54 -05:00
Emmanuel Lepage Vallée a1085b64dd Merge pull request #1358 from Elv13/clear_the_cache
build: Clear the cache when checking if a package is present
2017-01-04 04:45:09 -05:00
Emmanuel Lepage Vallee 160ea0fd66 doc: Fix 2 missing parentheses 2017-01-04 00:12:44 -05:00
Emmanuel Lepage Vallee b26aff3cd0 build: Clear the cache when checking if a package is present
While on Gentoo I get the right error message anyway, apparently
this isn't universal.

Fix #1356
2017-01-03 15:56:58 -05:00
Emmanuel Lepage Vallée 7f9d62c49b Merge pull request #1347 from Elv13/revert_messing_indentation
Revert some of the indentation changes
2017-01-03 01:03:00 -05: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 790d2aa6ee doc: Add a missing test example macro
I found this while doing a review in case the intentation changes
broke other tests.
2017-01-03 00:07:57 -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 1078a9f395 Bump minimal LGI version to 0.8.0 (#1350)
Turns out that menubar already uses features that were only added in
that version.

Fixes: https://github.com/awesomeWM/awesome/issues/1348
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:53:02 +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
Uli Schlachter 54dd973e3f Add awesome.sync()
This function should only be necessary for the test suite. It makes sure
that the X11 server received and handled all previous requests that
awesome sent. This will be needed, for example, in tests that use
root.fake_input().

After a call to awesome.sync(), we are sure that "faking input" has been
done and the next main loop iteration will handle the input event.
Without the sync, it could happen that the X11 server did not yet fake
the input in the next iteration.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:34:41 +01:00
Uli Schlachter dadf8463bd menubar: Fix refresh without show
When menubar.refresh() is called, it tries to update the menubar widget.
The call chain looks like this: menulist_update -> common.list_update ->
get_current_page. get_current_page then tries to query information about
the size of the menubar.

Since there is not much point in this, just skip the whole callback in
this case.

Side note: What is the point of menubar.get()? It seems quite useless to
me.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 17:23:20 +01:00
Uli Schlachter 7f3ff5f26f menubar: Fix hide()
When hide() was called without any calls to shown() before, an error
would occur.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 17:21:10 +01:00
Uli Schlachter 68f0883a44 menubar: Refactor initialisation
No functional changes intended. I just like things more like this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 17:20:41 +01:00