FrontPage 

Fuego wiki

Login or create account

function log this in 'raw' format

= NAME =
log_this

= SYNOPSIS =
 * log_this <test-command>

= DESCRIPTION =
This function performs the indicated command on the host, inside the
docker container, and records it's output.  Ultimately, the output is
places in the test log for this test.  This function is commonly called
by a test's [[function_test_run|test_run]] function, when it needs to record
data for a test from a command on the host.  To record data from a
command run on the board, use [[function_report|report]].

See [[Log files]] for a description of the test logs.

Note that the exit code from the command is preserved across the 'tee' used
to capture the output from the command, and used with the 'exit' statement
to have this be the return code from the 'log' operation.


= EXAMPLES =
Here are some sample invocations:
{{{#!YellowBox
    log_this "clitest ftc-tests"
}}}

= ENVIRONMENT and ARGUMENTS =
The arguments to this function are:
 * $1 - the command to execute on the host

The following variables are used:
 * LOGDIR

= RETURN =
Returns non-zero on error.

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

= SEE ALSO =
 * [[function_test_run|test_run]], [[function_report|report]], [[function_report_append|report_append]]



TBWiki engine 1.8.3 by Tim Bird