function_cmd >> function_post_test 

Fuego 1.0 wiki

Login or create account

function post test

NAME [edit section]

post_test

SYNOPSIS [edit section]

post_test $TESTDIR

DESCRIPTION [edit section]

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 [edit section]

Here are some sample invocations:
    post_test $TESTDIR

When called from Jenkins or ftc context (outside of the regular base script):

    source $FUEGO_SCRIPTS_PATH/functions.sh;
    post_test $TESTDIR

ENVIRONMENT and ARGUMENTS [edit section]

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

RETURN [edit section]

Returns non-zero on error.

SOURCE [edit section]

Located in scripts/functions.sh

SEE ALSO [edit section]

TBWiki engine 1.8.3 by Tim Bird