tests: Mark tests as used so they don’t get removed at link time

Without this attribute, the test macros were making Weston fail to
build with LTO enabled.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Emmanuel Gil Peyrot
2017-04-14 19:48:07 +01:00
committed by Daniel Stone
parent 0f4dbe72d3
commit 7092090de9
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ struct weston_test {
static void func(void *); \
\
const struct weston_test test##name \
__attribute__ ((section ("test_section"))) = \
__attribute__ ((used, section ("test_section"))) = \
{ \
#name, func, data, size, n_elem, ret \
};