function_post_test 

Fuego 1.2 wiki

Login

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_CORE/engine/scripts/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:

  • $BOARD_TESTDIR
  • $BUILD_ID
  • $BUILD_NUMBER
  • $FUEGO_RW
  • $FUEGO_TARGET_TMP
  • $NODE_NAME
  • $TARGET_TEARDOWN_LINK
  • $Target_PostCleanup
  • $TESTDIR
  • $TESTHOME
  • $TESTSPEC

RETURN [edit section]

Returns non-zero on error.

SOURCE [edit section]

Located in scripts/functions.sh

SEE ALSO [edit section]

FIXTHIS - 1.2 - needs documentation fixes

TBWiki engine 1.9.1 by Tim Bird