Discussion:
[awesome bugs] #1301 - Failures with "make test" / do not use "test" target by default
awesome
2014-10-03 15:23:47 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened. Details are below.

User who did this - Daniel Hahler (blueyed)

Attached to Project - awesome
Summary - Failures with "make test" / do not use "test" target by default
Task Type - Bug Report
Category - Build system
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - git/master
Due in Version - Undecided
Due Date - Undecided
Details - When running the unit tests, I get the following failures:

Running make test…
Scanning dependencies of target check
●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
69 successes / 4 failures / 0 errors / 0 pending : 0.0 seconds

Failure → ./spec/gears/color_spec.lua @ 76
gears.color linear pattern string description
./spec/gears/color_spec.lua:42: Expected objects to be the same. Passed in:
(number) 1
Expected:
(number) 0.5

Failure → ./spec/gears/color_spec.lua @ 111
gears.color radial pattern string description
./spec/gears/color_spec.lua:42: Expected objects to be the same. Passed in:
(number) 1
Expected:
(number) 0.5

Failure → ./spec/gears/color_spec.lua @ 59
gears.color linear pattern table description
./spec/gears/color_spec.lua:42: Expected objects to be the same. Passed in:
(number) 1
Expected:
(number) 0.5

Failure → ./spec/gears/color_spec.lua @ 94
gears.color radial pattern table description
./spec/gears/color_spec.lua:42: Expected objects to be the same. Passed in:
(number) 1
Expected:
(number) 0.5
make[4]: *** [CMakeFiles/check] Error 1
make[3]: *** [CMakeFiles/check.dir/all] Error 2
make[2]: *** [CMakeFiles/test.dir/rule] Error 2
make[1]: *** [test] Error 2
make: *** [test] Error 2

This also happens on a clean/new checkout of master (@57b6433b).

Because this prevents building, I've added the following local patch to not run the tests for the "all" target:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 37142e6..333df8a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -328,7 +328,7 @@ endif()
# {{{ Unit tests
find_program(BUSTED_EXECUTABLE busted)
if(BUSTED_EXECUTABLE)
- add_custom_target(check ALL
+ add_custom_target(check
${BUSTED_EXECUTABLE} "--lpath=${CMAKE_BINARY_DIR}/lib/?.lua;${CMAKE_BINARY_DIR}/lib/?/init.lua;spec/?.lua"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
VERBATIM)

I don't know if this is the correct approach to it, but I think that there should be a explicit (default) target for only building, without running the tests.


More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1301

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
awesome
2014-10-03 18:42:13 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#1301 - Failures with "make test" / do not use "test" target by default
User who did this - Uli Schlachter (psychon)

----------
It only includes the tests in all if it finds "busted", so that could be used as a work-around as well. I really do want the tests to run by default since otherwise no one runs them.

For this bug:
Apparently something is re-ordering things here. The test really relies on pairs() to iterate through the table in the order it was created with which can't reliably be assumed. Not much time currently, but that assumption should be removed and instead ipairs() should be used for the iteration...
----------

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1301#comment4149

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
awesome
2014-10-04 11:51:04 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#1301 - Failures with "make test" / do not use "test" target by default
User who did this - Uli Schlachter (psychon)

----------
Does this patch help?
----------

One or more files have been attached.

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1301#comment4151

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
awesome
2014-10-15 14:17:01 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#1301 - Failures with "make test" / do not use "test" target by default
User who did this - Daniel Hahler (blueyed)

----------
Yes, this patch fixes the failures.

Thanks!
----------

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1301#comment4173

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
awesome
2014-10-15 21:44:32 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task is now closed:

FS#1301 - Failures with "make test" / do not use "test" target by default
User who did this - Uli Schlachter (psychon)

Reason for closing: Fixed
Additional comments about closing: commit cf9db056f957f26b9b63c67b61568e36bbd01c66
Author: Uli Schlachter <***@znc.in>
Date: Wed Oct 15 23:42:24 2014 +0200

gears.color spec: Don't depend on order of pairs() (FS#1301)

The previous code assumed that pairs() iterates over the table in a specific
order which is not a safe assumption.

Signed-off-by: Uli Schlachter <***@znc.in>


More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1301

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Loading...