1/*
2 * Copyright 2017, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
8 * See "LICENSE_BSD2.txt" for details.
9 *
10 * @TAG(DATA61_BSD)
11 */
12
13#include <regex.h>
14#include <stdbool.h>
15#include <stdio.h>
16#include <stdlib.h>
17#include <string.h>
18#include <assert.h>
19
20#include <sel4testsupport/testreporter.h>
21#include <sel4test/testutil.h>
22#include <sel4test/macros.h>
23
24#include <utils/util.h>
25
26#include <serial_server/test.h>
27
28/* Force the _test_type and _test_case section to be created even if no tests are defined. */
29static USED SECTION("_test_type") struct {} dummy_test_type;
30static USED SECTION("_test_case") struct {} dummy_test_case;
31
32/* Used to ensure that serial server parent tests are included */
33UNUSED void dummy_func()
34{
35    get_serial_server_parent_tests();
36}
37
38testcase_t *sel4test_get_test(const char *name)
39{
40
41    for (testcase_t *t = __start__test_case; t < __stop__test_case; t++) {
42        if (strcmp(name, t->name) == 0) {
43            return t;
44        }
45    }
46
47    return NULL;
48}
49
50