blob: 888d2ece14781b556fc168cba679ae8758b5af04 [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;
45 uint32_t fail_line;
46};
47
48/* Variable length output parameter tags */
49enum
50{
51 /* The name of the test */
52 TS_TEST_RUNNER_TEST_RESULT_TAG_NAME = 1,
53
54 /* The group the test belongs to */
55 TS_TEST_RUNNER_TEST_RESULT_TAG_GROUP = 2
56};
57
58#endif /* TS_TEST_RUNNER_TEST_RESULT */