function_test_deploy 

Fuego 1.0 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 /userdata/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 $FUEGO_HOME/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 $FUEGO_HOME/fuego.$TESTDIR
    }

    function test_deploy {
        put {sample*,run-tests.sh} $FUEGO_HOME/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  $FUEGO_HOME/fuego.$TESTDIR/;
    
        cmd "cd $FUEGO_HOME/fuego.$TESTDIR; tar xf XML-Test-Suite.tar"
        cmd "mkdir -p $FUEGO_HOME/xmlwf";
    
        put xmlwf/.libs/xmlwf  $FUEGO_HOME/xmlwf/xmlwf;
    }

ENVIRONMENT and ARGUMENTS [edit section]

Some environment variables commonly used are:
  • $FUEGO_HOME
  • $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