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>
- 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
It does not seem to be required by tests (anymore), and fails when the
source dir is mounted read-only (which is the case for the Docker based
builds I am working on).
I think it is clearer anyway to run it as `build/awesome`.
If `cmake ..` in the build dir failed (e.g. because Lua could not be
found), a subsequent `make` will cause a strange error (this is in
non-quiet mode):
```
/src/awesome # make
echo "Running make Makefile…"
Running make Makefile…
make -C build Makefile
make[1]: Entering directory '/src/awesome/build'
make[1]: *** No rule to make target 'Makefile'. Stop.
make[1]: Leaving directory '/src/awesome/build'
make: *** [Makefile:44: Makefile] Error 2
```
With `s` in `MAKEFLAGS` (at the top of our Makefile):
```
Running make check-unit…
make[1]: *** No rule to make target 'check-unit'. Stop.
make: *** [Makefile:44: check-unit] Error 2
```
Therefore this patch looks for build/Makefile to be generated really.
The screen object can be indexed by strings to find a screen via some
RANDR output name. However, if a string is used which does not
correspond to a known output, the code just falls through to a function
which will complain "string provided, userdata expected".
This commit provides a slightly more useful error message instead.
Signed-off-by: Uli Schlachter <psychon@znc.in>
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!
This now runs parse_desktop_file in a protected context so that a single
broken desktop file does not break the whole menubar.
Also, the error message that is produced when a Lua error occurs now
also includes the file name of the .desktop file which we attempted to
parse. This should help quite a lot in debugging.
Related-to: https://github.com/awesomeWM/awesome/issues/1880
Signed-off-by: Uli Schlachter <psychon@znc.in>
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>
1. before this patch the "Shift" key(s) to get to Shift-Tab would reset
ncomp already.
2. "Shift-Tab" will come in as "Tab" with mod.Shift typically.
3. cur_pos and ncomp have to get reset in case of going back to the
original entry.
This allows, for example, to imeplement the tag `master_fill_policy`
and simplify the client layouts by not having to hardcode empty
columns and rows in each layouts.
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.
[ 57%] Building C object CMakeFiles/awesome.dir/dbus.c.o
…/awesome/build/dbus.c: In function ‘a_dbus_message_iter’:
…/awesome/build/dbus.c:137:27: warning: statement will never be executed [-Wswitch-unreachable]
int datalen = 0;
^~~~~~~
It was changed in dd862007, but probably not intentional.
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>
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>
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>