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:
parent
0f4dbe72d3
commit
7092090de9
@ -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 \
|
||||
};
|
||||
|
@ -268,7 +268,7 @@ zuc_set_output_junit(bool enable);
|
||||
static void zuctest_##tcase##_##test(void); \
|
||||
\
|
||||
const struct zuc_registration zzz_##tcase##_##test \
|
||||
__attribute__ ((section ("zuc_tsect"))) = \
|
||||
__attribute__ ((used, section ("zuc_tsect"))) = \
|
||||
{ \
|
||||
#tcase, #test, 0, \
|
||||
zuctest_##tcase##_##test, \
|
||||
@ -298,7 +298,7 @@ zuc_set_output_junit(bool enable);
|
||||
static void zuctest_##tcase##_##test(void *param); \
|
||||
\
|
||||
const struct zuc_registration zzz_##tcase##_##test \
|
||||
__attribute__ ((section ("zuc_tsect"))) = \
|
||||
__attribute__ ((used, section ("zuc_tsect"))) = \
|
||||
{ \
|
||||
#tcase, #test, &tcase, \
|
||||
0, \
|
||||
|
Loading…
Reference in New Issue
Block a user