function fail check cases in 'raw' format
= NAME = fail_check_cases = SYNOPSIS = fail_check_cases = 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. 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 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. 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. The fail cases are defined in the test spec file for the test. = EXAMPLES = Here are some sample invocations: {{{#!YellowBox fail_check_cases }}} = ENVIRONMENT and ARGUMENTS = This function uses the following variables: * $FUEGO_LOGS_PATH * $JOB_NAME * $NODE_NAME * $BUILD_ID * $BUILD_NUMBER = RETURN = Returns non-zero on error. = SOURCE = Located in ''scripts/functions.sh'' = SEE ALSO = * [[function_post_test|post_test]], [[Test Specs and Plans]]