function_test_pre_check 

Fuego 1.0 wiki

Login or create account

function test pre check

NAME [edit section]

test_pre_check

SYNOPSIS [edit section]

  • test_pre_check

DESCRIPTION [edit section]

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, before any other test operations have occurred (but after the connection to the target is established).

Commonly called functions or programs [edit section]

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
  • is_on_target - used to verify that a program or file needed for this test is on the target device

EXAMPLES [edit section]

Some sample contents are:
    function test_pre_check {
        assert_define FUNCTIONAL_BC_EXPR
        assert_define FUNCTIONAL_BC_RESULT
        is_on_target bc BC_PROGRAM /bin:/usr/bin:/usr/local/bin
        assert_define BC_PROGRAM
    }

ENVIRONMENT and ARGUMENTS [edit section]

A number of environment variables are set (see Core interfaces and Variables)

There are no arguments to this function.

RETURN [edit section]

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 [edit section]

Located in the base script for each test. The base test scripts are located in /home/jenkins/fuego/engine/tests/<test_name>.

An example path would be: /home/jenkins/fuego/engine/tests/Functional.hello_world/hello_world.sh

SEE ALSO [edit section]

TBWiki engine 1.8.3 by Tim Bird