Skip to content
Snippets Groups Projects
Commit 2346801b authored by Peter Hutterer's avatar Peter Hutterer
Browse files

test: switch to a TEST_DEVICE macro for all the litest test devices


The test device initialization code was a bit of duplicated boilerplate and
required adding a reference to the devices to the 'devices' list in litest.c.
Automate this with a new TEST_DEVICE macro that adds the devices to a custom
section in the binary, then loops throught that section to get the device out.

This reduces the boilerplate for each test device to just the TEST_MACRO and
the LITEST_foo device enum entry. It also now automates the shortname of the
device.

The device's shortname was standardised in this approach as well, lowercase
and dashes only.

Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 5516e9ea
No related branches found
No related tags found
No related merge requests found
Showing
with 47 additions and 207 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment