source: rtems/testsuites/ada/support/test_support.ads @ 48aa4b5d

5
Last change on this file since 48aa4b5d was bc96f3b4, checked in by Sebastian Huber <sebastian.huber@…>, on 01/23/18 at 08:53:06

ada: Introduce RTEMS.Size type

Some time ago the Classic API object size related parameters were
changed to use size_t. Reflect this in the Ada bindings.

Update #3082.

  • Property mode set to 100644
File size: 4.1 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   procedure Check_Type(
32      t : in Long_Integer;
33      s : in Long_Integer;
34      a : in Long_Integer
35   );
36   pragma Import (C, Check_Type, "check_type");
37
38--
39--  Fatal_Directive_Status
40--
41--  DESCRIPTION:
42--
43--  This subprogram checks if Status is equal to Desired.  If so, it
44--  returns immediately.  Otherwise, it prints the Message along with
45--  the Status and Desired status and invokes the Fatal_Error_Occurred
46--  directive.
47--
48
49   procedure Fatal_Directive_Status (
50      Status  : in     RTEMS.Status_Codes;
51      Desired : in     RTEMS.Status_Codes;
52      Message : in     STRING
53   );
54   pragma Inline ( Fatal_Directive_Status );
55
56--  Directive_Failed
57--
58--  DESCRIPTION:
59--
60--  This subprogram checks if Status is equal to Successful.  If so, it
61--  returns immediately.  Otherwise, it prints the Message along with
62--  the Status and Desired status and invokes the Fatal_Error_Occurred
63--
64
65   procedure Directive_Failed (
66      Status  : in     RTEMS.Status_Codes;
67      Message : in     STRING
68   );
69   pragma Inline ( Directive_Failed );
70
71--
72--  Print_Time
73--
74--  DESCRIPTION:
75--
76--  This subprogram prints the Prefix string, following by the
77--  time of day in Time_Buffer, followed by the Suffix.
78--
79
80   procedure Print_Time (
81      Prefix      : in     STRING;
82      Time_Buffer : in     RTEMS.Time_Of_Day;
83      Suffix      : in     STRING
84   );
85   pragma Inline ( Print_Time );
86
87--
88--  Put_Dot
89--
90--  DESCRIPTION:
91--
92--  This subprogram prints a single character without a carriage return.
93--
94
95   procedure Put_Dot (
96      Buffer : in     STRING
97   );
98   pragma Inline ( Put_Dot );
99
100--
101--  Pause
102--
103--  DESCRIPTION:
104--
105--  This subprogram is used to pause screen output in the Test Suites
106--  until the user presses carriage return.
107--
108
109   procedure Pause;
110
111--
112--  Pause_And_Screen_Number
113--
114--  DESCRIPTION:
115--
116--  This subprogram is used to pause screen output  and print the current
117--  number in the Test Suites until the user presses carriage return.
118--
119
120   procedure Pause_And_Screen_Number (
121      SCREEN : in     RTEMS.Unsigned32
122   );
123
124--
125--  Put_Name
126--
127--  DESCRIPTION:
128--
129--  This subprogram prints the RTEMS object Name.  If New_Line is TRUE,
130--  then a carriage return is printed after the Name.
131--
132
133   procedure Put_Name (
134      Name     : in     RTEMS.Name;
135      New_Line : in     Boolean
136   );
137 
138--
139--  Task_Number
140--
141--  DESCRIPTION:
142--
143--  This function returns the task index which the test should use
144--  for TID.
145--
146
147   function Task_Number (
148      TID : in     RTEMS.ID
149   ) return RTEMS.Unsigned32;
150   pragma Inline ( Task_Number );
151
152--
153--  Do_Nothing
154--
155--  DESCRIPTION:
156--
157--  This procedure is called when a test wishes to use a delay
158--  loop and insure that the compiler does not optimize it away.
159--
160
161   procedure Do_Nothing;
162
163--
164--  Ticks_Per_Second is the number of RTEMS clock ticks which
165--  occur each second.
166--
167
168   function Ticks_Per_Second
169   return RTEMS.Interval;
170
171--
172--  Milliseconds_Per_Tick is the number of milliseconds which
173--  occur between each RTEMS clock tick.
174--
175
176   function Milliseconds_Per_Tick
177   return RTEMS.Unsigned32;
178
179--
180--  Return the size of the RTEMS Workspace
181--
182
183   function Work_Space_Size
184   return RTEMS.Size;
185
186--
187--  Return an indication of whether multiprocessing is configured
188--
189
190   function Is_Configured_Multiprocessing
191   return Boolean;
192
193--
194--  Node is the node number in a multiprocessor configuration
195--
196
197   function Node
198   return RTEMS.Unsigned32;
199
200--
201--  Longest time in seconds to run a test
202--
203
204    MAXIMUM_LONG_TEST_DURATION : RTEMS.UNSIGNED32;
205
206private
207
208end Test_Support;
Note: See TracBrowser for help on using the repository browser.