FrontPage 

Fuego 1.1 wiki

Login or create account

function post test in 'raw' format

= NAME =
post_test

= SYNOPSIS =
post_test $TESTDIR

= 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).

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?

= 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_CORE/engine/scripts/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:
 * $BOARD_TESTDIR
 * $BUILD_ID
 * $BUILD_NUMBER
 * $FUEGO_RW
 * $FUEGO_TARGET_TMP
 * $NODE_NAME
 * $TARGET_TEARDOWN_LINK
 * $Target_PostCleanup
 * $TESTDIR
 * $TESTHOME
 * $TESTSPEC


= RETURN =
Returns non-zero on error.

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

= 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