diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-12 12:54:14 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-26 09:07:13 -0400 |
commit | 306e36185c34c486d09905fc4eb551da4b89bc37 (patch) | |
tree | 8fcbbb9d35ac8135f3d8ca1cffeeb8e257959ab7 /tests/test-runner.h | |
parent | 7890c4d36dbec14d44109ead6fb12adfece47a7b (diff) | |
download | weston-306e36185c34c486d09905fc4eb551da4b89bc37.tar.gz weston-306e36185c34c486d09905fc4eb551da4b89bc37.tar.bz2 weston-306e36185c34c486d09905fc4eb551da4b89bc37.zip |
tests: Add an initial weston integration test
The idea here is to make weston load test cases as a module and then
run test cases from within weston.
Diffstat (limited to 'tests/test-runner.h')
-rw-r--r-- | tests/test-runner.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test-runner.h b/tests/test-runner.h new file mode 100644 index 00000000..33df58f5 --- /dev/null +++ b/tests/test-runner.h @@ -0,0 +1,25 @@ +#ifndef _TEST_RUNNER_H_ +#define _TEST_RUNNER_H_ + +#ifdef NDEBUG +#error "Tests must not be built with NDEBUG defined, they rely on assert()." +#endif + +#include "../src/compositor.h" + +struct test { + const char *name; + void (*run)(struct weston_compositor *compositor); +} __attribute__ ((aligned (16))); + +#define TEST(name) \ + static void name(struct weston_compositor *compositor); \ + \ + const struct test test##name \ + __attribute__ ((section ("test_section"))) = { \ + #name, name \ + }; \ + \ + static void name(struct weston_compositor *compositor) + +#endif |