source: rtems/c/src/ada-tests/support/test_support.ads @ 23848bbd

4.104.114.95
Last change on this file since 23848bbd was 23848bbd, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 1, 2007 at 10:58:09 PM

2007-10-01 Joel Sherrill <joel.sherrill@…>

  • mptests/mp01/mptest.adb, mptests/mp01/mptest.ads, mptests/mp01/node1/Makefile.am, mptests/mp02/mptest.adb, mptests/mp02/mptest.ads, mptests/mp03/mptest.adb, mptests/mp03/mptest.ads, mptests/mp04/mptest.adb, mptests/mp04/mptest.ads, mptests/mp05/mptest.adb, mptests/mp05/mptest.ads, mptests/mp06/mptest.adb, mptests/mp06/mptest.ads, mptests/mp07/mptest.adb, mptests/mp07/mptest.ads, mptests/mp08/mptest.adb, mptests/mp08/mptest.ads, mptests/mp09/mptest.adb, mptests/mp09/mptest.ads, mptests/mp10/mptest.adb, mptests/mp10/mptest.ads, mptests/mp11/mptest.adb, mptests/mp11/mptest.ads, mptests/mp12/mptest.adb, mptests/mp12/mptest.ads, mptests/mp13/mptest.adb, mptests/mp13/mptest.ads, mptests/mp14/mptest.adb, mptests/mp14/mptest.ads, support/init.c, support/test_support.adb, support/test_support.ads: Most of single processor Ada tests now build. Some run.
  • Property mode set to 100644
File size: 3.6 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-1997.
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 Interfaces; use Interfaces;
24with RTEMS;
25with Text_IO;
26
27package Test_Support is
28
29--
30--  Fatal_Directive_Status
31--
32--  DESCRIPTION:
33--
34--  This subprogram checks if Status is equal to Desired.  If so, it
35--  returns immediately.  Otherwise, it prints the Message along with
36--  the Status and Desired status and invokes the Fatal_Error_Occurred
37--  directive.
38--
39
40   procedure Fatal_Directive_Status (
41      Status  : in     RTEMS.Status_Codes;
42      Desired : in     RTEMS.Status_Codes;
43      Message : in     STRING
44   );
45   pragma Inline ( Fatal_Directive_Status );
46
47--  Directive_Failed
48--
49--  DESCRIPTION:
50--
51--  This subprogram checks if Status is equal to Successful.  If so, it
52--  returns immediately.  Otherwise, it prints the Message along with
53--  the Status and Desired status and invokes the Fatal_Error_Occurred
54--
55
56   procedure Directive_Failed (
57      Status  : in     RTEMS.Status_Codes;
58      Message : in     STRING
59   );
60   pragma Inline ( Directive_Failed );
61
62--
63--  Print_Time
64--
65--  DESCRIPTION:
66--
67--  This subprogram prints the Prefix string, following by the
68--  time of day in Time_Buffer, followed by the Suffix.
69--
70
71   procedure Print_Time (
72      Prefix      : in     STRING;
73      Time_Buffer : in     RTEMS.Time_Of_Day;
74      Suffix      : in     STRING
75   );
76   pragma Inline ( Print_Time );
77
78--
79--  Put_Dot
80--
81--  DESCRIPTION:
82--
83--  This subprogram prints a single character without a carriage return.
84--
85
86   procedure Put_Dot ( 
87      Buffer : in     STRING
88   );
89   pragma Inline ( Put_Dot );
90
91--
92--  Pause
93--
94--  DESCRIPTION:
95--
96--  This subprogram is used to pause screen output in the Test Suites
97--  until the user presses carriage return.
98--
99
100   procedure Pause;
101
102--
103--  Pause_And_Screen_Number
104--
105--  DESCRIPTION:
106--
107--  This subprogram is used to pause screen output  and print the current
108--  number in the Test Suites until the user presses carriage return.
109--
110
111   procedure Pause_And_Screen_Number (
112      SCREEN : in     RTEMS.Unsigned32
113   );
114
115--
116--  Put_Name
117--
118--  DESCRIPTION:
119--
120--  This subprogram prints the RTEMS object Name.  If New_Line is TRUE,
121--  then a carriage return is printed after the Name.
122--
123
124   procedure Put_Name (
125      Name     : in     RTEMS.Name;
126      New_Line : in     Boolean
127   );
128 
129--
130--  Task_Number
131--
132--  DESCRIPTION:
133--
134--  This function returns the task index which the test should use
135--  for TID.
136--
137
138   function Task_Number (
139      TID : in     RTEMS.ID
140   ) return RTEMS.Unsigned32;
141   pragma Inline ( Task_Number );
142
143--
144--  Do_Nothing
145--
146--  DESCRIPTION:
147--
148--  This procedure is called when a test wishes to use a delay
149--  loop and insure that the compiler does not optimize it away.
150--
151
152   procedure Do_Nothing;
153
154--
155--  Ticks_Per_Second is the number of RTEMS clock ticks which
156--  occur each second.
157--
158
159   function Ticks_Per_Second 
160   return RTEMS.Interval; 
161
162--
163--  Milliseconds_Per_Tick is the number of milliseconds which
164--  occur between each RTEMS clock tick.
165--
166
167   function Milliseconds_Per_Tick 
168   return RTEMS.Unsigned32;
169
170--
171--  Node is the node number in a multiprocessor configuration
172--
173
174   function Node 
175   return RTEMS.Unsigned32;
176
177--
178--  Longest time in seconds to run a test
179--
180
181    MAXIMUM_LONG_TEST_DURATION : RTEMS.UNSIGNED32;
182
183private
184
185end Test_Support;
Note: See TracBrowser for help on using the repository browser.