comparison src/cs/riviera/tests/rtest/rtest_msg_i.h @ 0:92470e5d0b9e

src: partial import from FC Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 15 May 2020 01:28:16 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:92470e5d0b9e
1 /**
2 * @file rtest_msg_i.h
3 *
4 * Data structures:
5 * 1) Used to send messages to the RTEST SWE,
6 * 2) RTEST can receive.
7 *
8 * Only for internal use.
9 *
10 * @author Vincent Oberle (v-oberle@ti.com)
11 * @version 0.1
12 */
13
14 /*
15 * History:
16 *
17 * Date Author Modification
18 * -------------------------------------------------------------------
19 * 11/21/2001 Vincent Oberle Create
20 * 03/04/2002 Vincent Oberle Changed name to RTEST
21 * 03/15/2002 Vincent Oberle Put as a internal file,
22 * reduced nb of messages
23 *
24 * (C) Copyright 2002 by Texas Instruments Incorporated, All Rights Reserved
25 */
26
27 #ifndef __RTEST_MSG_I_H_
28 #define __RTEST_MSG_I_H_
29
30
31 #include "rv/rv_general.h"
32
33 #include "tests/rtest/rtest_api.h"
34
35
36
37 /**
38 * Macro used for tracing RTEST messages.
39 */
40 #define RTEST_SEND_TRACE(string, trace_level) \
41 rvf_send_trace (string, (sizeof(string) - 1), NULL_PARAM, trace_level, RTEST_USE_ID)
42
43 #define RTEST_SEND_TRACE_PARAM(string, param, trace_level) \
44 rvf_send_trace (string, (sizeof(string) - 1), param, trace_level, RTEST_USE_ID)
45
46
47
48 /**
49 * The message offset must differ for each SWE in order to have
50 * unique msg_id in the system.
51 */
52 #define RTEST_MESSAGE_OFFSET BUILD_MESSAGE_OFFSET(RTEST_USE_ID)
53
54
55
56 /***************
57 * to RTEST SWE *
58 ***************/
59
60 /**
61 * @name RTEST_START_TEST
62 *
63 * Message to indicate to the Test SWE to proceed
64 * to a test.
65 */
66 /*@{*/
67 /** Message ID. */
68 #define RTEST_START_TEST (RTEST_MESSAGE_OFFSET | 0x001)
69
70 /** Message structure. */
71 typedef struct
72 {
73 /** Message header. */
74 T_RV_HDR hdr;
75
76 /**
77 * The pointer on the test function.
78 */
79 T_RTEST_FUNC test_fct;
80
81 } T_RTEST_START_TEST;
82 /*@}*/
83
84
85
86 /*****************
87 * from RTEST SWE *
88 *****************/
89
90 /**
91 * @name RTEST_TEST_RESULT
92 *
93 * Message issued by the RTEST SWE to indicate the result of a test.
94 */
95 /*@{*/
96 /** Message ID. */
97 #define RTEST_TEST_RESULT (RTEST_MESSAGE_OFFSET | 0x02)
98
99 /** Message structure. */
100 typedef struct
101 {
102 /** Message header. */
103 T_RV_HDR hdr;
104
105 /**
106 * Test result value. Possible values are:
107 * - TEST_PASSED: No error occured
108 * - TEST_FAILED: An error occured but continue test suite
109 * - TEST_IRRECOVERABLY_FAILED: An error occured, stop test suite
110 */
111 T_RV_TEST_RET result;
112
113 } T_RTEST_TEST_RESULT;
114 /*@}*/
115
116 #endif /* __RTEST_MSG_I_H_ */