FrontPage 

Fuego wiki

Login or create account

function fail check cases in split format

NAME [edit section]

= NAME =
fail_check_cases

SYNOPSIS [edit section]

= SYNOPSIS =
fail_check_cases

DESCRIPTION [edit section]

= DESCRIPTION =
Search the test log for a given number of failure patterns, and abort
with a message if the patterns are found.
The test name ($JOBNAME) is used in the construction of a set of environment variables that are used to detect failures in the logs from data specified by test specs.
The test name ($JOBNAME) is used in the construction of a set of 
environment variables that are used to detect failures in the logs
from data specified by test specs.
If the testname was "Functional.hello", fail_check_cases would check for: * $FUNCTIONAL_HELLO_FAIL_CASE_COUNT
If the testname was "Functional.hello", fail_check_cases would check for:
 * $FUNCTIONAL_HELLO_FAIL_CASE_COUNT
if this were '2', then fail_check_cases would check for: * $FUNCTIONAL_HELLO_FAIL_PATTERN_0 * $FUNCTIONAL_HELLO_FAIL_0_SYSLOG * $FUNCTIONAL_HELLO_FAIL_MESSAGE_0 * $FUNCTIONAL_HELLO_FAIL_PATTERN_1 * $FUNCTIONAL_HELLO_FAIL_1_SYSLOG * $FUNCTIONAL_HELLO_FAIL_MESSAGE_1
if this were '2', then fail_check_cases would check for:
 * $FUNCTIONAL_HELLO_FAIL_PATTERN_0
 * $FUNCTIONAL_HELLO_FAIL_0_SYSLOG
 * $FUNCTIONAL_HELLO_FAIL_MESSAGE_0
 * $FUNCTIONAL_HELLO_FAIL_PATTERN_1
 * $FUNCTIONAL_HELLO_FAIL_1_SYSLOG
 * $FUNCTIONAL_HELLO_FAIL_MESSAGE_1
The FAIL_PATTERN is a grep regular expression to check for in a log file.
The FAIL_PATTERN is a grep regular expression to check for in a log file.
The FAIL_{$n}_SYSLOG variable is non-empty if the pattern should also be checked for in the system log captured during the test. If this is not defined, then the pattern will only be checked for in the test log.
The FAIL_{$n}_SYSLOG variable is non-empty if the pattern
should also be checked for in the system log captured during 
the test.  If this is not defined,
then the pattern will only be checked for in the test log.
If one of the patterns is found, then the related message is printed and the test is aborted with the abort_job function.
If one of the patterns is found, then the related message is printed
and the test is aborted with the [[function_abort_job|abort_job]] function.
If the 'CASE_COUNT' variable is not defined, then this routine does nothing.
If the 'CASE_COUNT' variable is not defined, then this routine does nothing.
The fail cases are defined in the test spec file for the test.
The fail cases are defined in the test spec file for the test.

EXAMPLES [edit section]

= EXAMPLES =
Here are some sample invocations:
{{{#!YellowBox
fail_check_cases
}}}

ENVIRONMENT and ARGUMENTS [edit section]

= ENVIRONMENT and ARGUMENTS =
This function uses the following variables:
 * $FUEGO_LOGS_PATH
 * $JOB_NAME
 * $NODE_NAME
 * $BUILD_ID
 * $BUILD_NUMBER

RETURN [edit section]

= RETURN =
Returns non-zero on error.

SOURCE [edit section]

= SOURCE =
Located in ''scripts/functions.sh''

SEE ALSO [edit section]

post_test, Test Specs and Plans
= SEE ALSO =
 * [[function_post_test|post_test]], [[Test Specs and Plans]]
TBWiki engine 1.8.3 by Tim Bird