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

4.104.114.95
Last change on this file since ba3e1a4f was ba3e1a4f, checked in by Glenn Humphrey <glenn.humphrey@…>, on Oct 10, 2007 at 8:58:48 PM

2007-10-10 Glenn Humphrey <glenn.humphrey@…>

  • configure.ac, samples/base_sp/base_sp.scn, samples/base_sp/config.h, samples/base_sp/sptest.adb, samples/hello/config.h, samples/ticker/config.h, samples/ticker/ticker.scn, sptests/Makefile.am, sptests/sp01/sp01.scn, sptests/sp02/config.h, sptests/sp02/sp02.scn, sptests/sp03/config.h, sptests/sp03/sp03.scn, sptests/sp04/sp04.scn, sptests/sp04/sptest.adb, sptests/sp05/config.h, sptests/sp05/sp05.scn, sptests/sp06/config.h, sptests/sp07/config.h, sptests/sp07/sp07.scn, sptests/sp07/sptest.adb, sptests/sp07/sptest.ads, sptests/sp08/config.h, sptests/sp08/sp08.scn, sptests/sp09/Makefile.am, sptests/sp09/config.h, sptests/sp09/sp09.scn, sptests/sp09/sptest.adb, sptests/sp09/sptest.ads, sptests/sp11/config.h, sptests/sp11/sp11.scn, sptests/sp12/config.h, sptests/sp12/sp12.scn, sptests/sp13/config.h, sptests/sp13/sp13.scn, sptests/sp13/sptest.adb, sptests/sp14/config.h, sptests/sp14/sp14.scn, sptests/sp15/config.h, sptests/sp15/sp15.scn, sptests/sp16/config.h, sptests/sp16/sp16.scn, sptests/sp16/sptest.adb, sptests/sp17/config.h, sptests/sp19/config.h, sptests/sp19/sp19.scn, sptests/sp20/config.h, sptests/sp20/sp20.scn, sptests/sp22/config.h, sptests/sp22/sp22.scn, sptests/sp23/config.h, sptests/sp23/sp23.scn, sptests/sp24/config.h, sptests/sp24/sp24.scn, sptests/sp25/config.h, sptests/sp25/sp25.scn, support/init.c, support/test_support.adb, support/test_support.ads, tmtests/tm09/config.h, tmtests/tm20/tmtest.adb, tmtests/tmoverhd/dummy_rtems.adb, tmtests/tmoverhd/dummy_rtems.ads, tmtests/tmoverhd/tmtest.adb, tmtests/tmoverhd/tmtest.ads: Updated tests so that they would all compile and run without errors. Some tests that are no longer valid using the current binding were removed. Also updated the .scn files to reflect the current test output.
  • sptests/sp21/.cvsignore, sptests/sp21/Makefile.am, sptests/sp21/config.h, sptests/sp21/sp21.adb, sptests/sp21/sp21.scn, sptests/sp21/sptest.adb, sptests/sp21/sptest.ads, sptests/spsize/.cvsignore, sptests/spsize/Makefile.am, sptests/spsize/spsize.adb, sptests/spsize/sptest.adb, sptests/spsize/sptest.ads: Removed.
  • Property mode set to 100644
File size: 3.9 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-2007.
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--  Return the size of the RTEMS Workspace
172--
173
174   function Work_Space_Size
175   return RTEMS.Unsigned32;
176
177--
178--  Return an indication of whether multiprocessing is configured
179--
180
181   function Is_Configured_Multiprocessing 
182   return Boolean;
183
184--
185--  Node is the node number in a multiprocessor configuration
186--
187
188   function Node 
189   return RTEMS.Unsigned32;
190
191--
192--  Longest time in seconds to run a test
193--
194
195    MAXIMUM_LONG_TEST_DURATION : RTEMS.UNSIGNED32;
196
197private
198
199end Test_Support;
Note: See TracBrowser for help on using the repository browser.