summaryrefslogtreecommitdiffstats
path: root/test/parser/parser-test.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/parser/parser-test.h')
-rw-r--r--test/parser/parser-test.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/parser/parser-test.h b/test/parser/parser-test.h
new file mode 100644
index 0000000..e17cbbc
--- /dev/null
+++ b/test/parser/parser-test.h
@@ -0,0 +1,29 @@
+#ifndef PARSER_TEST_H
+#define PARSER_TEST_H
+
+#include <stdlib.h>
+
+#include "device-handler.h"
+#include "resource.h"
+
+struct parser_test {
+ struct device_handler *handler;
+ struct discover_context *ctx;
+ struct {
+ void *buf;
+ size_t size;
+ } conf;
+};
+
+/* interface required for parsers */
+void __register_parser(struct parser *parser);
+
+/* test functions */
+struct discover_device *test_create_device(struct discover_context *ctx,
+ const char *name);
+
+void test_read_conf_file(struct parser_test *test, const char *filename);
+
+int test_run_parser(struct parser_test *test, const char *parser_name);
+
+#endif /* PARSER_TEST_H */
OpenPOWER on IntegriCloud