source: rtems/testsuites/ada/support/test_support.ads @ 6e05265f

5
Last change on this file since 6e05265f was f6c9334d, checked in by Sebastian Huber <sebastian.huber@…>, on 12/01/17 at 07:51:17

ada: Add standard test begin/end message

  • Property mode set to 100644
File size: 4.0 KB
Line 
1--
2--  Test_Support / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package provides routines which aid the Test Suites
7--  and simplify their design and operation.
8--
9--  DEPENDENCIES:
10--
11-- 
12--
13--  COPYRIGHT (c) 1989-2009.
14--  On-Line Applications Research Corporation (OAR).
15--
16--  The license and distribution terms for this file may in
17--  the file LICENSE in this distribution or at
18--  http://www.rtems.org/license/LICENSE.
19--
20
21with RTEMS;
22
23package Test_Support is
24
25   procedure Ada_Test_Begin;
26   pragma Import (C, Ada_Test_Begin, "ada_test_begin");
27
28   procedure Ada_Test_End;
29   pragma Import (C, Ada_Test_End, "ada_test_end");
30
31--
32--  Fatal_Directive_Status
33--
34--  DESCRIPTION:
35--
36--  This subprogram checks if Status is equal to Desired.  If so, it
37--  returns immediately.  Otherwise, it prints the Message along with
38--  the Status and Desired status and invokes the Fatal_Error_Occurred
39--  directive.
40--
41
42   procedure Fatal_Directive_Status (
43      Status  : in     RTEMS.Status_Codes;
44      Desired : in     RTEMS.Status_Codes;
45      Message : in     STRING
46   );
47   pragma Inline ( Fatal_Directive_Status );
48
49--  Directive_Failed
50--
51--  DESCRIPTION:
52--
53--  This subprogram checks if Status is equal to Successful.  If so, it
54--  returns immediately.  Otherwise, it prints the Message along with
55--  the Status and Desired status and invokes the Fatal_Error_Occurred
56--
57
58   procedure Directive_Failed (
59      Status  : in     RTEMS.Status_Codes;
60      Message : in     STRING
61   );
62   pragma Inline ( Directive_Failed );
63
64--
65--  Print_Time
66--
67--  DESCRIPTION:
68--
69--  This subprogram prints the Prefix string, following by the
70--  time of day in Time_Buffer, followed by the Suffix.
71--
72
73   procedure Print_Time (
74      Prefix      : in     STRING;
75      Time_Buffer : in     RTEMS.Time_Of_Day;
76      Suffix      : in     STRING
77   );
78   pragma Inline ( Print_Time );
79
80--
81--  Put_Dot
82--
83--  DESCRIPTION:
84--
85--  This subprogram prints a single character without a carriage return.
86--
87
88   procedure Put_Dot (
89      Buffer : in     STRING
90   );
91   pragma Inline ( Put_Dot );
92
93--
94--  Pause
95--
96--  DESCRIPTION:
97--
98--  This subprogram is used to pause screen output in the Test Suites
99--  until the user presses carriage return.
100--
101
102   procedure Pause;
103
104--
105--  Pause_And_Screen_Number
106--
107--  DESCRIPTION:
108--
109--  This subprogram is used to pause screen output  and print the current
110--  number in the Test Suites until the user presses carriage return.
111--
112
113   procedure Pause_And_Screen_Number (
114      SCREEN : in     RTEMS.Unsigned32
115   );
116
117--
118--  Put_Name
119--
120--  DESCRIPTION:
121--
122--  This subprogram prints the RTEMS object Name.  If New_Line is TRUE,
123--  then a carriage return is printed after the Name.
124--
125
126   procedure Put_Name (
127      Name     : in     RTEMS.Name;
128      New_Line : in     Boolean
129   );
130 
131--
132--  Task_Number
133--
134--  DESCRIPTION:
135--
136--  This function returns the task index which the test should use
137--  for TID.
138--
139
140   function Task_Number (
141      TID : in     RTEMS.ID
142   ) return RTEMS.Unsigned32;
143   pragma Inline ( Task_Number );
144
145--
146--  Do_Nothing
147--
148--  DESCRIPTION:
149--
150--  This procedure is called when a test wishes to use a delay
151--  loop and insure that the compiler does not optimize it away.
152--
153
154   procedure Do_Nothing;
155
156--
157--  Ticks_Per_Second is the number of RTEMS clock ticks which
158--  occur each second.
159--
160
161   function Ticks_Per_Second
162   return RTEMS.Interval;
163
164--
165--  Milliseconds_Per_Tick is the number of milliseconds which
166--  occur between each RTEMS clock tick.
167--
168
169   function Milliseconds_Per_Tick
170   return RTEMS.Unsigned32;
171
172--
173--  Return the size of the RTEMS Workspace
174--
175
176   function Work_Space_Size
177   return RTEMS.Unsigned32;
178
179--
180--  Return an indication of whether multiprocessing is configured
181--
182
183   function Is_Configured_Multiprocessing
184   return Boolean;
185
186--
187--  Node is the node number in a multiprocessor configuration
188--
189
190   function Node
191   return RTEMS.Unsigned32;
192
193--
194--  Longest time in seconds to run a test
195--
196
197    MAXIMUM_LONG_TEST_DURATION : RTEMS.UNSIGNED32;
198
199private
200
201end Test_Support;
Note: See TracBrowser for help on using the repository browser.