|
function pre test in split format
|
= NAME =
pre_test
|
|
= SYNOPSIS =
* pre_test <test_name>
|
|
= DESCRIPTION =
Perform setup and other operations needed on the host and target, before executing a test.
|
It does the following, in sequence:
* set SSHPASS (from $PASSWORD)
* if test_pre_check is defined, call it
* if $TARGET_SETUP_LINK is defined, execute it
* if $Target_Cleanup flag is true, call target_cleanup()
* 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 $FUEGO_HOME 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 test_pre_check is defined, call it
* if $TARGET_SETUP_LINK is defined, execute it
* if $Target_Cleanup flag is true, call target_cleanup()
* 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 $FUEGO_HOME 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 =
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:
* $JOB_NAME
* $PASSWORD
* $TARGET_SETUP_LINK
* $Target_Cleanup
* $Device
* $TRANSPORT
* $FUEGO_LOGS_PATH
* $FWVER
* $FUEGO_HOME
|
Variables also used by pre_test are:
* $JOB_NAME
* $PASSWORD
* $TARGET_SETUP_LINK
* $Target_Cleanup
* $Device
* $TRANSPORT
* $FUEGO_LOGS_PATH
* $FWVER
* $FUEGO_HOME
|
|
= RETURN =
Returns non-zero on error.
|
|
= SOURCE =
Located in ''scripts/functions.sh''
|
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]]
|
|
|