source: rtems/c/src/ada-tests/support/test_support.ads @ 3a23218

4.104.115
Last change on this file since 3a23218 was 110e1f1, checked in by Joel Sherrill <joel.sherrill@…>, on 12/14/09 at 21:17:59

2009-12-14 Joel Sherrill <joel.sherrill@…>

  • samples/base_sp/sptest.adb, samples/hello/sptest.adb, samples/nsecs/sptest.adb, samples/ticker/sptest.adb, sptests/sp01/sptest.adb, sptests/sp02/sptest.adb, sptests/sp03/sptest.adb, sptests/sp04/sptest.adb, sptests/sp05/sptest.adb, sptests/sp06/sptest.adb, sptests/sp07/sptest.adb, sptests/sp08/sptest.adb, sptests/sp09/sptest.adb, sptests/sp11/sptest.adb, sptests/sp12/sptest.adb, sptests/sp13/sptest.adb, sptests/sp14/sptest.adb, sptests/sp15/sptest.adb, sptests/sp16/sptest.adb, sptests/sp17/sptest.adb, sptests/sp19/sptest.adp, sptests/sp20/sptest.adb, sptests/sp22/sptest.adb, sptests/sp23/sptest.adb, sptests/sp24/sptest.adb, sptests/sp25/sptest.adb, sptests/spname01/spname01.adb, sptests/spname01/sptest.adb, sptests/spname01/sptest.ads, support/address_io.adb, support/init.c, support/test_support.adb, support/test_support.ads, support/time_test_support.adb, support/timer_driver.adb, tmtests/tm01/tmtest.adb, tmtests/tm01/tmtest.ads, tmtests/tm02/tmtest.adb, tmtests/tm02/tmtest.ads, tmtests/tm03/tmtest.adb, tmtests/tm03/tmtest.ads, tmtests/tm04/tmtest.adb, tmtests/tm04/tmtest.ads, tmtests/tm05/tmtest.adb, tmtests/tm05/tmtest.ads, tmtests/tm06/tmtest.adb, tmtests/tm06/tmtest.ads, tmtests/tm07/tmtest.adb, tmtests/tm07/tmtest.ads, tmtests/tm08/tmtest.adb, tmtests/tm08/tmtest.ads, tmtests/tm09/tmtest.adb, tmtests/tm09/tmtest.ads, tmtests/tm10/tmtest.adb, tmtests/tm10/tmtest.ads, tmtests/tm11/tmtest.adb, tmtests/tm11/tmtest.ads, tmtests/tm12/tmtest.adb, tmtests/tm12/tmtest.ads, tmtests/tm13/tmtest.adb, tmtests/tm13/tmtest.ads, tmtests/tm14/tmtest.adb, tmtests/tm14/tmtest.ads, tmtests/tm15/tmtest.adb, tmtests/tm15/tmtest.ads, tmtests/tm16/tmtest.adb, tmtests/tm16/tmtest.ads, tmtests/tm17/tmtest.adb, tmtests/tm17/tmtest.ads, tmtests/tm18/tmtest.adb, tmtests/tm18/tmtest.ads, tmtests/tm19/tmtest.adb, tmtests/tm19/tmtest.ads, tmtests/tm20/tmtest.adb, tmtests/tm20/tmtest.ads, tmtests/tm21/tmtest.adb, tmtests/tm21/tmtest.ads, tmtests/tm22/tmtest.adb, tmtests/tm22/tmtest.ads, tmtests/tm23/tmtest.adb, tmtests/tm23/tmtest.ads, tmtests/tm24/tmtest.adb, tmtests/tm24/tmtest.ads, tmtests/tm25/tmtest.adb, tmtests/tm25/tmtest.ads, tmtests/tm28/tmtest.adb, tmtests/tm28/tmtest.ads, tmtests/tm29/tmtest.adb, tmtests/tm29/tmtest.ads, tmtests/tmck/tmtest.adb, tmtests/tmck/tmtest.ads, tmtests/tmoverhd/dummy_rtems.adb, tmtests/tmoverhd/tmtest.adb, tmtests/tmoverhd/tmtest.ads: Remove many warnings.
  • Property mode set to 100644
File size: 3.8 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.com/license/LICENSE.
19--
20--  $Id$
21--
22
23with RTEMS;
24
25package Test_Support is
26
27--
28--  Fatal_Directive_Status
29--
30--  DESCRIPTION:
31--
32--  This subprogram checks if Status is equal to Desired.  If so, it
33--  returns immediately.  Otherwise, it prints the Message along with
34--  the Status and Desired status and invokes the Fatal_Error_Occurred
35--  directive.
36--
37
38   procedure Fatal_Directive_Status (
39      Status  : in     RTEMS.Status_Codes;
40      Desired : in     RTEMS.Status_Codes;
41      Message : in     STRING
42   );
43   pragma Inline ( Fatal_Directive_Status );
44
45--  Directive_Failed
46--
47--  DESCRIPTION:
48--
49--  This subprogram checks if Status is equal to Successful.  If so, it
50--  returns immediately.  Otherwise, it prints the Message along with
51--  the Status and Desired status and invokes the Fatal_Error_Occurred
52--
53
54   procedure Directive_Failed (
55      Status  : in     RTEMS.Status_Codes;
56      Message : in     STRING
57   );
58   pragma Inline ( Directive_Failed );
59
60--
61--  Print_Time
62--
63--  DESCRIPTION:
64--
65--  This subprogram prints the Prefix string, following by the
66--  time of day in Time_Buffer, followed by the Suffix.
67--
68
69   procedure Print_Time (
70      Prefix      : in     STRING;
71      Time_Buffer : in     RTEMS.Time_Of_Day;
72      Suffix      : in     STRING
73   );
74   pragma Inline ( Print_Time );
75
76--
77--  Put_Dot
78--
79--  DESCRIPTION:
80--
81--  This subprogram prints a single character without a carriage return.
82--
83
84   procedure Put_Dot (
85      Buffer : in     STRING
86   );
87   pragma Inline ( Put_Dot );
88
89--
90--  Pause
91--
92--  DESCRIPTION:
93--
94--  This subprogram is used to pause screen output in the Test Suites
95--  until the user presses carriage return.
96--
97
98   procedure Pause;
99
100--
101--  Pause_And_Screen_Number
102--
103--  DESCRIPTION:
104--
105--  This subprogram is used to pause screen output  and print the current
106--  number in the Test Suites until the user presses carriage return.
107--
108
109   procedure Pause_And_Screen_Number (
110      SCREEN : in     RTEMS.Unsigned32
111   );
112
113--
114--  Put_Name
115--
116--  DESCRIPTION:
117--
118--  This subprogram prints the RTEMS object Name.  If New_Line is TRUE,
119--  then a carriage return is printed after the Name.
120--
121
122   procedure Put_Name (
123      Name     : in     RTEMS.Name;
124      New_Line : in     Boolean
125   );
126 
127--
128--  Task_Number
129--
130--  DESCRIPTION:
131--
132--  This function returns the task index which the test should use
133--  for TID.
134--
135
136   function Task_Number (
137      TID : in     RTEMS.ID
138   ) return RTEMS.Unsigned32;
139   pragma Inline ( Task_Number );
140
141--
142--  Do_Nothing
143--
144--  DESCRIPTION:
145--
146--  This procedure is called when a test wishes to use a delay
147--  loop and insure that the compiler does not optimize it away.
148--
149
150   procedure Do_Nothing;
151
152--
153--  Ticks_Per_Second is the number of RTEMS clock ticks which
154--  occur each second.
155--
156
157   function Ticks_Per_Second
158   return RTEMS.Interval;
159
160--
161--  Milliseconds_Per_Tick is the number of milliseconds which
162--  occur between each RTEMS clock tick.
163--
164
165   function Milliseconds_Per_Tick
166   return RTEMS.Unsigned32;
167
168--
169--  Return the size of the RTEMS Workspace
170--
171
172   function Work_Space_Size
173   return RTEMS.Unsigned32;
174
175--
176--  Return an indication of whether multiprocessing is configured
177--
178
179   function Is_Configured_Multiprocessing
180   return Boolean;
181
182--
183--  Node is the node number in a multiprocessor configuration
184--
185
186   function Node
187   return RTEMS.Unsigned32;
188
189--
190--  Longest time in seconds to run a test
191--
192
193    MAXIMUM_LONG_TEST_DURATION : RTEMS.UNSIGNED32;
194
195private
196
197end Test_Support;
Note: See TracBrowser for help on using the repository browser.