From 5d16719922866622fc0f42c570b9934f595e3c33 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Wed, 15 May 2013 15:28:57 +0800 Subject: test: Replace parser tests with empty framework This change is a major rework of the parser tests. Currently, the parser tests just run the parsers on each subdir of data/, but we don't actually check the results. Rather than just running parsers and expecting a certain fixed output, the new tests are arbitraty (short!) C programs. This allows us to set up the device configuration / discover context etc in whatever manner necessary, and check that the boot options that the parsers emit are correct. This change removes all of the old tests, and adds a new "null" test. Actual tests will be added in subsequent changes. Signed-off-by: Jeremy Kerr --- test/parser/handler.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/parser/handler.c (limited to 'test/parser/handler.c') diff --git a/test/parser/handler.c b/test/parser/handler.c new file mode 100644 index 0000000..f585c31 --- /dev/null +++ b/test/parser/handler.c @@ -0,0 +1,28 @@ + +#include +#include + +#include "device-handler.h" + + +void discover_server_notify_device_add(struct discover_server *server, + struct device *device) +{ + (void)server; + (void)device; +} + +void discover_server_notify_boot_option_add(struct discover_server *server, + struct boot_option *option) +{ + (void)server; + (void)option; +} + +void discover_server_notify_device_remove(struct discover_server *server, + struct device *device) +{ + (void)server; + (void)device; +} + -- cgit v1.2.1