FrontPage 

Fuego 1.0 wiki

Login or create account

function post test in split format

NAME [edit section]

= NAME =
post_test

SYNOPSIS [edit section]

= SYNOPSIS =
post_test $TESTDIR

DESCRIPTION [edit section]

= DESCRIPTION =
This function does the post-processing phase of the test.  This includes
retrieving the test logs, and cleaning up after the test by killing any outstanding processes and removing the test and log directories.
It may be called via a separate invocation by the Jenkins job, or by ftc, or by a trap handler in the base script. It is called after the test has finished (or after it has been interrupted).
It may be called via a separate invocation by the Jenkins job, or by
ftc, or by a trap handler in the base script.  It is called
after the test has finished (or after it has been interrupted).
Because it may be called in a new context, it needs to re-setup the functions and environment from the test. It does this by source-ing the _prolog.sh file that was generated when the test was run, and the params.sh file.
Because it may be called in a new context,
it needs to re-setup the functions and environment from the test.
It does this by source-ing the _prolog.sh file that was generated
when the test was run, and the params.sh file.
A rough sequence of actions that are performed is: * check that the test directory ($1) is not empty * call test_cleanup, if present * kill some processes, if still running * create the 'after' system log * get the system logs from the target (both the 'before' and 'after' logs) * remove the test and log directories * log (locally) that the test is finished * compare the system logs * fail_check_cases?
A rough sequence of actions that are performed is:
 * check that the test directory ($1) is not empty
 * call test_cleanup, if present
   * kill some processes, if still running
 * create the 'after' system log
 * get the system logs from the target (both the 'before' and 'after' logs)
 * remove the test and log directories
 * log (locally) that the test is finished
 * compare the system logs
 * fail_check_cases?

EXAMPLES [edit section]

= EXAMPLES =
Here are some sample invocations:
{{{#!YellowBox
post_test $TESTDIR
}}}
When called from Jenkins or ftc context (outside of the regular base script): {{{#!YellowBox source $FUEGO_SCRIPTS_PATH/functions.sh; post_test $TESTDIR }}}
When called from Jenkins or ftc context (outside of the regular base script):
{{{#!YellowBox
source $FUEGO_SCRIPTS_PATH/functions.sh;
post_test $TESTDIR
}}}

ENVIRONMENT and ARGUMENTS [edit section]

= ENVIRONMENT and ARGUMENTS =
This function takes the following arguments:
 * $1 test directory (always $TESTDIR)
This function uses the following variables: * $FUEGO_ENGINE_PATH * $NODE_NAME * $FEUGO_SCRIPTS_PATH
This function uses the following variables:
 * $FUEGO_ENGINE_PATH
 * $NODE_NAME
 * $FEUGO_SCRIPTS_PATH

RETURN [edit section]

= RETURN =
Returns non-zero on error.

SOURCE [edit section]

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

SEE ALSO [edit section]

is_empty, test_cleanup, dump_syslogs, get, ov_logger, syslog_cmp, file_check_cases
= SEE ALSO =
 * [[function_is_empty|is_empty]], [[function_test_cleanup|test_cleanup]], [[function_dump_syslogs|dump_syslogs]], [[function_get|get]], [[function_ov_logger|ov_logger]], [[function_syslog_cmp|syslog_cmp]], [[function_fail_check_cases|file_check_cases]]
TBWiki engine 1.8.3 by Tim Bird