|
|
= NAME =test_build
|
|
|
= SYNOPSIS =Performs the actual steps needed to build the test software.
|
|
|
= DESCRIPTION =This function is defined in the base test script for a test, and executes thosecommands required to build the software.
|
|
When this function starts, the source code for the test program has beenunpacked, and the current directory is the root directory where the sourceis located (in /userdata/buildzone/<test_name-platform_name/>
|
When this function starts, the source code for the test program has beenunpacked, and the current directory is the root directory where the sourceis located (in /userdata/buildzone/<''test_name''-''platform_name''/>
|
|
|
== Commonly called functions or programs ==This function can contain calls to just about any command, but there are somecommon 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 =Some sample contents are:{{{#!YellowBoxfunction test_build { make && touch test_suite_ready || build_error "error building software"}}}}
|
|
|
{{{#!YellowBoxfunction test_build { configure make && touch test_suite_ready || build_error "error building software"}}}}
|
|
|
{{{#!YellowBoxfunction 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"}}}}
|
|
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 =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 =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
|
An example path would be: ''/home/jenkins/fuego/engine/tests/Functional.hello_world/hello_world.sh''
|
|
build, pre_build, post_build
|
= SEE ALSO = * [[function_build|build]], [[function_pre_build|pre_build]], [[function_post_build|post_build]]
|