FrontPage 

Fuego wiki

Login or create account

function test build in split format

NAME [edit section]

= NAME =
test_build

SYNOPSIS [edit section]

= SYNOPSIS =
Performs the actual steps needed to build the test software.

DESCRIPTION [edit section]

= DESCRIPTION =
This function is defined in the base test script for a test, and executes those
commands required to build the software.
When this function starts, the source code for the test program has been unpacked, and the current directory is the root directory where the source is located (in /fuego-rw/buildzone/<test_name-platform_name/>
When this function starts, the source code for the test program has been
unpacked, and the current directory is the root directory where the source
is located (in /fuego-rw/buildzone/<''test_name''-''platform_name''/>

Commonly called functions or programs [edit section]

== 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
 * patch - used to apply patches to the source
 * configure - used with autoconf-based source
 * make - used to build programs from source

EXAMPLES [edit section]

= EXAMPLES =
Some sample contents are:
{{{#!YellowBox
function test_build {
    make && touch test_suite_ready || build_error "error building software"
}
}}}
{{{#!YellowBox
function test_build {
    configure
    make && touch test_suite_ready || build_error "error building software"
}
}}}
{{{#!YellowBox
function test_build {
    patch -N -s -p1 < $TEST_HOME/nbench_Makefile.patch
    rm -f pointer.h && touch pointer.h
    CLFAGS+= " -s -static -Wall -O3"
    make CFLAGS="${CFLAGS}" CC="$CC" AR="$AR" RANLIB="$RANLIB" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" && touch test_suite_ready || build_error "error while building test"
}
}}}

ENVIRONMENT and ARGUMENTS [edit section]

Core interfaces and Variables)
= ENVIRONMENT and ARGUMENTS =
A number of environment variables are set (see [[Core interfaces]] and [[Variables]])
However, some variables that are commonly used in this function are: * $TEST_HOME - the directory where source materials for the test are located * This is often used to reference patch files * The toolchain variables: * $CC, $AR, $LD, $RANLIB, $CXX, $CPP, $CXXPP (see tools.sh)
However, some variables that are commonly used in this function are:
 * $TEST_HOME - the directory where source materials for the test are located
   * This is often used to reference patch files
 * The toolchain variables:
   * $CC, $AR, $LD, $RANLIB, $CXX, $CPP, $CXXPP (see [[tools.sh]])
There are no arguments to this function.
There are no arguments to this function.

RETURN [edit section]

= RETURN =
returns non-zero for error
On success, the function should create the file 'test_suite_ready' in the root of the build directory. This is normally done with the 'touch' command, as shown in the examples.
On success, the function should create the file 'test_suite_ready' in the root of the build directory.  This is normally done with the 'touch' command, as shown in the examples.

SOURCE [edit section]

= SOURCE =
Located in the base script for each test.  The base test scripts are located in /fuego-core/engine/tests/<test_name>.
An example path would be: /fuego-core/engine/tests/Functional.hello_world/fuego_test.sh
An example path would be: ''/fuego-core/engine/tests/Functional.hello_world/fuego_test.sh''

SEE ALSO [edit section]

build, pre_build, post_build
= SEE ALSO =
 * [[function_build|build]], [[function_pre_build|pre_build]], [[function_post_build|post_build]]
TBWiki engine 1.8.3 by Tim Bird