DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦8f40ce2aa⟧ Ada Source

    Length: 15360 (0x3c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Tms, seg_028b9b

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Execution_Result;

package Tms is
  --
  -- The TMS package is the primary user interface for accessing
  -- the Test_Run data from user Drivers and special routines
  -- (such as pre-condition and test_epilog routines).
  -- Routines are also provided to get the full path to associated
  -- TMS objects and to set the execution context for tests.
  --

  subtype Test_Result is Execution_Result.Object;
  --
  -- This subtype is used for registration and determination of test
  -- results.
  --


  -------------------------------------------------------------------------
  -- The following functions each return a constant value that can be
  -- specified as the result of a test case or compared with a test
  -- case's result using the Tms.Is_Equal function.
  --

  function Pass return Test_Result;

  function Fail return Test_Result;

  function Fail_With_Exception return Test_Result;

  function Timeout return Test_Result;

  -------------------------------------------------------------------------

  function Is_Equal (L, R : Test_Result) return Boolean;
  --
  -- Compares two test case results (or a test case result and a Pass,
  -- Fail, Fail_With_Exception, or Timeout value) and returns a boolean
  -- result.
  --
  -- L, R:
  --   Either or both can be the result of a test case (obtained from
  --   Get_Test_Case_Result or Prior_Test_Case_Result) or the value
  --   returned by one of the following Package Tms functions:
  --
  --   * Pass
  --   * Fail
  --   * Fail_With_Exception
  --   * Timeout
  --
  -- return Boolean:
  --   True indicates that the two parameters to Is_Equal were the same;
  --   False indicates otherwise.
  --

  -------------------------------------------------------------------------

  procedure Register_Result (The_Result     : Tms.Test_Result;
                             Test_Run_Name  : String := "<CURRENT TEST RUN>";
                             Test_Case_Name : String := "<CURRENT TEST CASE>");
  --
  -- Allows the registration of test run results. This is usually done
  -- in one of two different places:
  --
  -- * In a test driver or evaluation action routine; the result is
  --   determined programmatically, and registered using
  --   Tms.Register_Result.
  --
  -- * From the command line; the result of the test case is determined
  --   by inspection (typically, after the test script has completed), and
  --   the result registered by executing this command from a command
  --   window.
  --
  -- The following results are allowed (all are defined in Package Tms):
  --
  -- * Pass
  -- * Fail
  -- * Fail_With_Exception
  -- * Timeout
  --
  -- The_Result:
  --   This parameter is used to specify the result of the test case;
  --   Pass, Fail, Fail_With_Exception, or Timeout.
  --
  -- Test_Run_Name:
  --   Specifies the name of the test run file that contains the test case
  --   of interest. This name is resolved relative to the Test_Run_Loc
  --   entry in the test context file. If no such entry exists, or there
  --   is no test context file specified in the Testmate.Test_Context
  --   library switch, this parameter is resolved relative to the current
  --   execution context.
  --
  --   A lock error will result if the Test_Run_Name explicitly indicates
  --   the current test run.  To set the results of a test case within the
  --   current run, set this parameter to its default value,
  --   "<CURRENT TEST RUN>".
  --
  -- Test_Case_Name:
  --   This parameter is used to specify the name of the test case who's
  --   results are to be registered. The test case is referenced in the
  --   test run file specified by the Test_Run_Name parameter. If this
  --   parameter is set to its default value, "<CURRENT TEST CASE>", the
  --   results of the current test case will be set.
  --


  ----------------------------------------------------------------------
  -- This section contains routines that allow you to resolve simple
  -- filenames against the current TestMate context file.
  --

  type Context_Location is
   (None, Test_Run_Library, Test_Case_Library, Test_Set_Library,
    Subject_Program_Library, Test_Driver_Library, Input_Data_Library,
    Expected_Output_Library, Test_Output_Library,
    Test_Log_Library, Test_Script_Library, Attached_Info_Library);

  --
  -- Defines the distinct locations that can be identified through the
  -- test context file. Each location can resolve to a separate library;
  -- some or all may resolve to the same library.
  --

  function Library_Name (The_Location : Context_Location) return String;

  --
  -- Library_Name returns a string containing the absolute pathname to
  -- the specified library. The file is resolved relative to the entry
  -- in the test context file indicated by the The_Location parameter.
  --
  -- The_Location:
  --   The location in the test context file that identifies the desired
  --   library. If there is no such entry in the context file, or there is
  --   no context file specified in the Testmate.Test_Context library
  --   switch, the returned pathname is to the library that encloses the
  --   current execution context.
  --
  -- return String:
  --   The absolute pathname of the file specified by the
  --   With_Relative_Name parameter resolved relative to the
  --   Output_Data_Loc entry in the test context file.
  --

  function Full_Name
            (With_Relative_Name : String; The_Location : Context_Location)
            return String;

  --
  -- Given a relative filename, Full_Name resolves the file and returns
  -- a string containing the absolute pathname to the file. The file is
  -- resolved relative to the entry in the test context file specified
  -- by the The_Location parameter.
  --
  -- With_Relative_Name:
  --   The relative name of the file to be resolved relative to the test
  --   context file entry corresponding to the The_Location parameter.
  --
  -- The_Location:
  --   The location in the test context file against which the relative
  --   name is to be resolved.  Relative names that are to be resolved
  --   against the Input_Data_Loc or Output_Data_Loc context file entries
  --   can also be resolved using the Full_Input_Name and Full_Output_Name
  --   functions, respectively.
  --
  --   If the specified entry in the test context file does not exist, or
  --   there is no test context file specified in the
  --   Testmate.Test_Context library switch, the With_Relative_Name file
  --   will be resolved relative to the current execution context.
  --
  -- return String:
  --   The absolute pathname of the file specified by the
  --   With_Relative_Name parameter resolved relative to the test context
  --   file corresponding to the The_Location parameter.
  --

  function Full_Input_Name
            (With_Relative_Name : String;
             The_Location       : Context_Location := Input_Data_Library)
            return String renames Full_Name;

  --
  -- Given a relative filename, Full_Input_Name resolves the file and
  -- returns a string containing the absolute pathname to the file. The
  -- file is resolved relative to the Input_Data_Loc entry in the test
  -- context file.
  --
  -- With_Relative_Name:
  --   The relative name of the file to be resolved relative to the
  --   Input_Data_Loc entry in the test context file.
  --
  -- The_Location:
  --   The location in the test context file against which the relative
  --   name is to be resolved.  This parameter defaults to
  --   Input_Data_Library; if you need to resolve the file relative to
  --   another location in the test context file, see TMS.Full_Name. If
  --   there is no Input_Data_Loc entry in the context file, or there is
  --   no context file specified in the Testmate.Test_Context library
  --   switch, the file is resolved relative to the current execution
  --   context.
  --
  -- return String:
  --   The absolute pathname of the file specified by the
  --   With_Relative_Name parameter resolved relative to the
  --   Input_Data_Loc entry in the test context file.
  --

  function Full_Output_Name
            (With_Relative_Name : String;
             The_Location       : Context_Location := Test_Output_Library)
            return String renames Full_Name;
  --
  -- Given a relative filename, Full_Output_Name resolves the file and
  -- returns a string containing the absolute pathname to the file. The
  -- file is resolved relative to the Output_Data_Loc entry in the test
  -- context file.
  --
  -- With_Relative_Name:
  --   The relative name of the file to be resolved relative to the
  --   Output_Data_Loc entry in the test context file.
  --
  -- The_Location:
  --   The location in the test context file against which the relative
  --   name is to be resolved.  This parameter defaults to
  --   Output_Data_Library; if you need to resolve the file relative to
  --   another location in the test context file, see TMS.Full_Name. If
  --   there is no Output_Data_Loc entry in the context file, or there is
  --   no context file specified in the Testmate.Test_Context library
  --   switch, the file is resolved relative to the current execution
  --   context.
  --
  -- return String:
  --   The absolute pathname of the file specified by the
  --   With_Relative_Name parameter resolved relative to the
  --   Output_Data_Loc entry in the test context file.
  --

  ----------------------------------------------------------------------
  -- The routines in this section are used to determine test case
  -- results.
  --

  function Number_Of_Tests (With_Result : Test_Result) return Natural;

  --
  -- This function is used to determine how many test cases have already
  -- completed with the specified status. This can be used, for example,
  -- to terminate test script execution after a specified number of
  -- failures have occurred.
  --
  -- With_Result:
  -- The status of the tests that are to be counted.
  --
  -- return Natural:
  -- The number of tests that have executed up to this point with the
  -- specified status.
  --

  function Prior_Test_Case_Result return Test_Result;

  --
  -- Prior_Test_Case_Result is similar to Get_Test_Case_Result; it is
  -- used to obtain the results of the previously-executed test case in
  -- the current test run. This function is primarily used to
  -- conditionally execute test cases based on the results of the
  -- previous test case (see the Pre_Condition component of the test
  -- case file). The sequence of test case execution is determined by
  -- their ordering in the test set from which the test script was
  -- generated.
  --
  -- return Test_Result:
  -- The result of the previous test case. This result can be evaluated
  -- using the IS_EQUAL function.
  --

  function Get_Test_Case_Result
            (Test_Run_Name  : String := "<CURRENT TEST RUN>";
             Test_Case_Name : String := "<CURRENT TEST CASE>")
            return Test_Result;
  --
  -- Get_Test_Case_Result is used to obtain the results of a
  -- previously-executed test case, either from the current or a
  -- different test run. This function is primarily used to
  -- conditionally execute test cases based on the results of one or
  -- more previous test cases (see the Pre_Condition component of the
  -- test case file).
  --
  -- Test_Run_Name:
  --   Specifies the name of the test run file that contains the test case
  --   of interest. This name is resolved relative to the Test_Run_Loc
  --   entry in the test context file. If no such entry exists, or there
  --   is no test context file specified in the Testmate.Test_Context
  --   library switch, this parameter is resolved relative to the current
  --   execution context.
  --
  --   A lock error will result if the Test_Run_Name indicates the current
  --   test run by name.  To obtain the results of a test case in the
  --   current run, set the Test_Run_Name parameter to
  --   "<CURRENT TEST RUN>".
  --
  -- Test_Case_Name:
  --   This parameter is used to specify the name of the test case who's
  --   results are desired.  The test case is referenced in the test run
  --   file specified by the Test_Run_Name parameter. If this parameter is
  --   set to its default value, "<CURRENT TEST CASE>", the results of the
  --   current test case will be returned.
  --
  -- return Test_Result:
  --   The result of the specified test case. This result can be evaluated
  --   using the IS_EQUAL function.
  --


  ------------------------------------------------------------------------

  function Coverage_Analyzer_Params return String;
  --
  -- Returns the contents of the Coverage_Analyzer_Params component of
  -- the current test case file.
  --
  -- return String:
  --   The returned string contains the contents of the
  --   Coverage_Analyzer_Params component of the current test case.
  --

  ------------------------------------------------------------------------
  -- The routines in this section provide access to the contents of the
  -- script execution control file.  Each function returns the value of
  -- the appropriate component.
  --

  function User_Controls return String;

  function Overall_Clock_Time return Duration;

  function Overall_Cpu_Time return Duration;

  function Max_Clock_Per_Test return Duration;

  function Max_Cpu_Per_Test return Duration;

  function Max_Number_Of_Failures return Natural;

  function Terminate_On_Unhandled_Exception return Boolean;

end Tms;

E3 Meta Data

    nblk1=e
    nid=0
    hdr6=1c
        [0x00] rec0=22 rec1=00 rec2=01 rec3=00e
        [0x01] rec0=1b rec1=00 rec2=02 rec3=02c
        [0x02] rec0=1b rec1=00 rec2=03 rec3=008
        [0x03] rec0=14 rec1=00 rec2=04 rec3=060
        [0x04] rec0=19 rec1=00 rec2=05 rec3=010
        [0x05] rec0=17 rec1=00 rec2=06 rec3=04e
        [0x06] rec0=15 rec1=00 rec2=07 rec3=034
        [0x07] rec0=15 rec1=00 rec2=08 rec3=06e
        [0x08] rec0=19 rec1=00 rec2=09 rec3=070
        [0x09] rec0=18 rec1=00 rec2=0a rec3=00c
        [0x0a] rec0=19 rec1=00 rec2=0b rec3=028
        [0x0b] rec0=15 rec1=00 rec2=0c rec3=038
        [0x0c] rec0=19 rec1=00 rec2=0d rec3=020
        [0x0d] rec0=1d rec1=00 rec2=0e rec3=000
    tail 0x21521353a83c55e46dde8 0x42a00044462022803