Commit graph

237 commits

Author SHA1 Message Date
Joseph Herlant
d9cc56538f build: man pages: use asciidoctor instead of asciidoc (#2234) 2018-04-04 11:28:50 +02:00
Kevin Zander
80b21cfbc3 Fix manpage warnings during build (#2161)
Fixes #1392
2018-01-21 21:20:33 -05:00
Daniel Hahler
b291880fa1 add css
Source: https://github.com/stevedonovan/LDoc/pull/287
https://raw.githubusercontent.com/hishamhm/LDoc/7214818f0ff580e5607a4de764340aa7e3b55d1a/ldoc/html/ldoc_new_css.lua
2017-10-28 00:08:28 +02: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
579159a8cc CMakeLists.txt: check-integration: depend on main target (#2081)
This makes `make check-integration DO_COVERAGE=1` on a clean build work.
2017-10-24 20:59:51 +02:00
Daniel Hahler
1ab861ea3a tests: busted: add config file, use --verbose by default (#2076) 2017-10-22 18:05:00 +02:00
Daniel Hahler
386e74b852 CMakeLists.txt: ldoc: depend on generate-examples 2017-10-22 15:55:50 +02:00
Daniel Hahler
790a669029 cmake: add strict mode for ldoc, based on STRICT_TESTS (#2035)
This allows for building the docs with an older ldoc version, and it
makes sense in general to make warnings not fatal by default.

Ref: https://github.com/awesomeWM/awesome/pull/2027#issuecomment-328354095
2017-09-11 14:20:43 +02:00
Daniel Hahler
2c741f8e1d build: use --fatalwarnings with ldoc, remove check-ldoc-warnings (#1963)
Instead of having a custom target with redirection magic, just use
`--fatalwarnings` with ldoc.  This requires ldoc 1.4.5.
2017-08-16 19:23:10 +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
Daniel Hahler
e9adb28af6 Merge pull request #1973 from blueyed/tests-error-on-warnings
Tests: check-integration: error on warnings
2017-08-15 17:59:30 +02:00
Daniel Hahler
934ad741a7 tests: keep check-themes separate from check-integration (#1991)
Ref: https://github.com/awesomeWM/awesome/pull/1973#issuecomment-322183782
2017-08-14 17:18:46 +02:00
Daniel Hahler
f8d1e46eaa CMakeLists.txt: pass TEST_RUN_ARGS to tests/run.sh, default to -W 2017-08-14 16:00:35 +02:00
Daniel Hahler
730b706217 check-integration: fail on warnings
Those are most likely deprecation warnings, but the tests should be free
of warnings (from awesome) anyway.

The "Last main loop iteration took X seconds!" warning is filtered out.
2017-08-14 13:42:13 +02:00
Emmanuel Lepage Vallée
2900ea6f01 Merge pull request #1842 from psychon/lgi-check
Port lgi-check.sh to C
2017-08-12 15:59:18 -04: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
56ac221544 CMakeLists.txt: copy all icons to build dir 2017-08-10 21:57:59 +02:00
Daniel Hahler
fc1ba35366 CMake: only run ldoc with changed input (#1911)
This adds a custom command to build the documentation, where you can
specify the generated output then. "ldoc" then depends on this output.

This way "ldoc" is not being run every time, but only if the input files
have changed.  ldoc's config is added therefore to the list of
dependencies to make config changes trigger a rebuild.
2017-07-09 18:45:14 +02:00
Uli Schlachter
95b412df19 Move project() call to CMakeLists.txt (#1909)
CMake "fakes" a call to "project(Project C CXX)" if it does not see a
project() call in CMakeLists.txt. Since we had this call in a different
file, this default applied. This meant that CMake unnecessarily required
a C++ compiler.

Fix/work-around this by moving the call to project() into CMakeLists.txt

Reference: https://github.com/awesomeWM/awesome/pull/1907#discussion_r125581273
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-09 16:23:56 +02:00
Daniel Hahler
09bffcd432 cmake: define check-unit always (#1896)
Fixes https://github.com/awesomeWM/awesome/issues/1891.
2017-07-01 22:32:14 +02:00
Daniel Hahler
731099ba4d CMakeLists.txt: remove check-unit from ALL (#1867)
This makes "make install" not run the unit tests (again).

Instead "check-unit" is added to the top-level wrapper Makefile to be
run for its "all" task.
2017-06-25 20:04:32 +02:00
Uli Schlachter
ddc51cf38c Port lgi-check.sh to C
Previously, the lgi check used the normal Lua interpreter to check if
lgi is installed. However, nothing ensures/requires that awesome is
built against the same Lua version as the Lua interpreter. This means
that if lgi is only available for some Lua version, then the check could
succeed even though awesome would later fail to start. Also, the check
might have failed even though awesome would not have any problems
finding lgi.

This commit replaces lgi-check.sh by a small C program which does the
same thing. This ensures that the same Lua version is used as awesome
will be using.

There are some places that still use the Lua interpreter: Example tests
(run through the Lua interpreter directly) and unit tests (run through
busted). For unit tests, this should not make much of a difference and
example tests might later get similar treatment.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-13 15:47:07 +02:00
Uli Schlachter
27eba6c034 Abort on in-source-builds (#1788)
They do not work since we overwrite things in such a way that the build
will fail.

Fixes: https://github.com/awesomeWM/awesome/issues/1786
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-24 21:06:27 +02:00
Uli Schlachter
3ed0be6d85 Add a test for gravity handling (#1760)
This adds a C program which tests if the window manager handles
gravities correctly. This program is loosely based on metacity's
test-gravity.c, but completely rewritten and this version does automatic
tests instead of allowing the user to perform testing by hand.

By having this as a self-contained C program, it is possible to compare
awesome's behaviour with the behaviour of other WMs.

In my testing, only metacity and awesome pass this test. This is not
that much of a big surprise since awesome was fixed in
https://github.com/awesomeWM/awesome/pull/505 to work correctly with
metacity's test-gravity.c. However, I am surprised that e.g. Fluxbox
gets this wrong.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:28:45 +02: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
Uli Schlachter
b9b59be816 CMakeLists.txt: Inline some once-used variables
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-26 15:17:21 +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
Uli Schlachter
e2a791ab05 Specify USES_TERMINAL for running tests/run.sh (#1331)
The documentation for CMake's add_custom_command()-command says the
following for USES_TERMINAL:

  The command will be given direct access to the terminal if possible.
  With the ``Ninja`` generator, this places the command in the
  ``console`` ``pool``.

The result is that one can see the progress of tests/run.sh, because
messages appear immediately instead of delayed (instead all other
parallel steps are delayed; in practice this means luacheck output
appears only after tests/run.sh is done).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-30 14:12:54 +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
Uli Schlachter
56d4cdfa32 CMake: Automatically collect generated doc files
Instead of hardcoding the list of generated doc files as dependencies to
ldoc, we jump through some hoops to compute this dynamically.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-10-22 11:22:16 +02:00
Uli Schlachter
4f1897b256 Ignore warnings from ldoc by default
A while ago, we made errors from ldoc fatal by default. Then a new ldoc
release appeared and caused problems for all of our users, because
awesome failed to work.

This patch reverts the previous fix so that we ignore ldoc warnings by
default again. However, to catch ldoc warnings on Travis, another
ldoc-building-target is added that fails on warnings. This new target is
included in our "check" target.

This fixes the intend of issue #1098 ("Users with ldoc version X cannot
build awesome"), but it does not actually employ the solution proposed
there ("Blacklist those ldoc versions"). Still, since this fixes the
intend of the issue, I count it as fixed.

Fixes: https://github.com/awesomeWM/awesome/issues/1098
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-10-22 11:03:56 +02:00
Emmanuel Lepage Vallee
dd959eecd6 build: Fix make install when ldoc is missing 2016-10-03 23:39:14 -04:00
Emmanuel Lepage Vallee
63b712e247 doc: Document rc.lua
This meta-lua script takes the "raw" awesomerc.lua and turn it
into the final file and generate a documentation page from its
parsed content. It support

 * Turn {{{ into markdown categories
 * Turn top level comments into documentation
 * Add custom documentation sections
 * Parse the code to add links for each API calls

This helps generate a good entry point for new users wanting to
understand the content of rc.lua without searching the API by
hand.

Over time, this will also become the basis of the documentation.

If `rc.lua` is separated into several files, this will be easy to fix
this script. It could even do the separation itself from a monolitic
file using the already implemented {{{ parser.
2016-09-26 00:40:20 -04:00
Emmanuel Lepage Vallee
5f10e7a74e doc: Begin to document the themes better.
This add a meta-lua file that parses all existing lua files
to generate a list of all beautiful variables.
2016-09-26 00:40:19 -04:00
Uli Schlachter
7ea816045d "make check": Support out-of-tree builds
Currently, tests/run.sh expects the directory layout that our wrapper Makefile
sets up before running CMake. This commit adds support for any other directory
configuration as well.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 18:52:18 +02:00
Uli Schlachter
96370e32a3 Use a_find_program() instead of find_program()
a_find_program() prints some status, making it easier to see what was found and
was not.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-17 16:10:18 +02:00
Emmanuel Lepage Vallee
af6586a723 build: Be more careful about the use of .. 2016-04-14 21:31:19 -04:00
Bernhard M. Wiedemann
24fa4ba6a3 dont add timestamps to created images
This allows for reproducible builds
2016-03-20 16:22:52 +01:00
Emmanuel Lepage Vallee
b6871833c4 cmake: Generate gears.shape SVG and example code 2016-03-16 18:02:41 -04:00
Daniel Hahler
e19f73c6bf Merge pull request #79 from akdor1154/versioningFix
Implement basic DEB/RPM packaging
2016-03-15 00:23:51 +01:00
Jarrad Whitaker
0283bab54f implement basic DEB packaging 2016-02-28 20:07:54 +11:00
Uli Schlachter
43dba09c28 Add& use Luacheck support
This commit adds a new "luacheck" target to the Makefiles. This target is
automatically included in "make check" when luacheck is found in $PATH.
Additionally, this includes luacheck in Travis so that the build fails when
luacheck complains about something.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-16 19:45:10 +01:00
Uli Schlachter
1ea3ba6f30 Merge branch 'fix-images-in-doc' of https://github.com/awesomeWM/awesome 2016-02-14 14:33:51 +01:00
Uli Schlachter
3bc8aa2d40 Fix images in the documentation
Instead of copying images to ${BUILD_DIR}/docs/images, which is the directory
with the input to ldoc, this now copies the images to ${BUILD_DIR}/doc/images,
which is where ldoc generates its output. That way, the images are together with
the html files and are automatically picked up by a lot of stuff.

Fixes: https://github.com/awesomeWM/awesome/issues/681
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-13 08:04:14 +01:00
Uli Schlachter
b823dd4ed4 Add code coverage support
This uses coveralls.io and integrates the collection of coverage information
with Travis.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 09:26:07 +01:00
Emmanuel Lepage Vallee
d59bdec32f Fix make install when documentation is disabled 2016-02-11 03:43:19 -05:00
Emmanuel Lepage Vallee
3ef5003ace doc: Add support for images 2016-02-10 01:09:50 -05:00
Uli Schlachter
4c8128eaa9 Make errors from LDoc fatal
Via this commit, any warnings from LDoc are fatal and make "make" fail. The
intention is to cause failures on Travis for PRs that introduce broken
documentation.

Closes: https://github.com/awesomeWM/awesome/issues/643

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-30 10:43:58 +01:00
Kazunobu Kuriyama
998a20514a Modify CFLAGS handling
- Remove `-rdynamic` from "CFLAGS" and count on CMake to pass it to
   the compiler at the link phase (Issue #450).
 - Move the definition of "CFLAGS" from `awesomeConfig.cmake` to
   `CMakeLists.txt` and give it a name, `AWESOME_C_FLAGS`, so that the
   relation between the target and the flags is made clearer and
   manageable.
 - Make `AWESOME_C_FLAGS` a cached variable so that the developers can
   tweak the flags promptly in accordance with their necessities without
   changing the prescribed value.
 - Add a logic to cope with the case where CMake fails to set
   `-rdynamic`.

Closes https://github.com/awesomeWM/awesome/pull/453.
2015-09-19 12:02:03 +02:00
Daniel Hahler
87ee480853 CMakeLists.txt: a_icon_convert: skip existing sources
Fixes: https://github.com/awesomeWM/awesome/pull/215#issuecomment-103185810.
2015-08-02 15:22:37 +02:00