Commit graph

96 commits

Author SHA1 Message Date
Daniel Hahler
2effc8e8df Travis: use cluacov for improved performance
Closes https://github.com/awesomeWM/awesome/pull/1964.
2017-08-10 09:57:38 +02:00
Daniel Hahler
82fd7ea8e5 Travis: exit with 1 when check-unit-coverage fails (#1944)
Same as done in 1cdd7ef8 already, but missed this one.
2017-07-26 13:04:52 +02:00
Daniel Hahler
cb10a3fe45 Travis: fix gcov (#1930)
codecov-bash runs it by default already, therefore we do not not have to
do so manually before do_codecov_gcov.
And with `do_codecov` itself, it gets disabled using `-X gcov`.
2017-07-18 10:25:34 +02:00
actionless
eb7c203f99 chore(travis): use xresources theme on one of the test targets 2017-07-03 00:23:57 +02:00
Daniel Hahler
1cdd7ef869 Travis: use exit code 1 for failures, not errors (#1887)
Using exit code != 1 (e.g. 2 as with "make") appears to cause Travis to
consider the build job as an error ("!"), instead of a failure ("X").

Example build: https://travis-ci.org/awesomeWM/awesome/builds/248484247

    !: https://travis-ci.org/awesomeWM/awesome/jobs/248484252
        Test finished successfully
        There were 3 errors!
        make[4]: *** [CMakeFiles/check-integration] Error 1
        make[3]: *** [CMakeFiles/check-integration.dir/all] Error 2
        make[2]: *** [CMakeFiles/check-integration.dir/rule] Error 2
        make[1]: *** [check-integration] Error 2
        make: *** [check-integration] Error 2
        ++return

    X: https://travis-ci.org/awesomeWM/awesome/jobs/248484250
        Test finished successfully
        There were 3 errors!
2017-07-01 14:15:12 +02:00
Daniel Hahler
0c97d1aa95 Add spec/awful/completion_spec.lua 2017-06-26 22:45:11 +02:00
Uli Schlachter
781e68aefc .travis.yml: Move EMPTY_THEME_WHILE_LOADING=1 to another build
The combination of TEST_PREV_COMMITS=1 and EMPTY_THEME_WHILE_LOADING=1
does not work. When trying to test the previous commits, the following
error happens:

error: Your local changes to the following files would be overwritten by
checkout:
	lib/beautiful/init.lua

This local modification was done by EMPTY_THEME_WHILE_LOADING=1.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-23 11:42:20 +02:00
Uli Schlachter
26f150a66c Revert "Travis: pin lua-term to 0.4-1 to fix the Lua 5.3 build" (#1841)
This reverts commit ce3e6648ac. lua-term
was fixed in the mean time, we just forgot to unpin it.
2017-06-13 14:43:44 +02:00
Uli Schlachter
eba61df4ef Also track coverage information for C code
Fixes: https://github.com/awesomeWM/awesome/issues/1364
Closes: https://github.com/awesomeWM/awesome/pull/1766
2017-05-05 01:03:01 +02:00
Uli Schlachter
348df4ef7b Fix the LuaJIT Travis build (#1769)
There's been a new LuaJIT version three days ago.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-04 14:30:59 +02:00
Daniel Hahler
639d6decb4 Travis: merge BUILD_APIDOC and DO_CHECKQA
ldoc was not installed for the DO_CHECKQA build.

This merges it with the BUILD_APIDOC build job, which is one of the
faster ones; installing ldoc into the DO_COVERAGE=coveralls would slow
that one down a lot.

This also moves the two slowest builds (with coverage reporting) to the
top, so they get started first.

Fixes https://github.com/awesomeWM/awesome/issues/1710.
Closes https://github.com/awesomeWM/awesome/pull/1716.
2017-04-10 21:32:47 +02:00
Uli Schlachter
98b931c1a4 Fix travis package list (#1681)
The entry "gtk+3.0" caused the following to happen:

  Note, selecting 'libcanberra-gtk3-0-dbg' for regex 'gtk+3.0'
  Note, selecting 'monodoc-gtk3.0-manual' for regex 'gtk+3.0'
  Note, selecting 'libgtk3.0-cil' for regex 'gtk+3.0'
  Note, selecting 'libavahi-ui-gtk3-0' for regex 'gtk+3.0'
  Note, selecting 'libwxgtk3.0-0-dbg' for regex 'gtk+3.0'
  Note, selecting 'libseed-gtk3-0' for regex 'gtk+3.0'
  Note, selecting 'libgtk3.0-cil-dev' for regex 'gtk+3.0'
  Note, selecting 'libcanberra-gtk3-0' for regex 'gtk+3.0'
  Note, selecting 'libinfgtk3-0.5-0' for regex 'gtk+3.0'
  Note, selecting 'libwxgtk3.0-0' for regex 'gtk+3.0'
  Note, selecting 'gir1.2-dbusmenu-gtk3-0.4' for regex 'gtk+3.0'
  Note, selecting 'libwxgtk3.0-dev' for regex 'gtk+3.0'

This was clearly not intended. Fix this by using gir1.2-gtk-3.0 instead,
which is what we actually want (GObject introspection data for GTK 3).

This pretty much reverts commit 30a527fcfd.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-29 18:47:44 +02: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
Uli Schlachter
844bd1eb05 Test that beautiful is not used too early (#1471)
For loading a theme, beautiful.init() has to be called. We do not handle
dynamic changes of the theme, so if the theme is changed after something
was already queried, this change will not apply. This also means that
before the theme is loaded, nothing useful can be returned. In fact,
code that tries to access the theme during require() will never get a
useful value from beautiful, but just nils.

To catch this, one Travis build is modified so that an error is raised
if the theme is accessed before beautiful.init() was called.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-02-15 00:46:27 +01:00
Uli Schlachter
0afed66ccf Add a utility checking uses of require()s
Currently, "everything can require everything". It's an unstructured
mess which sometimes causes problems.

This commit adds a tool that enforces a white-list of require() uses. It
uses depgraph to scan the source code and then each use of require()
that is found is checked. If any violations are found, the tool returns
a failure.

This tool is wired up to a new target "make check-requires" which is
included in "make check". Thus, Travis will run this.

Reference: https://github.com/awesomeWM/awesome/issues/1400
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-02-08 08:35:43 +01:00
Daniel Hahler
8ca08981b8 Travis: fix travis_run_in_fold (#1522)
It seems that when running travis_fold_end in case of a failure the
Travis job will be marked as "errored", but not "failed".

Ref: https://github.com/awesomeWM/awesome/pull/1516#issuecomment-277448575
2017-02-04 16:35:53 +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
f6fd52a94c Travis: functionaltests: keep original line numbers with awesomerc.lua 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
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
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
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
Daniel Hahler
bdf4c3e0c0 Travis: unpin ldoc again (#1334) 2016-12-31 00:39:55 +01:00
Daniel Hahler
69915fb658 Travis: fix "Testing previous commits"
Fixes/massages TRAVIS_COMMIT_RANGE.

Ref: https://github.com/awesomeWM/awesome/pull/1298#pullrequestreview-14364986
2016-12-25 16:03:40 +01:00
Daniel Hahler
88cca77fdb Travis: use travis_fold function for folds
Ref: 7cac7d393c/lib/travis/shell/generator/bash.rb (L109-L116)
2016-12-25 16:03:40 +01:00
Uli Schlachter
9dba9bbc90 Fix luacheck installation on Travis
A trivial typo in .travis.yml caused luacheck to never run.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-18 11:23:08 +01:00
Daniel Hahler
5158f39c49 Travis: use Lua from lua.org again (#1244)
This reverts commit cf96296f27 (partly).

Fixes https://github.com/awesomeWM/awesome/issues/1242.
Ref: https://github.com/awesomeWM/awesome/pull/1243#issuecomment-264212802.
2016-12-01 18:04:18 +01:00
Daniel Hahler
333cd6491f Travis: run luacheck just once (#1230)
This also helps to easier spot failures because of this when looking
at the build matrix.

 - Add new check-qa target, to be run only once.
 - Add explicit check-unit-coverage target, used with DO_COVERAGE.
2016-11-27 15:24:04 +01:00
Daniel Hahler
c42213caff Merge pull request #1143 from awesomeWM/doc-fix-wibox.widget.base
Doc fixes for wibox.widget.base
2016-11-22 03:08:35 +01:00
Daniel Hahler
b2358a312a Travis: branches: only: master, 3.5 2016-11-22 02:40:15 +01:00
Daniel Hahler
326271f73b Travis: remove luajit from allow_failures: seems to be fixed (#1231) 2016-11-22 01:02:06 +01:00
Daniel Hahler
cf96296f27 Travis: use Lua 5.3.3, from GitHub mirror (#1208) 2016-11-06 20:43:45 +01:00
Uli Schlachter
0e81479a3f Use xcb-util-xrm
Instead of using Xlib for parsing resource files, this now uses the
dedicated xcb-based library that is meant for exactly this task.

Fixes: https://github.com/awesomeWM/awesome/issues/1176
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-11-03 13:34:43 +01:00
Daniel Hahler
b4d6bfa4db Travis: fix codecov (#1105)
tests/run.sh: no slash with --search lib

Fixes https://github.com/awesomeWM/awesome/issues/1049.
2016-09-20 19:53:10 +02:00
Daniel Hahler
99657f49cf Travis: pin ldoc at 1.4.4
Ref: https://github.com/awesomeWM/awesome/pull/1051#issuecomment-241327733
2016-08-22 17:27:48 -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
Daniel Hahler
65e8b9c36b Travis: fix return/exit usage (#1043)
Return 0 (success) in do_codecov function.  It is used in "&&" chains,
and should just do nothing for "coverall", but not break it.

This also makes use of "set -ev" instead of "exit" in general.

The "exit" caused the whole build to stop, but it was still green!
https://travis-ci.org/awesomeWM/awesome/jobs/151943526

"exit" is not really supported:
https://docs.travis-ci.com/user/customizing-the-build/#How-does-this-work%3F-(Or%2C-why-you-should-not-use-exit-in-build-steps)

This also wraps (most of) the "cd" commands in a subshell, to ensure
being in the repo directory all the time (except for $BUILD_IN_DIR).
2016-08-14 02:25:20 +02:00
Daniel Hahler
0d1331e592 Travis: allow failures with LuaJIT (#1025)
This is not nice and we should still try to fix it, but it seems better
to have green PRs without triggering a rebuild etc.

See https://github.com/awesomeWM/awesome/issues/982#issuecomment-231522318.
2016-08-13 00:21:33 +02:00
Uli Schlachter
4cc6a8155f Travis: Install luacov 0.11.0-1 (#991)
With luacov 0.12.0-1 our travis build fails. It was always kinda broken, but now
this breakage is revealed.

What likely happens: Our .luacov errors out because some needed environment
variable to figure out where to put the results is not set. Due to the way we
load luacov, it runs with its default config which luckily happens to work. With
luacov 0.12.0-1 the error is propagated instead and the build fails.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-08 22:46:41 +02:00
Daniel Hahler
a99bfd534c Travis: check each commit separately (for the sake of git-bisect) (#936)
Previous commits are only tested within one build (luajit, which appears
to be the fastest, maybe/also because it does no coverage).

Fixes https://github.com/awesomeWM/awesome/issues/935.
2016-07-05 22:14:41 +02:00
Uli Schlachter
d2b9bb8c39 .travis.yml: Add codecov support (#960)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-11 18:47:29 +02:00
Uli Schlachter
0c784d1472 .travis.yml: Stop installing rxvt-unicode (#961)
The last place where we used urxvt for testing was removed in 6b4a2625cb.

[ci skip]

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-11 13:12:33 +02:00
Daniel Hahler
547fec2824 Travis: run "make check" only once with DO_COVERAGE=true (#940)
Fixes https://github.com/awesomeWM/awesome/issues/938.
2016-06-05 16:12:57 +02:00
Emmanuel Lepage Vallee
ac7ea4c70f tests: Fix coverage data
As the documentation generation insert increasingly large ammount
of code into the lua files, the coverage data is getting less and
less accurate. This try to fix this by only collecting such data
after the `configure_file` calls are done.
2016-05-30 17:51:19 -04:00
Uli Schlachter
cc8e10e4be Travis: Build Lua 5.3 with -DLUA_USE_APICHECK (#907)
This defines some assertions in Lua that should catch API misuses. It might be
that Lua is a bit slower due to this, but so what?

Fixes: https://github.com/awesomeWM/awesome/issues/740
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-16 03:10:58 +02:00
Uli Schlachter
9d30bf87ae Merge branch 'more-travis-variance' of https://github.com/psychon/awesome 2016-05-09 18:42:09 +02:00
Daniel Hahler
58209cd89e Use an uneven screen width/height (1921x1079) in one Travis job (#870)
This is meant to trigger issues that would need `math.ceil()` fixes etc.

Ref: https://github.com/awesomeWM/awesome/issues/848#issuecomment-216068831
2016-05-08 20:58:19 +02:00