function_test_deploy 

Fuego wiki

Login or create account

function test deploy

NAME [edit section]

test_deploy

SYNOPSIS [edit section]

Deploys the test program to the target

DESCRIPTION [edit section]

This function is defined in the base test script for a test, and executes those commands required to deploy the (recently built) test program to the target.

When this function starts, the source code for the test program has been built, and the current directory is the root directory where the source is located (in /fuego-rw/buildzone/<test_name-platform_name/>

The usual operation is to call 'put' to move the test program to the target, but if there are auxiliary programs, scripts or data files, sometimes it is necessary to create an archive on the host, send it to the target, and unpack it on the target.

Test materials should be put in the directory $BOARD_TESTDIR/fuego.$TESTDIR on the target.

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
  • put - used to put a file or multiple files on the target
  • tar - used to archive multiple files on the host
  • cmd - used to execute other commands, in preparation for test execution, on the target

EXAMPLES [edit section]

Some sample contents are:
    function test_deploy {
        put hello $BOARD_TESTDIR/fuego.$TESTDIR
    }

    function test_deploy {
        put {sample*,run-tests.sh} $BOARD_TESTDIR/fuego.$TESTDIR
    }

    function test_deploy {
        tar cf XML-Test-Suite.tar XML-Test-Suite/
        put -r XML-Test-Suite.tar tests/.libs/* tests/xmltest.sh  $BOARD_TESTDIR/fuego.$TESTDIR/;
    
        cmd "cd $BOARD_TESTDIR/fuego.$TESTDIR; tar xf XML-Test-Suite.tar"
        cmd "mkdir -p $BOARD_TESTDIR/xmlwf";
    
        put xmlwf/.libs/xmlwf  $BOARD_TESTDIR/xmlwf/xmlwf;
    }

ENVIRONMENT and ARGUMENTS [edit section]

Some environment variables commonly used are:
  • $BOARD_TESTDIR
  • $TESTDIR

There are no arguments to this function.

RETURN [edit section]

returns non-zero for error

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