Home | Trees | Indices | 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 |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
__dg_command_regexp = re.compile(r"{[ \t]+dg-([-a-z]+)[ \t]+(. A regular expression matching commands embedded in the source file. |
|||
KIND_PREPROCESS = "preprocess"
|
|||
KIND_COMPILE = "compile"
|
|||
KIND_ASSEMBLE = "assemble"
|
|||
KIND_LINK = "link"
|
|||
KIND_RUN = "run"
|
|||
keep_output = BooleanField(default_value= False, description=
|
|||
_default_kind = "compile" The default test kind. |
|||
__test_kinds = KIND_PREPROCESS, KIND_COMPILE, KIND_ASSEMBLE, K The kinds of tests supported by 'dg.exp'. |
|||
__DIAG_BOGUS = "bogus"
|
|||
__DIAG_ERROR = "error"
|
|||
__DIAG_WARNING = "warning"
|
|||
__diagnostic_descriptions = {__DIAG_ERROR: "errors", __DIAG_WA A map from dg diagnostic kinds to descriptive strings. |
|||
Inherited from 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.
|
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'.
|
__diagnostic_descriptionsA map from dg diagnostic kinds to descriptive strings.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:41 2011 | http://epydoc.sourceforge.net |