summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>2017-04-14 19:48:07 +0100
committerDaniel Stone <daniels@collabora.com>2017-12-01 16:53:53 +0000
commit7092090de9f0f619272e52f65decdce86bc532f9 (patch)
treeb82abaa873987e942cd1f5524a9fee22da28877b /tests
parent0f4dbe72d36106027b448c31f45975c8c503bd15 (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/weston-test-runner.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/weston-test-runner.h b/tests/weston-test-runner.h
index b9f966e0..eb9a488a 100644
--- a/tests/weston-test-runner.h
+++ b/tests/weston-test-runner.h
@@ -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 \
};