Home | Trees | Index | Help |
---|
|
object --+ | extension.Extension --+ | runnable.Runnable --+ | test.Test --+ | dejagnu_base.DejaGNUBase --+ | dejagnu_test.DejaGNUTest --+ | DGTest
A 'DGTest' is a test using the DejaGNU 'dg' driver.
This test class emulates the 'dg.exp' source file in the DejaGNU distribution.
|
|||
DGException | The exception class raised by 'DGTest'. | ||
Inherited from Inherited from Inherited from Inherited from |
|
|||
_RunDGTest(self,
tool_flags,
default_options,
context,
result,
path=None,
default_kind=None,
keep_output=None)
Run a 'dg' test. |
|||
_RunDGToolPortion(self,
path,
tool_flags,
context,
result)
Perform the tool-running portions of a DG test. |
|||
_RunDGExecutePortion(self,
file,
context,
result)
Perform the executable-running portions of a DG test. |
|||
_ExecuteFinalCommand(self,
command,
args,
context,
result)
Run a command specified with 'dg-final'. |
|||
_PruneOutput(self,
output)
Remove unintersting messages from 'output'. |
|||
_RunTool(self,
path,
kind,
options,
context,
result)
Run the tool being tested. |
|||
_DGdo(self,
line_num,
args,
context)
Emulate the 'dg-do' command. |
|||
_DGfinal(self,
line_num,
args,
context)
Emulate the 'dg-final' command. |
|||
_DGoptions(self,
line_num,
args,
context)
Emulate the 'dg-options' command. |
|||
_DGbogus(self,
line_num,
args,
context)
Emulate the 'dg-bogus' command. |
|||
_DGwarning(self,
line_num,
args,
context)
Emulate the 'dg-warning' command. |
|||
_DGerror(self,
line_num,
args,
context)
Emulate the 'dg-error' command. |
|||
_DGexcess_errors(self,
line_num,
args,
context)
Emulate the 'dg-excess-errors' command. |
|||
__ExpectDiagnostic(self,
kind,
line_num,
args,
context)
Register an expected diagnostic. |
|||
_ParseTargetSelector(self,
selector,
context)
Parse the target 'selector'. |
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
__dg_command_regexp | A regular expression matching commands embedded in the source file. | ||
KIND_PREPROCESS | |||
KIND_COMPILE | |||
KIND_ASSEMBLE | |||
KIND_LINK | |||
KIND_RUN | |||
keep_output | |||
_default_kind | The default test kind. | ||
__test_kinds | The kinds of tests supported by 'dg.exp'. | ||
__DIAG_BOGUS | |||
__DIAG_ERROR | |||
__DIAG_WARNING | |||
__diagnostic_descriptions | A map from dg diagnostic kinds to descriptive strings. | ||
_argument_dictionary | |||
_argument_list | |||
Inherited from Inherited from Inherited from Inherited from Inherited from |
|
Run a 'dg' test. 'tool_flags' -- A list of strings giving a set of options to be provided to the tool being tested. 'default_options' -- A list of strings giving a default set of options to be provided to the tool being tested. These options can be overridden by an embedded 'dg-options' command in the test itself. 'context' -- The 'Context' in which this test is running. 'result' -- The 'Result' of the test execution. 'path' -- The path to the test file. If 'None', the main test file path is used. 'default_kind' -- The kind of test to perform. If this value is 'None', then 'self._default_kind' is used. 'keep_output' -- True if the output file should be retained after the test is complete. Otherwise, it is removed. This function emulates 'dg-test'. |
Perform the tool-running portions of a DG test. Calls '_RunTool' and processes its output. returns -- The filename of the generated file. |
Perform the executable-running portions of a DG test. If this is a "run" test, runs the executable generated by the tool and checks its output. |
Run a command specified with 'dg-final'. 'command' -- A string giving the name of the command. 'args' -- A list of strings giving the arguments (if any) to that command. 'context' -- The 'Context' in which this test is running. 'result' -- The 'Result' of this test. |
Remove unintersting messages from 'output'. 'output' -- A string giving the output from the tool being tested. returns -- A modified version of 'output'. This modified version does not contain tool output messages that are irrelevant for testing purposes. |
Run the tool being tested. 'path' -- The path to the test file. 'kind' -- The kind of test to perform. 'options' -- A list of strings giving command-line options to provide to the tool. 'context' -- The 'Context' for the test execution. 'result' -- The QMTest 'Result' for the test. returns -- A pair '(output, file)' where 'output' consists of any messages produced by the compiler, and 'file' is the name of the file produced by the compilation, if any. |
Emulate the 'dg-do' command. 'line_num' -- The line number at which the command was found. 'args' -- The arguments to the command, as a list of strings. 'context' -- The 'Context' in which the test is running. |
Emulate the 'dg-final' command. 'line_num' -- The line number at which the command was found. 'args' -- The arguments to the command, as a list of strings. 'context' -- The 'Context' in which the test is running. |
Emulate the 'dg-options' command. 'line_num' -- The line number at which the command was found. 'args' -- The arguments to the command, as a list of strings. 'context' -- The 'Context' in which the test is running. |
Emulate the 'dg-bogus' command. 'line_num' -- The number at which the command was found. 'args' -- The arguments to the command, as a list of strings. 'context' -- The 'Context' in which the test is running. |
Emulate the 'dg-warning' command. 'line_num' -- The number at which the command was found. 'args' -- The arguments to the command, as a list of strings. 'context' -- The 'Context' in which the test is running. |
Emulate the 'dg-error' command. 'line_num' -- The number at which the command was found. 'args' -- The arguments to the command, as a list of strings. 'context' -- The 'Context' in which the test is running. |
Emulate the 'dg-excess-errors' command. 'line_num' -- The line number at which the command was found. 'args' -- The arguments to the command, as a list of strings. 'context' -- The 'Context' in which the test is running. |
Register an expected diagnostic. 'kind' -- The kind of diagnostic expected. 'line_num' -- The number at which the command was found. 'args' -- The arguments to the command, as a list of strings. 'context' -- The 'Context' in which the test is running. |
Parse the target 'selector'. 'selector' -- A target selector. 'context' -- The 'Context' in which the test is running. returns -- For a 'target' selector, 'S' if this test should be run, or 'N' if it should not. For an 'xfail' selector, 'F' if the test is expected to fail; 'P' if if not. This function emulates dg-process-target. |
|
__dg_command_regexpA regular expression matching commands embedded in the source file.
|
KIND_PREPROCESS
|
KIND_COMPILE
|
KIND_ASSEMBLE
|
KIND_LINK
|
KIND_RUN
|
keep_output
|
_default_kindThe default test kind. This value can be overridden by a 'dg-do' command in the test file.
|
__test_kindsThe kinds of tests supported by 'dg.exp'.
|
__DIAG_BOGUS
|
__DIAG_ERROR
|
__DIAG_WARNING
|
__diagnostic_descriptionsA map from dg diagnostic kinds to descriptive strings.
|
_argument_dictionary
|
_argument_list
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 3.0alpha2 on Fri Sep 28 00:57:32 2007 | http://epydoc.sf.net |