|
|
= NAME =post_test
|
|
|
= SYNOPSIS =post_test $TESTDIR
|
|
|
= DESCRIPTION =This function does the post-processing phase of the test. This includesretrieving 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 byftc, or by a trap handler in the base script. It is calledafter the test has finished (or after it has been interrupted).
|
It may be called via a separate invocation by the Jenkins job, or byftc, or by a trap handler in the base script. It is calledafter 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 generatedwhen 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 generatedwhen 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 =Here are some sample invocations:{{{#!YellowBoxpost_test $TESTDIR}}}
|
|
When called from Jenkins or ftc context (outside of the regular base script):{{{#!YellowBoxsource $FUEGO_SCRIPTS_PATH/functions.sh;post_test $TESTDIR}}}
|
When called from Jenkins or ftc context (outside of the regular base script):{{{#!YellowBoxsource $FUEGO_SCRIPTS_PATH/functions.sh;post_test $TESTDIR}}}
|
|
|
= 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 =Returns non-zero on error.
|
|
|
= SOURCE =Located in ''scripts/functions.sh''
|
|
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]]
|