blob: 7fe9d26162257c38defb964de3415d06f905f91b [file] [log] [blame]
julhal013ec4c322021-02-05 17:30:49 +00001/*
2 * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef TS_TEST_RUNNER_TEST_RESULT
7#define TS_TEST_RUNNER_TEST_RESULT
8
9#include <stdint.h>
10
11/**
12 * Test result summary structure
13 */
14struct __attribute__ ((__packed__)) ts_test_runner_result_summary
15{
16 uint32_t num_tests;
17 uint32_t num_passed;
18 uint32_t num_failed;
19};
20
21/**
22 * Variable length parameter tag for a test result object.
23 * Multiple test results may be returned for a test run.
24 */
25enum
26{
27 /* A test result record describes the result of a
28 * particular test.
29 */
30 TS_TEST_RUNNER_TEST_RESULT_TAG = 1
31};
32
33/* Test run state values */
34enum
35{
36 TS_TEST_RUNNER_TEST_RESULT_RUN_STATE_NOT_RUN = 1,
37 TS_TEST_RUNNER_TEST_RESULT_RUN_STATE_PASSED = 2,
38 TS_TEST_RUNNER_TEST_RESULT_RUN_STATE_FAILED = 3
39};
40
41/* Test result fixed sized structure */
42struct __attribute__ ((__packed__)) ts_test_runner_test_result
43{
44 uint32_t run_state;
julhal013ec4c322021-02-05 17:30:49 +000045};
46
47/* Variable length output parameter tags */
48enum
49{
50 /* The name of the test */
julhal0137e1aea2021-02-09 15:22:20 +000051 TS_TEST_RUNNER_TEST_RESULT_TAG_NAME = 1,
julhal013ec4c322021-02-05 17:30:49 +000052
53 /* The group the test belongs to */
julhal0137e1aea2021-02-09 15:22:20 +000054 TS_TEST_RUNNER_TEST_RESULT_TAG_GROUP = 2,
55
56 /* Test failure recorded, optionally included on failure */
57 TS_TEST_RUNNER_TEST_RESULT_TAG_FAILURE = 3
julhal013ec4c322021-02-05 17:30:49 +000058};
59
julhal0137e1aea2021-02-09 15:22:20 +000060/* Test failure fixed sized structure */
61struct __attribute__ ((__packed__)) ts_test_runner_test_failure
62{
63 uint32_t line_num;
64 uint64_t info;
65};
66
67
julhal013ec4c322021-02-05 17:30:49 +000068#endif /* TS_TEST_RUNNER_TEST_RESULT */