FrontPage 

Fuego wiki

Login or create account

function pre test in split format

NAME [edit section]

= NAME =
pre_test

SYNOPSIS [edit section]

= SYNOPSIS =
 * pre_test <test_name>

DESCRIPTION [edit section]

= DESCRIPTION =
Perform setup and other operations needed on the host and target, before executing a test.  This corresponds to the 'pre_test' phase.  Note that
the phase 'pre_check' is nested inside 'pre_test'.
It does the following, in sequence: * set SSHPASS (from $PASSWORD) * if $TARGET_SETUP_LINK is defined, execute it * if $Target_PreCleanup flag is true, call target_cleanup() * if test_pre_check is defined, call it * test the connection to the target (by running 'true' on the target) * create the log directories on the host * get the firmware version from the target * run ov_rootfs_state * remove the test directories (in $BOARD_TESTDIR and /tmp) on the target * note that this removes just this test's prior directories, if any, on the target. If $Target_Cleanup is not true, and there are directories from other tests on the target, they are left alone. * log the test name * get the 'before' syslogs * flush filesystem buffers and drop filesystem caches
It does the following, in sequence:
 * set SSHPASS (from $PASSWORD)
 * if $TARGET_SETUP_LINK is defined, execute it
 * if $Target_PreCleanup flag is true, call target_cleanup()
 * if test_pre_check is defined, call it
 * test the connection to the target (by running 'true' on the target)
 * create the log directories on the host
 * get the firmware version from the target
 * run ov_rootfs_state
 * remove the test directories (in $BOARD_TESTDIR and /tmp) on the target
   * note that this removes just this test's prior directories, if any, on the target.  If $Target_Cleanup is not true, and there are directories from other tests on the target, they are left alone.
 * log the test name
 * get the 'before' syslogs
 * flush filesystem buffers and drop filesystem caches

EXAMPLES [edit section]

= EXAMPLES =
Here are some sample invocations:
{{{#!YellowBox
 pre_test $TESTDIR
}}}
= ENVIRONMENT and ARGUMENTS =
$1 is the base name of the test (e.g. Functional.hellO_world).  This is usually passed in as $TESTDIR by the caller.
Variables also used by pre_test are: * $TESTDIR * $JOB_NAME * $PASSWORD * $TARGET_SETUP_LINK * $Target_Cleanup * $Device * $TRANSPORT * $FUEGO_LOGS_PATH * $FWVER * $BOARD_TESTDIR
Variables also used by pre_test are:
 * $TESTDIR
 * $JOB_NAME
 * $PASSWORD
 * $TARGET_SETUP_LINK
 * $Target_Cleanup
 * $Device
 * $TRANSPORT
 * $FUEGO_LOGS_PATH
 * $FWVER
 * $BOARD_TESTDIR

RETURN [edit section]

= RETURN =
Returns non-zero on error.

SOURCE [edit section]

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

SEE ALSO [edit section]

test_pre_check, target_cleanup, ov_rootfs_state, firmware, ov_logger, dump_syslogs, ov_rootfs_sync, ov_rootfs_drop_caches
= SEE ALSO =
 * [[function_test_pre_check|test_pre_check]], [[function_target_cleanup|target_cleanup]], [[function_ov_rootfs_state|ov_rootfs_state]], [[function_firmware|firmware]], [[function_ov_logger|ov_logger]], [[function_dump_syslogs|dump_syslogs]],
[[function_ov_rootfs_sync|ov_rootfs_sync]], [[function_ov_rootfs_drop_caches|ov_rootfs_drop_caches]]
TBWiki engine 1.8.3 by Tim Bird