|
= NAME =
test_pre_check
|
|
= SYNOPSIS =
* test_pre_check
|
|
= DESCRIPTION =
This function is defined in the base test script for a test, and executes
any checks required to make sure any pre-requisites for this test are
set up and ready.
|
This function is called from pre_test (that is, during the 'pre_check' phase, before any other
test operations have occurred (but after the connection to the target is
established).
|
This function is called from [[function_pre_test|pre_test]] (that is, during the 'pre_check' phase, before any other
test operations have occurred (but after the connection to the target is
established).
|
|
== Commonly called functions or programs ==
This function can contain calls to just about any command, but there are some
common commands used for building Linux source
* assert_define - used to verify that an environment needed for this test is defined
* this is commonly used to check for test variables that should be defined in the board file or spec file (or dynamically on the command line, when the test is run)
* assert_has_program - used to verify that a required program is installed on the board
* assert_has_module - used to verify that a required module is installed on the board
|
|
= EXAMPLES =
Some sample contents are:
{{{#!YellowBox
function test_pre_check {
assert_define FUNCTIONAL_BC_EXPR
assert_define FUNCTIONAL_BC_RESULT
assert_has_program bc
}
}}}
|
Core interfaces and Variables)
|
= ENVIRONMENT and ARGUMENTS =
A number of environment variables are set (see [[Core interfaces]] and [[Variables]])
|
There are no arguments to this function.
|
There are no arguments to this function.
|
|
= RETURN =
returns non-zero for error. Usually, if there is some problem,
one of the functions called by test_pre_check will abort the current test.
|
|
= SOURCE =
Located in the base script for each test. The base test scripts are located in /fuego-core/tests/<test_name>.
|
An example path would be: /fuego-core/tests/Functional.hello_world/fuego_test.sh (inside the Docker container)
|
An example path would be: ''/fuego-core/tests/Functional.hello_world/fuego_test.sh'' (inside the Docker container)
|
pre_test, assert_define, is_on_target, is_on_target_path, is_on_sdk,
assert_has_program,
assert_has_module
|
= SEE ALSO =
* [[function_pre_test|pre_test]], [[function_assert_define|assert_define]], [[function_is_on_target|is_on_target]], [[function_is_on_target_path|is_on_target_path]], [[function_is_on_sdk|is_on_sdk]],
[[function_assert_has_program|assert_has_program]],
[[function_assert_has_module|assert_has_module]]
|